Mssql Dienst

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • Hier der Script von Ragezone

      PHP-Quellcode

      1. <?php
      2. $Flyff_config["mysql_host"]="localhost"; // MySQL IP
      3. $Flyff_config["mysql_port"]=3306; // MySQP port
      4. $Flyff_config["mysql_db"]="madwebtest"; // Flyff Database name
      5. $Flyff_config["mysql_login"]="madgizmo"; // MySQL Login name
      6. $Flyff_config["mysql_password"]="mw2"; // MySQL Password
      7. error_reporting(0);
      8. ?>
      9. <?php
      10. $Flyff_config["javascript_sort_method"]="bubble";
      11. $link = mysql_connect($Flyff_config['mysql_host'].":".$Flyff_config['mysql_port'], $Flyff_config['mysql_login'], $Flyff_config['mysql_password']);
      12. if (!$link) die("Couldn't connect to MySQL");
      13. @mysql_select_db($Flyff_config['mysql_db'], $link)
      14. or die ('Error '.mysql_errno().': '.mysql_error());
      15. ?>
      16. <script type="text/javascript">//<![CDATA[
      17. function isAlphaNumeric(value)
      18. {
      19. if (value.match(/^[a-zA-Z0-9]+$/))
      20. return true;
      21. else
      22. return false;
      23. }
      24. function checkform(f)
      25. {
      26. if (f.account.value=="")
      27. {
      28. alert("Fill in all fields Please"); return false;
      29. }
      30. if (!isAlphaNumeric(f.account.value))
      31. {
      32. alert("Fill in all fields"); return false;
      33. }
      34. if (f.password.value=="")
      35. {
      36. alert("No password "); return false;
      37. }
      38. if (!isAlphaNumeric(f.password.value))
      39. {
      40. alert("444444"); return false;
      41. }
      42. if (f.password2.value=="")
      43. {
      44. alert("You didnt repeat a password");
      45. return false;
      46. }
      47. if (f.password.value!=f.password2.value)
      48. {
      49. alert("Not the same password ");
      50. return false;
      51. }
      52. return true;
      53. }
      54. //]]>
      55. </script>
      56. <form method="post" action="index.php?op=reg" onsubmit="return checkform(this)">
      57. <table>
      58. <td><b><font face="Trebuchet MS" color="white" size="1">Login</font></b></td>
      59. <td><font face="Trebuchet MS" size="1"><b>
      60. <input type="text" name="account" maxlength="15" size="10" /></b></font></td>
      61. <td><b><font face="Trebuchet MS" color="white" size="1">Password</font></b></td>
      62. <td><font face="Trebuchet MS" size="1"><b>
      63. <input type="password" name="password" maxlength="15" size="10" /></b></font></td>
      64. <td><b><font face="Trebuchet MS" color="white" size="1">Repeat </font></b></td>
      65. <td><font face="Trebuchet MS" size="1"><b>
      66. <input type="password" name="password2" maxlength="15" size="10" /></b></font></td>
      67. <td colspan="2" style="text-align: center;">
      68. <font size="1" face="Trebuchet MS"><b>
      69. <input type="submit" name="submit" value="Register" /></b></font></td>
      70. </tr>
      71. </table>
      72. </form>
      73. <?php
      74. if(ereg("^([a-zA-Z0-9_-])*$", $_POST['account']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password']) && ereg("^([a-zA-Z0-9_-])*$", $_POST['password2']))
      75. {
      76. if ($page="index.php" && $_POST['account'] && strlen($_POST['account'])<16 && strlen($_POST['account'])>3 && $_POST['password'] && $_POST['password2'] && $_POST['password']==$_POST['password2'])
      77. {
      78. $check=mysql_query("select * from accounts where username='".$_POST['account']."'");
      79. $check1=mysql_num_rows($check);
      80. if($check1>0)
      81. {
      82. echo "<p clss='error'><b>An account already with that login please try oneother </b></p>";
      83. }
      84. else
      85. {
      86. mysql_query("INSERT INTO accounts (username, password, accesslevel) VALUES ('".$_POST['account']."', '".base64_encode(pack('H*', sha1($_POST['password'])))."', 0)", $link);
      87. mysql_close($link);
      88. print '<p class="error"><b><center>Registration successful Have fun on our Flyff server</center></b></p>';
      89. }
      90. }
      91. else
      92. {
      93. print '<p class="error"><b> </b></p>'.mysql_error();
      94. }
      95. }
      96. else
      97. {
      98. echo "Error Plz try again.";
      99. }
      100. ?>
      101. </font>
      102. </body>
      103. </html>
      Alles anzeigen