Guest User

Untitled

a guest
Jul 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. // KAYIT FORMU
  5. $islem = $_GET['islem'];
  6. if($islem == ''){
  7. echo'
  8. <form name="form1" method="post" action="index.php?sayfa=kayit&islem=sonuc">
  9. <table class="sample" align="center">
  10. <tr>
  11. <td class="text" align="right" Width="50%">Username</td>
  12. <td><input class="text" name="kulad" type="text" id="kulad"></td>
  13. </tr>
  14. <tr>
  15. <td class="text" align="right">Password</td>
  16. <td><input class="text" name="pass" type="password" id="pass"></td>
  17. </tr>
  18. <tr>
  19. <td class="text" align="right">Confirm Password </td>
  20. <td><input class="text" name="pass2" type="password" id="pass2"></td>
  21. </tr>
  22. <tr>
  23. <td class="text" align="right">E-Mail</td>
  24. <td><input class="text" name="mail" type="text" id="mail"></td>
  25. </tr>
  26. <tr>
  27. <td class="text" align="right">Secret Question </td>
  28. <td><label>
  29. <select name="gsoru" id="gsoru">
  30.  
  31.  
  32. <option value="1">What is your mothers maiden name?</option>
  33. <option value="2">What was the name of your first school?</option>
  34. <option value="3">Who is your favorite super hero?</option>
  35. <option value="4">What is the name of your first pet?</option>
  36. <option value="5">What was the first video game you played?</option>
  37. <option value="6">What city was your mother born in?</option>
  38. <option value="7">What is your favorite TV show?</option>
  39. </select>
  40. </label></td>
  41. </tr>
  42. <tr>
  43. <td class="text" align="right">Secret Answer</td>
  44. <td><input class="text" class="text" name="gcvp" type="text" id="gcvp"></td>
  45. </tr>
  46. <tr>
  47. <tr>
  48. <td class="text" align="right">Code</td>
  49. <td><img src="3nqiN & seneRioR/img.php" /></td>
  50. </tr>
  51. <tr>
  52. <td class="text"align="right">Enter Code</td>
  53. <td><input class="text" name="formHC" type="text" id="formHC"></td>
  54. </tr>
  55. <tr>
  56. <td class="text"align="right">Enter WareHouse Password:</td>
  57. <td><input class="text" name="wpw" type="text" id="wpw"></td>
  58. </tr>
  59. <tr>
  60. <td class="text"align="right">Enter WareHouse Password Again:</td>
  61. <td><input class="text" name="c_wpw" type="text" id="c_wpw"></td>
  62. </tr>
  63. <tr>
  64. <td class="text"align="center" colspan="2">
  65. <label><input class="button" type="submit" name="button" id="button" value="Register"/></label>
  66. </td>
  67. </tr>
  68. </table>
  69. </form>';
  70.  
  71. }elseif ($islem == 'sonuc') {
  72.  
  73. // KAYIT ISLEMI SONUCU
  74.  
  75. $account = trim(guvenlik($_POST['kulad']));
  76. $pass = trim(guvenlik($_POST['pass']));
  77. $pwh = md5($pass);
  78. $pass2 = trim(guvenlik($_POST['pass2']));
  79. $gsoru = trim(guvenlik($_POST['gsoru']));
  80. $wpw = $_POST['wpw'];
  81. $c_wpw = $_POST['c_wpw']
  82. $gcvp = trim($_POST['gcvp']);
  83. $mail = $_POST['mail'];
  84. $formHC = trim(guvenlik($_POST['formHC']));
  85.  
  86. if ($wpw != $c_wpw){
  87. Echo 'The Warehouse Passwords Did Not Match!';
  88. echo '<br><a href = 'kayit.php'>Try Again </a>
  89. Die();
  90. }
  91.  
  92. if (!is_numeric($wpw)){
  93. echo "The Warehouse Password Must Only Numbers From [1-9] And Atleast 6 Numbers Long!<br><a href='kayit.php'>Register Again</a>";
  94. die();
  95. }
  96.  
  97. if (!empty($wpw) && strlen($wpw) < 6) {
  98.  
  99. echo "The Warehouse Password Must Be Atleast 6 Numbers Long!<br><a href='kayit.php'>Register Again</a>";
  100. die();
  101. }
  102.  
  103. $enqin = odbc_exec($conn,"SELECT count(*) FROM TB_USER Where strAccountID = '".$account."'");
  104. $enqin1 = odbc_result($enqin,1);
  105.  
  106.  
  107. if (($account && $pass && $pass2 && $gsoru && $gcvp && $mail) == '') {
  108. $msj = 'There was a problem with your registration. A field was left blank.';
  109. }elseif ($pass <> $pass2) {
  110. $msj = 'Юifreleriniz Birbiriyle Uyumlu Deрil';
  111. }elseif ($_POST['formHC'] <> $_SESSION['security_code']) {
  112. $msj = 'Gьvenlik Kodunu yanlэю Girdiniz.';
  113. }elseif (!$enqin1 == '') {
  114. $msj = ''.$account.' Baska Ьye Tarafэndan Kullanэlэyor.';
  115. }else{
  116.  
  117. $enqin2 = odbc_exec($conn,"INSERT INTO TB_USER (StrAccountID,StrPasswd,StrSocno,idays,strAuthority,StrSoru,StrYanit,strEmail,StrWarehouseNo,RealPass) VALUES ('".$account."','".$pwh."','1','6','1','".$gsoru."','".$gcvp."','".$mail."','".$wpw."','".$pass."')");
  118. $enqin3 = odbc_exec($conn,"INSERT INTO WareHouse VALUES ('$account','$wpw');
  119. if($enqin2 && $enqin3) {
  120. Echo '
  121. <br><center>User Registration Successful!
  122. <br>
  123. <br>Login Name : '.$account.'
  124. <br>
  125. <br>Password : '.$pass.'
  126. <br>
  127. <br>Secret Question : '.$gsoru.'
  128. <br>
  129. <br>Answer : '.$gcvp.'
  130. <br>
  131. <br>
  132. <br>Please save your information!</center>';
  133.  
  134. }else{
  135. $msj = 'Эюlem Tamamlanamadэ Hata Var. Lьtfen Bir Sьre Bekledikten Sonra Tekrar Deneyiniz.';
  136. }
  137. }
  138.  
  139. echo '<br><center>'.$msj.'</center>';
  140.  
  141. }
  142.  
  143.  
  144.  
  145. ?>
Add Comment
Please, Sign In to add comment