Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2973 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  [PHP] modifier un fichier de Nuked-klan

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[PHP] modifier un fichier de Nuked-klan

n°1288616
hppp
Serveur@home
Posté le 20-01-2006 à 20:34:23  profilanswer
 

salut a tous
 
je voudrai modifier le fichier de Nuked-klan pour recruter!
et je voudrai tous enlever pour metre que sa:
 Type:  
 Serveur MATCH (mot de passe obligatoire)
 Serveur PUBLIC (mot de passe optionnel)
 
 Jeu:  
 
 Capacité: 4 joueurs10 joueurs12 joueurs14 joueurs16 joueurs16 joueurs18 joueurs20 joueurs  
 
 Durée: 1 mois3 mois (-5%)6 mois (-10%)9 mois (-15%)12 mois (-20%)  
 
et le mtre sous cette forme==> http://www.verygames.net/prices?
merci de m'aider A++
 
voila le code:  

Code :
  1. <?php
  2. // -------------------------------------------------------------------------//
  3. // Nuked-KlaN - PHP Portal                                                  //
  4. // http://www.nuked-klan.org                                                //
  5. // -------------------------------------------------------------------------//
  6. // This program is free software. you can redistribute it and/or modify     //
  7. // it under the terms of the GNU General Public License as published by     //
  8. // the Free Software Foundation; either version 2 of the License.           //
  9. // -------------------------------------------------------------------------//
  10. if (!defined("INDEX_CHECK" ))
  11. {
  12.     die ("<center>You cannot open this page directly</center>" );
  13. }
  14. global $nuked, $language, $user;
  15. translate("modules/Recruit/lang/" . $language . ".lang.php" );
  16. opentable();
  17. if (!$user)
  18. {
  19.     $visiteur = 0;
  20. }
  21. else
  22. {
  23.     $visiteur = $user[1];
  24. }
  25. $ModName = basename(dirname(__FILE__));
  26. $level_access = nivo_mod($ModName);
  27. if ($visiteur >= $level_access && $level_access > -1)
  28. {
  29.     compteur("Recruit" );
  30.     if ($nuked['recrute'] > 0)
  31.     {
  32.         function index()
  33.         {
  34.             global $nuked;
  35.             if ($nuked['recrute_charte'] != "" )
  36.             {
  37.                 $charte = BBcode($nuked['recrute_charte']);
  38.                 $charte = icon($charte);
  39.             echo "<br /><table style=\"margin-left: auto;margin-right: auto;text-align: left;\" width=\"90%\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\">\n"
  40.             . "<tr><td align=\"center\"><big><b>" . _RECRUIT . "</b></big></td></tr>\n"
  41.             . "<tr><td>&nbsp;</td></tr><tr><td>" . $charte . "</td></tr></table>\n"
  42.             . "<form method=\"post\" action=\"index.php?file=Recruit\">\n"
  43.             . "<div style=\"text-align: center;\"><input type=\"hidden\" name=\"op\" value=\"form\" />\n"
  44.             . "<input type=\"submit\" value=\"" . _IAGREE . "\" />&nbsp;<input type=\"button\" value=\"" . _IDESAGREE . "\" onclick=\"javascript:history.back()\" /></div></form>\n";
  45.             }
  46.             else
  47.             {
  48.                 form();
  49.             }
  50.         }
  51.         function form()
  52.         {
  53.             global $nuked, $user, $language;
  54.         echo "<script type=\"text/javascript\">\n"
  55.         ."<!--\n"
  56.         ."\n"
  57.         . "function verifchamps()\n"
  58.         . "{\n"
  59.         . "if (document.getElementById('recruit_pseudo').value.length == 0)\n"
  60.         . "{\n"
  61.         . "alert('" . _NONICK . "');\n"
  62.         . "return false;\n"
  63.         . "}\n"
  64.         . "\n"
  65.         . "if (document.getElementById('recruit_lastname').value.length == 0)\n"
  66.         . "{\n"
  67.         . "alert('" . _NOLASTNAME . "');\n"
  68.         . "return false;\n"
  69.         . "}\n"
  70.         . "\n"
  71.         . "if (document.getElementById('recruit_age').value.length == 0)\n"
  72.         . "{\n"
  73.         . "alert('" . _NOAGE . "');\n"
  74.         . "return false;\n"
  75.         . "}\n"
  76.      ."\n"
  77.      ."if (document.getElementById('recruit_mail').value.indexOf('@') == -1)\n"
  78.      ."{\n"
  79.      ."alert('" . _BADMAIL . "');\n"
  80.      ."return false;\n"
  81.      ."}\n"
  82.      ."\n"
  83. . "if (document.getElementById('recruit_icq').value.length == 0)\n"
  84. . "{\n"
  85. . "alert('" . _NOICQ . "');\n"
  86.     . "return false;\n"
  87. . "}\n"
  88.      ."\n"
  89.         . "return true;\n"
  90.         . "}\n"
  91.      ."\n"
  92.      . "// -->\n"
  93.      . "</script>\n";
  94. echo "<br /><form method=\"post\" action=\"index.php?file=Recruit\" onsubmit=\"return verifchamps();\">\n"
  95. . "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" width=\"90%\" cellspacing=\"1\" cellpadding=\"1\" border=\"0\">\n"
  96. . "<tr><td colspan=\"2\" align=\"center\"><big><b>" . _RECRUIT . "</b></big></td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\n"
  97. . "<tr><td style=\"width: 20%;\"><b>" . _NICK . " : </b></td><td><input id=\"recruit_pseudo\" type=\"text\" name=\"pseudo\" value=\"" . $user[2] . "\" size=\"20\" /></td></tr>\n"
  98. . "<tr><td style=\"width: 20%;\"><b>" . _FIRSTNAME . " : </b></td><td><input id=\"recruit_lastname\" type=\"text\" name=\"prenom\" size=\"20\" /></td></tr>\n"
  99. . "<tr><td style=\"width: 20%;\"><b>" . _AGE . " : </b></td><td><input id=\"recruit_age\" type=\"text\" name=\"age\" size=\"3\" /></td></tr>\n"
  100. . "<tr><td style=\"width: 20%;\"><b>" . _MAIL . " : </b></td><td><input id=\"recruit_mail\" type=\"text\" name=\"mail\" size=\"25\" /></td></tr>\n"
  101. . "<tr><td style=\"width: 20%;\"><b>" . _ICQMSN . " : </b></td><td><input id=\"recruit_icq\" type=\"text\" name=\"icq\" size=\"25\" /></td></tr>\n"
  102. . "<tr><td style=\"width: 20%;\"><b>" . _COUNTRY . " : </b></td><td><select name=\"country\">\n";
  103.         if ($language == "french" )
  104.         {
  105.             $pays = "France.gif";
  106.         }
  107.         $rep = Array();
  108.         $handle = @opendir("images/flags" );
  109.         while (false !== ($f = readdir($handle)))
  110.         {
  111.             if ($f != ".." && $f != "." && $f != "index.html" && $f != "Thumbs.db" )
  112.             {
  113.                 $rep[] = $f;
  114.             }
  115. }
  116.         closedir($handle);
  117. sort ($rep);
  118. reset ($rep);
  119. while (list ($key, $filename) = each ($rep))
  120. {
  121.             if ($filename == $pays)
  122.             {
  123.                 $checked = "selected=\"selected\"";
  124.             }
  125.             else
  126.             {
  127.                 $checked = "";
  128.             }
  129.             list ($country, $ext) = split ('[.]', $filename);
  130.             echo "<option value=\"" . $filename . "\" " . $checked . ">" . $country . "</option>\n";
  131. }
  132.             echo "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _GAME . " : </b></td><td><select name=\"game\">\n";
  133.             $sql = mysql_query("SELECT id, name FROM " . GAMES_TABLE . " ORDER BY name" );
  134.             while (list($game_id, $nom) = mysql_fetch_array($sql))
  135.             {
  136.                 $nom = stripslashes($nom);
  137.                 $nom = htmlentities($nom);
  138.                 echo "<option value=\"" . $game_id . "\">" . $nom . "</option>\n";
  139.             }
  140.             echo "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _CONNECT . " : </b></td><td><select name=\"connex\">\n"
  141.             . "<option>" . _56K . "</option>\n"
  142.             . "<option>" . _NUMERIS . "</option>\n"
  143.             . "<option>" . _ADSL . "</option>\n"
  144.             . "<option>" . _CABLE . "</option>\n"
  145.             . "<option>" . _T1 . "</option>\n"
  146.             . "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _EXPERIENCE . " : </b></td><td><select name=\"exp\">\n"
  147.             . "<option>" . _LESS1MONTH . "</option>\n"
  148.             . "<option>" . _LESS6MONTH . "</option>\n"
  149.             . "<option>" . _LESS1YEAR . "</option>\n"
  150.             . "<option>" . _MORE1YEAR . "</option>\n"
  151.             . "<option>" . _MORE2YEAR . "</option>\n"
  152.             . "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _AVAILABLE . " : </b></td><td><select name=\"dispo\">\n"
  153.             . "<option>" . _EVENING . "</option>\n"
  154.             . "<option>" . _WEEKEND . "</option>\n"
  155.             . "<option>" . _HOLIDAY . "</option>\n"
  156.             . "<option>" . _THREE . "</option>\n"
  157.             . "<option>" . _OTHER . "</option>\n"
  158.             . "</select></td></tr><tr><td style=\"width: 20%;\"><b>" . _COMMENT . " : </b></td><td><textarea name=\"comment\" cols=\"60\" rows=\"10\"></textarea></td></tr><tr><td colspan=\"2\">&nbsp;</td></tr>\n"
  159.             . "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"" . _SEND . "\" /><input type=\"hidden\" name=\"op\" value=\"send_recruit\" /></td></tr></table></form><br />\n";
  160.         }
  161.         function send_recruit($pseudo, $prenom, $age, $mail, $icq, $country, $game, $connex, $exp, $dispo, $comment)
  162.         {
  163.             global $nuked;
  164.             $inbox = $nuked['recrute_inbox'];
  165.             $email = $nuked['recrute_mail'];
  166.             $date = time();
  167.             $date2 = strftime("%x %H:%M", $date);
  168.             $pseudo = addslashes($pseudo);
  169.             $prenom = addslashes($prenom);
  170.             $age = addslashes($age);
  171.             $mail = addslashes($mail);
  172.             $icq = addslashes($icq);
  173.             $country = addslashes($country);
  174.             $connex = addslashes($connex);
  175.             $exp = addslashes($exp);
  176.             $dispo = addslashes($dispo);
  177.             $comment = addslashes($comment);
  178.             $pseudo = htmlentities($pseudo);
  179.             $prenom = htmlentities($prenom);
  180.             $age = htmlentities($age);
  181.             $mail = htmlentities($mail);
  182.             $icq = htmlentities($icq);
  183.             $country = htmlentities($country);
  184.             $connex = htmlentities($connex);
  185.             $exp = htmlentities($exp);
  186.             $dispo = htmlentities($dispo);
  187.             $comment = htmlentities($comment);
  188.             $sql = mysql_query("INSERT INTO " . RECRUIT_TABLE . " ( `id` , `date` , `pseudo` , `prenom` , `age` , `mail` , `icq` , `country` , `game` , `connection` , `experience` , `dispo` , `comment` ) VALUES ( '' , '" . $date . "' , '" . $pseudo . "' , '" . $prenom . "' , '" . $age . "' , '" . $mail . "' , '" . $icq . "' , '" . $country . "' , '" . $game . "' , '" . $connex . "' , '" . $exp . "' , '" . $dispo . "' , '" . $comment. "' )" );
  189.             $subject = _RECRUIT . ", " . $date2;
  190.             $corps = $pseudo . " " . _NEWRECRUIT . "\r\n" . $nuked['url'] . "/index.php?file=Recruit&page=admin\r\n\r\n\r\n" . $nuked['name'] . " - " . $nuked['slogan'];
  191.             $from = "From: " . $nuked['name'] . " <" . $nuked['mail'] . ">\r\nReply-To: " . $mail;
  192.             $subject = @html_entity_decode($subject);
  193.             $corps = @html_entity_decode($corps);
  194.             $from = @html_entity_decode($from);
  195.             if ($email != "" )
  196.             {
  197.                 mail($email, $subject, $corps, $from);
  198.             }
  199.             if ($inbox != "" )
  200.             {
  201.                 $sql2 = mysql_query("INSERT INTO " . USERBOX_TABLE . " ( `mid` , `user_from` , `user_for` , `titre` , `message` , `date` , `status` ) VALUES ( '' , '" . $inbox . "' , '" . $inbox . "' , '" . $subject . "' , '" . $corps . "' , '" . $date . "' , '0' )" );
  202.             }
  203.             echo "<br /><br /><div style=\"text-align: center;\">" . _SENDRECRUIT . "</div><br /><br />";
  204.             redirect("index.php", 2);
  205.         }
  206.         switch ($op)
  207.         {
  208.             case"index":
  209.                 index();
  210.                 break;
  211.             case"form":
  212.                 form();
  213.                 break;
  214.             case"send_recruit":
  215.                 send_recruit($pseudo, $prenom, $age, $mail, $icq, $country, $game, $connex, $exp, $dispo, $comment);
  216.                 break;
  217.             default:
  218.                 index();
  219.                 break;
  220.         }
  221.     }
  222.     else
  223.     {
  224.         echo "<br /><br /><div style=\"text-align: center;\">" . _RECRUITOFF . "</div><br /><br />";
  225.     }
  226. }
  227. else if ($level_access == -1)
  228. {
  229.     echo "<br /><br /><div style=\"text-align: center;\">" . _MODULEOFF . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />";
  230. }
  231. else if ($level_access == 1 && $visiteur == 0)
  232. {
  233.     echo "<br /><br /><div style=\"text-align: center;\">" . _USERENTRANCE . "<br /><br /><b><a href=\"index.php?file=User&amp;op=login_screen\">" . _LOGINUSER . "</a> | <a href=\"index.php?file=User&amp;op=reg_screen\">" . _REGISTERUSER . "</a></b></div><br /><br />";
  234. }
  235. else
  236. {
  237.     echo "<br /><br /><div style=\"text-align: center;\">" . _NOENTRANCE . "<br /><br /><a href=\"javascript:history.back()\"><b>" . _BACK . "</b></a></div><br /><br />";
  238. }
  239. closetable();
  240. ?>

mood
Publicité
Posté le 20-01-2006 à 20:34:23  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  [PHP] modifier un fichier de Nuked-klan

 

Sujets relatifs
Trier un fichier en C[résolu] Sécurité base de données avec PHP
Aide page PHPAfficher le contenu d'un fichier texte sur une page WEB ?
Comment spliter un champ importé de MySQL dans un tableau PHPComment inclure une font dans un fichier resource ?
Proteger un programme PHPProblèmes d'écriture dans un fichier : fichier vide
Ecriture dans un fichierPHP/FTP modifier le dossier de destination
Plus de sujets relatifs à : [PHP] modifier un fichier de Nuked-klan


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR