login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Activatie code fout

Offline HumanX - 04/01/2005 21:38
Avatar van HumanXHTML interesse Ik wee niet wat er aan de hand is maar je krijgt een email toegestuurt en daar staat de activatie code je gaat naar die link en zegt dan incorrecte activatie code wie kan me helpen

  1. <?php /* ------------------------- */
  2.  
  3. include("_include-config.php");
  4.  
  5. $login = $_POST['login'];
  6. $pass = $_POST['pass'];
  7. $passconfirm = $_POST['passconfirm'];
  8. $email = $_POST['email'];
  9. $type = $_POST['type'];
  10. $IP = $_SERVER['REMOTE_ADDR'];
  11. ${"select$type"} = "selected";
  12.  
  13. if(isset($_POST['submit'])) {
  14. $message = Array(
  15. "Je login mag alleen A-Z, a-z, 0-9, _ en - hebben",
  16. "De wachtwoorden die je gaf zijn niet identiek",
  17. "Vul een geldig e-mail adres in",
  18. "Selecteer een type crimineel",
  19. "Er bestaat al iemand met die login",
  20. "Er is al iemand met die e-mail");
  21.  
  22. $msgnum = -1;
  23. if(preg_match('/^[a-zA-Z0-9_\-]+$/',$login) == 0)
  24. $msgnum = 0;
  25. if($pass == "" || $pass != $passconfirm)
  26. $msgnum = 1;
  27. if(preg_match('/^.+@.+\..+$/',$email) == 0)
  28. $msgnum = 2;
  29. if($type != 1 && $type != 2 && $type != 3)
  30. $msgnum = 3;
  31. else {
  32. $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `login`='$login'");
  33. if(mysql_num_rows($dbres) > 0)
  34. $msgnum = 4;
  35. $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `email`='$email'");
  36. if(mysql_num_rows($dbres) > 0)
  37. $msgnum = 5;
  38.  
  39. if($msgnum == -1) {
  40. $code = rand(100000,999999);
  41. mysql_query("INSERT INTO `[users]`(signup,login,pass,IP,email,type) values(NOW(),'$login',MD5('$pass'),'$IP','$email',$type)");
  42. mysql_query("INSERT INTO `[temp]`(login,IP,code,area,time) values('$login','$IP',$code,'signup',NOW())");
  43. $id = mysql_insert_id();
  44. mail($email,"Criminals activatie-code","Klik op de volgende link om je account te activeren:\nhttp://www.crimewar2004.com/signup.php?id=$id&code=$code","From: Criminals <security@crimewar2004.com>\n");
  45. }
  46. }
  47. }
  48.  
  49. /* ------------------------- */ ?>
  50.  
  51. <html>
  52.  
  53.  
  54. <head>
  55. <title>[( Criminals )]</title>
  56. <link rel="stylesheet" type="text/css" href="<?php echo ($_COOKIE['v'] == 2) ? "css-v2.css" : "css-v1.css"; ?>">
  57.  
  58. </head>
  59.  
  60.  
  61. <body style="background: #AA3C3C; margin: 0px;">
  62. <table align="center" width=100%>
  63. <?php /* ------------------------- */
  64.  
  65. if(isset($_GET['id'],$_GET['code'])) {
  66. print " <tr><td class=\"subTitle\"><b>Activatie</b></td></tr>\n";
  67.  
  68. $id = $_GET['id'];
  69. $code = $_GET['code'];
  70. $dbres = mysql_query("SELECT `login` FROM `[temp]` WHERE `area`='signup' AND `id`='$id' AND `code`='$code'");
  71.  
  72. if($data = mysql_fetch_object($dbres)) {
  73. mysql_query("UPDATE `[users]` SET `activated`=1,`signup`=NOW() WHERE `login`='{$data->login}'");
  74. mysql_query("DELETE FROM `[temp]` WHERE `id`='$id'");
  75. print " <tr><td class=\"mainTxt\">Activatie voltooid, je kunt nu inloggen</td></tr>\n";
  76. }
  77. else
  78. print " <tr><td class=\"mainTxt\">Incorrecte activatie-code...</td></tr>\n";
  79. }
  80. else {
  81. if($msgnum != -1) {
  82. print " <tr><td class=\"subTitle\"><b>Aanmelden</b></td></tr>\n";
  83. if(isset($msgnum) && $msgnum != -1)
  84. print " <tr><td class=\"mainTxt\">\n {$message[$msgnum]}\n </td></tr>\n";
  85.  
  86. print <<<ENDHTML
  87.   <tr><td class="mainTxt">
  88. <form method="post"><table align="center">
  89. <tr><td width=100>Login:</td> <td><input type="text" name="login" maxlength=16 style="width: 150;" value="$login"></td></tr>
  90. <tr><td width=100>Wachtwoord:</td> <td><input type="password" name="pass" maxlength=16 style="width: 150;"></td></tr>
  91. <tr><td width=100>Herhaal:</td> <td><input type="password" name="passconfirm" maxlength=16 style="width: 150;"></td></tr>
  92. <tr><td width=100>E-Mail:</td> <td><input type="text" name="email" maxlength=64 style="width: 150;" value="$email"></td></tr>
  93. <tr><td width=100>Type:</td> <td><select name="type" style="width: 150;">
  94. <option value="1" $select1>Drugsdealer</option>
  95. <option value="2" $select2>Wetenschapper</option>
  96. <option value="3" $select3>Politie</option>
  97. </select> <a href="javascript: //" onClick="window.open('help.php#types')">[?]</a></td></tr>
  98. <tr><td></td><td align="right"><input type="submit" name="submit" style="width: 100;" value="Aanmelden"></td></tr>
  99. </table></form>
  100.   </td></tr>
  101. ENDHTML;
  102. }
  103. else
  104. print " <tr><td class=\"mainTxt\">Je bent geregistreerd, er is een e-mail gestuurd naar $email met een activatie-code...</td></tr>\n";
  105. }
  106.  
  107. /* ------------------------- */ ?>
  108. </table>
  109.  
  110. </body>
  111.  
  112.  
  113. </html>

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2025 Sitemasters.be - Regels - Laadtijd: 0.252s