Advertisement
Guest User

Untitled

a guest
May 12th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. <?php
  2. require_once('config/raxezdev.php');
  3. include('inc/counter.php');
  4.  
  5. if (!function_exists("GetSQLValueString")) {
  6. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  7. {
  8. if (PHP_VERSION < 6) {
  9. $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  10. }
  11.  
  12. $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  13.  
  14. switch ($theType) {
  15. case "text":
  16. $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  17. break;
  18. case "long":
  19. case "int":
  20. $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  21. break;
  22. case "double":
  23. $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  24. break;
  25. case "date":
  26. $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  27. break;
  28. case "defined":
  29. $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  30. break;
  31. }
  32. return $theValue;
  33. }
  34. }
  35.  
  36. // reg form
  37. if ((isset($_POST["loginz"])) && (isset($_POST["passwordz"])) && (isset($_POST['emailz']))) {
  38. $insertSQL = sprintf("INSERT INTO accounts (login, password, email, banned, gm) VALUES (%s, %s, %s, %s, %s)",
  39. GetSQLValueString($_POST['loginz'], "text"),
  40. GetSQLValueString($_POST['passwordz'], "text"),
  41. GetSQLValueString($_POST['emailz'], "text"),
  42. GetSQLValueString(0, "int"),
  43. GetSQLValueString(0, "int"));
  44.  
  45. mysql_select_db($database_logon, $raxezdev);
  46. $Result1 = mysql_query($insertSQL, $raxezdev) or die(mysql_error());
  47. }
  48.  
  49. require('inc/mainphp.php');
  50.  
  51. include('inc/head.php'); ?>
  52.  
  53. <body>
  54. <div class="top"></div>
  55. <!-- wrapper -->
  56. <div class="wrapper">
  57. <?php include('inc/header.php'); ?>
  58.  
  59. <div class="nav">
  60. <?php include('inc/nav.php'); ?>
  61. </div>
  62.  
  63. <div class="middlebox">
  64. <?php include('inc/left.php'); ?>
  65. <?php include('inc/middle.php'); ?>
  66. <?php include('inc/right.php'); ?>
  67. </div>
  68.  
  69. <div class="leftcenter">
  70. <div class="lefttop"></div>
  71. <div class="leftmiddle">
  72. <span style="font-size:16px;color:#d26b27;"><center>Account creation</center></span><br />
  73. <?php if ((isset($_POST["loginz"])) && (isset($_POST["passwordz"])) && (isset($_POST['emailz']))) { echo "<center>Your account has been created!</center>"; } else { ?>
  74. <form id="registrationz" name="registration" method="post" action="<?php echo $editFormAction; ?>">
  75. <table width="200" border="0" align="center" cellpadding="2" cellspacing="0">
  76. <tr>
  77. <td>Username:</td>
  78. <td><label>
  79. <input name="loginz" type="text" class="topform" id="loginz" />
  80. </label></td>
  81. </tr>
  82. <tr>
  83. <td>Password:</td>
  84. <td><input name="passwordz" type="password" class="topform" id="passwordz" /></td>
  85. </tr>
  86. <tr>
  87. <td>E-mail:</td>
  88. <td><input name="emailz" type="text" class="topform" id="emailz" /></td>
  89. </tr>
  90. <tr>
  91. <td>&nbsp;</td>
  92. <td align="center"><label>
  93. <input name="registerz" type="submit" class="topbutton" id="registerz" value="Register!" />
  94. </label></td>
  95. </tr>
  96. </table>
  97. </form><?php } ?><br />
  98. <br />
  99. </div>
  100. <div class="leftbottom"></div>
  101. </div>
  102.  
  103. <br />
  104.  
  105. <?php include('inc/footer.php'); ?>
  106. </div>
  107. <!-- wrapper end -->
  108. </body>
  109. </html>
  110. <?php
  111.  
  112. mysql_free_result($shoutbox);
  113.  
  114. mysql_free_result($realmone);
  115.  
  116. mysql_free_result($nav);
  117.  
  118. mysql_free_result($settings);
  119. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement