Re: [redirection]module jeux flash

bonsoir calfou,

merci de ta réponse :rolleyes:

je viens de faire la manip :

voici l'index que cela me donne :


Code PHP :
Pour copier le contenu exact du code,
Veuillez citer le message
  1. <?php
  2. //
  3. // ---------------------------------------------------------------
  4. // KwsPHP kOoGar Web System
  5. // $Id: index.php 830 2008-12-15 18:18:08Z mike007.devpwsphp $
  6. // ---------------------------------------------------------------
  7. // Fichier : index.php
  8. // Mise a jour : 08/08/06 par Ditch
  9. // ---------------------------------------------------------------
  10.  
  11. /*Redirection module jeu
  12. if (preg_match('/^jeux_flash./', $_SERVER['REQUEST_URI']) == 0) {
  13.     $URL = 'jeux.beziers-info.com/index.php';
  14.  
  15.     header('HTTP/1.1 301 Moved Permanently');
  16.     header('Location:' . (($_SERVER["HTTPS"] == 'on')?'https://':'http://') . $URL);
  17.     exit();
  18. }
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. //@import_request_variables ("EGPC", '');
  26. //zeta: question sec cf me
  27. if($_GET['act'] == 'Arcade')
  28. {
  29.     require_once './newscore.php';
  30.     exit;
  31. }
  32. if (file_exists ('connect.php'))
  33. {
  34.     require_once 'connect.php';
  35.     if (isset($_REQUEST['mod']))
  36.     {
  37.         $K_mod = $mod = sp(str_replace ('/', '',$_REQUEST['mod']));
  38.     }
  39.     else
  40.     {
  41.         $K_mod = $mod = '';
  42.     }
  43.  
  44.     if (isset($_REQUEST['ac']))
  45.     {
  46.         $K_ac = $ac = sp(str_replace ('/', '',$_REQUEST['ac']));
  47.     }
  48.     if (empty($K_ac))
  49.     {
  50.         $K_ac = $ac = 'index';
  51.     }
  52.  
  53.     if (isset($_REQUEST['id']))
  54.     {
  55.         $K_id = $id = intval($_REQUEST['id']);
  56.     }
  57.     else
  58.     {
  59.         $K_id = $id = 0;
  60.     }
  61.  
  62.     include 'header.php';
  63.  
  64.     echo'<noscript>';
  65.     open_table();
  66.     echo df_message('information','Javascript d&eacute;sactiv&eacute; ou non support&eacute; !!!<br />Certaines fonctionnalit&eacute;s secondaires sont donc inaccessibles.');
  67.     close_table();
  68.     echo'</noscript>';
  69.  
  70.     global $grade;
  71.  
  72.     $connecte = 1;
  73.  
  74.     if (strpos($K_mod, '..') === true)
  75.     {
  76.         bloc_head('Erreur');
  77.         echo 'Commande interdite.';
  78.         close_table();
  79.     }
  80.     secure();
  81.  
  82.     $messagelogin = (isset($_REQUEST['messagelogin']) ? '' : $messagelogin) ;
  83.     if (!empty ($messagelogin))
  84.     {
  85.         open_table ();
  86.         echo '<div class="messagelogin">'.$messagelogin.'</div>';
  87.         close_table ();
  88.     }
  89.     function base256bis_decode(){echo base64_decode('PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPg0KLy8gPCFbQ0RBVEFbDQoJYWxlcnQgKCJDaGVyIFdlYm1hc3RlciwgYm9uam91cixcblxuTG9ycyBkdSB06WzpY2hhcmdlbWVudCBkZSBLd3NQSFAsIHZvdXMgYXZleiBhY2NlcHTpIHVuZSBsaWNlbmNlLlxuVm91cyBhdmV6IOlnYWxlbWVudCBhY2NlcHRlciBsZXMgcuhnbGVzIGR1IHNpdGUgaHR0cDovL3d3dy5rd3NwaHAub3JnXG5cblOSaWwgZXN0IGNlcnRlcyBzYXRpc2ZhaXNhbnQgZGUgdm9pciBxdWUgbm90cmUgcHJvZHVpdCBlc3QgYXBwculjaeksXG5ub3VzIGp1Z2VvbnMgcXVlIGxhaXNzZXIgY29tbWUgaWwgYSDpdOkgcHLpdnUgdW5lIKsgc2lnbmF0dXJlILsgZXN0IGxhIG1vaW5kcmUgZGVzIHBvbGl0ZXNzZXMsXG5sZSBk6XZlbG9wcGVtZW50IGV0IGxlIHN1cHBvcnQgZGUgS3dzUEhQIOl0YW50IGdyYXR1aXRzIGV0IGFzc3Vy6XMgcGFyIGRlcyBwZXJzb25uZXMgYulu6XZvbGVzLlxuXG5JbCBlc3QgZW4gZWZmZXQgbuljZXNzYWlyZSBwb3VyIGNvbnRyaWJ1ZXIg4CBsYSBwcm9wYWdhdGlvbiBkZSBub3RyZSBwcm9kdWl0IHF1kmlsIHNlIGZhc3NlIGNvbm5haXRyZVxuZXQgcXWSaWwgc29pdCBhY2Nlc3NpYmxlIOAgdG91dGUgcGVyc29ubmUgbmF2aWd1YW50IHN1ciB2b3MgcGFnZXMgZXQgYXlhbnQgZW52aWUgZGUgdm91cyBpbWl0ZXIuXG5cbkplIHN1aXMgY2VydGFpbiBxdWUgdm91cyBjb21wcmVuZHJleiBub3RyZSBtb3RpdmF0aW9uIGV0IG5vdXMgdm91cyBwcmlvbnMgZGUgYmllbiB2b3Vsb2lyIHJlbWV0dHJlXG5sZXMgY29weXJpZ2h0cyBldC9vdSBsZSBsaWVuIGh5cGVydGV4dCBlbiBiYXMgZGVzIHBhZ2VzIGRlIHZvdHJlIHNpdGUgaW5pdGlhbGVtZW50IHBy6XZ1LFxuc2lub24gcXVvaSBkZXMgbWVzdXJlcyBwbHVzIGF2YW5j6WVzIHNlcm9udCBwcmlzZXMg4CB2b3RyZSDpZ2FyZC5cblxuTm91cyB2b3VzIHByaW9ucyBkZSBjcm9pcmUg4CBskmFzc3VyYW5jZSBkZSBub3RyZSBjb25zaWTpcmF0aW9uIGRpc3Rpbmd16WVcbmV0IHZvdXMgcmVtZXJjaW9ucyBkZSBsYSBjb25maWFuY2UgcXVlIHZvdXMgYWNjb3JkZXogYXUgcHJvZHVpdCBxdWUgbm91cyBk6XZlbG9wcG9ucy5cblxuTGEgVGVhbSBLd3NQSFAuIik7DQovLyBdXT4NCjwvc2NyaXB0Pg==');}
  90.     if (!is_callable(ms_bloc_module) || !is_callable(ms_spe_module))
  91.     {
  92.         base256bis_decode();
  93.     }
  94.  
  95.     if (empty($K_mod))
  96.     {
  97.         include_once 'modules/tete_de_colonne.php';
  98.         /** Supprimer le / en fin de ligne pour désactiver ce contrôle **/
  99.         if(!isset($_SESSION['cecured']) || $_SESSION['cecured']<2)
  100.         {
  101.             echo df_message('erreur',base64_decode('UHJvYmwmZWdyYXZlO21lIGQnb3JnYW5lIGRlIHMmZWFjdXRlO2N1cml0JmVhY3V0ZTs='));
  102.         }
  103.         /**/
  104.         if($K_edito_aff == 'oui')
  105.         {
  106.             include_once 'themes/'.$K_theme.'/edito.php';
  107.         }
  108.         if ($maintenance!=0)
  109.         {
  110.             include_once 'modules/maintenance/perturbations.php';
  111.         }
  112.  
  113.         include_once 'modules/alerte/scan.php';
  114.  
  115.         $K_mod_dem = unserialize($K_mod_dem);
  116.         foreach($K_mod_dem as $pos => $nom_mod_dem)
  117.         {
  118.             $K_mod = $mod = $nom_mod_dem;
  119.             if        (ereg('page_',$K_mod))        $K_mod = 'page';
  120.             elseif    (ereg('articles_',$K_mod))    $K_mod = 'articles';
  121.             elseif    (ereg('news_',$K_mod))        $K_mod = 'news';
  122.             if (!empty($K_mod) and get_grade('index', $K_mod)>=GRD_VISIT and is_module($K_mod))
  123.             {
  124.                 if (ereg('page_',$nom_mod_dem))
  125.                 {
  126.                     $nom_mod_dem = explode('_',$nom_mod_dem);
  127.                     $_REQUEST['id_page'] = $nom_mod_dem[1];
  128.                     if (get_grade('id_page_'.intval($_REQUEST['id_page']),$K_mod) >= GRD_VISIT)
  129.                     {
  130.                         include 'modules/'.$nom_mod_dem[0].'/page.php';
  131.                     }
  132.                 }
  133.                 elseif (ereg('articles_',$nom_mod_dem) or ereg('news_',$nom_mod_dem))
  134.                 {
  135.                     $nom_mod_dem = explode('_',$nom_mod_dem);
  136.                     $K_id = $nom_mod_dem[1];
  137.                     include 'modules/'.$nom_mod_dem[0].'/commentaires.php';
  138.                 }
  139.                 else
  140.                 {
  141.                     include_once 'modules/'.$K_mod.'/index.php';
  142.                 }
  143.             }
  144.         }
  145.         include_once 'modules/pied_de_colonne.php';
  146.     }
  147.     elseif (file_exists('modules/'.$K_mod.'/'.$K_ac.'.php'))
  148.     {
  149.         if (get_grade($K_ac, $K_mod)>=GRD_VISIT and is_module($K_mod))
  150.         {
  151.             if (file_exists('modules/'.$K_mod.'/tete_de_module.php'))
  152.             {
  153.                 include_once './modules/'.$K_mod.'/tete_de_module.php';
  154.             }
  155.             else
  156.             {
  157.                 @include_once './modules/tete_de_module.php';
  158.             }
  159.  
  160.             include_once 'modules/'.$K_mod.'/'.$K_ac.'.php';
  161.  
  162.             if (file_exists('modules/'.$K_mod.'/pied_de_module.php'))
  163.             {
  164.                 include_once 'modules/'.$K_mod.'/pied_de_module.php';
  165.             }
  166.             else
  167.             {
  168.                 @include_once 'modules/pied_de_module.php';
  169.             }
  170.         }
  171.         else
  172.         {
  173.             ZoneReserve();
  174.         }
  175.     }
  176.     elseif (file_exists('modules/'.$K_mod.'/'))
  177.     {
  178.         ZoneReserve();
  179.     }
  180.     else
  181.     {
  182.         $arr =ScannerRepertoire('modules','dir', false);
  183.         $n =array();
  184.  
  185.         foreach($arr as $i => $a )
  186.         {
  187.             if(levenshtein($K_mod ,$a )<=2)
  188.             {
  189.                 $n []=$a ;
  190.             }
  191.         }
  192.  
  193.         $txt ='';
  194.         if(count($n )>0)
  195.         {
  196.             $txt ='Module se rapprochant le plus de votre demande :
  197.             <ul>';
  198.             foreach($n as $b )
  199.             {
  200.                 $themepasmenu = (isset($_REQUEST['themepasmenu']) ? '' : $themepasmenu) ;
  201.                 if (file_exists('modules/'.$b .'/index.php'))
  202.                 {
  203.                     $txt .='<li '.(!empty($themepasmenu)?'':'style="list-style-image:url(\'themes/'.$theme.'/images/puce.png\')"').' ><a href="index.php?mod='.$b.'">'.$b.'</a></li>';
  204.                 }
  205.                 else
  206.                 {
  207.                     $txt .='<li '.(!empty($themepasmenu)?'':'style="list-style-image:url(\'themes/'.$theme.'/images/puce.png\')"').' >'.$b.'</li>';
  208.                 }
  209.             }
  210.  
  211.             $txt .='</ul>';
  212.         }
  213.  
  214.         bloc_head('Module introuvable !');
  215.         echo '<p style="text-align:center; font-weight:bold;">Si un lien vous a renvoy&eacute; vers ce module, merci de contacter le webmaster.</p>
  216.         '.$txt.'
  217.         <form style="text-align:center" method="post" action="index.php"><input id="submit" name="submit" type="submit" value="  Retour  " /></form>';
  218.         close_table();
  219.     }
  220.     include_once 'fin.php';
  221. }
  222. else
  223. {
  224.     @import_request_variables ("EGPC", '');
  225.     header ('Location: ./install/index.php?noconnect=1');
  226. }
  227.  
  228. ?>
  229.  


mais problème #snif# : j'ai un message : Parse error: syntax error, unexpected '}' in /home2/beziersi/public_html/index.php on line 146



Sujet écrit par cheyenne le mardi 12 janvier 2010 à 19:58

[ Imprimer ] - [ Fermer la fenêtre ]