Advertisement
Guest User

boiow

a guest
Jan 19th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.64 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <script type="text/javascript">
  4.             $(function(){
  5.                 $(".eventtest").click(function(){
  6.                     alert("click through!");
  7.                 });
  8.             });
  9.         </script>
  10.         <style>
  11.             body {font-family: Arial,sans-serif;}
  12.             h1 {font-size: 30pt;}
  13.             h2 {font-size: 16pt; margin: 1em 0;}
  14.             h1, h2 {font-family: Helvetica,Arial,sans-serif;}
  15.             dt {
  16.                 font-weight: bold;
  17.                 margin: 1em 0 0 0;
  18.             }
  19.             dd {
  20.                 font-weight: normal;
  21.                 margin: 0.2em 0 0.5em 0;
  22.                 padding: 0;
  23.                 width: 42em;
  24.             }
  25.             p {
  26.                 margin: 0.2em 0 0.5em 0;
  27.                 width: 42em;
  28.             }
  29.             .eventtest {
  30.                 width: 155px;
  31.                 height: 75px;
  32.                 background: #00f;
  33.                 cursor: pointer;
  34.                 position: Center;
  35.                 top: 20px;
  36.                 right: 150px;
  37.                 padding: 15px;
  38.             }
  39.         </style>
  40.             </head>
  41. <body>
  42. <center>
  43. <form id="register" action="?do=register" method=post>
  44. <center>
  45. </br>
  46. </br>
  47. </br>
  48. <font color='white'>Name - Lower Case</font>
  49. <br>
  50. <input class="input_box" type=text name=login><br>
  51. <font color='white'>Password</font> <br>
  52. <input class="input_box" type=password name=passwd><br>
  53. <font color='white'>Repeat Password</font> <br>
  54. <input class="input_box" type=password name=repasswd><br>
  55. <font color='white'>E-Mail Address</font> <br>
  56. <input class="input_box" type=text name=email><br>
  57. <input class="input_submit" type=submit name=submit value="Register"><br>
  58. </table>
  59. </form>
  60. </body>
  61. </html>
  62. <?php
  63. $ipcheck=$_SERVER['REMOTE_ADDR'];
  64. error_reporting(0);
  65. $config = array
  66. (
  67.         'host'  =>  '192.168.200.128', 
  68.         'user'  =>  'timore',          
  69.         'pass'  =>  'Skipper3lite1989',
  70.         'name'  =>  'shengui',         
  71.         'gold'  =>  '10000',               
  72. );
  73.  
  74.     if (isset($_POST['login']))
  75.         {
  76.             $link = mysql_connect($config['host'], $config['user'], $config['pass']) or die ("Can Not Connect To MySQL");
  77.             mysql_select_db($config['name'], $link) or die ("ERROR ".$DBName." Is not able to be accessed o_O");
  78.            
  79.             $Login = $_POST['login'];
  80.             $Pass = $_POST['passwd'];
  81.             $Repass = $_POST['repasswd'];
  82.             $Email = $_POST['email'];
  83.            
  84.             $Login = StrToLower(Trim($Login));
  85.             $Pass = StrToLower(Trim($Pass));
  86.             $Repass = StrToLower(Trim($Repass));
  87.             $Email = Trim($Email);
  88.  
  89.         if (empty($Login) || empty($Pass) || empty($Repass) || empty($Email))
  90.             {
  91.                 echo "Please Don't Leave Blank Field";
  92.             }
  93.            
  94.         elseif (ereg("[^0-9a-zA-Z_-]", $Login, $Txt))
  95.             {
  96.                 echo "Invalid Login Format";
  97.             }
  98.            
  99.         elseif (ereg("[^0-9a-zA-Z_-]", $Pass, $Txt))
  100.             {
  101.                 echo "Invalid Password Format";
  102.             }
  103.            
  104.         elseif (ereg("[^0-9a-zA-Z_-]", $Repass, $Txt))
  105.             {
  106.                 echo "Passwords Do Not Match";
  107.             }
  108.            
  109.         elseif (StrPos('\'', $Email))
  110.             {
  111.                 echo "Invalid E-Mail Format";
  112.             }
  113.            
  114.         elseif ((StrLen($Login) < 4) or (StrLen($Login) > 10))
  115.             {
  116.                 echo "Username must be at least 4 and no more than 10 line length.";
  117.             }
  118.                     else
  119.             {
  120.                 $Result = MySQL_Query("SELECT name FROM users WHERE name='$Login'") or ("Can't execute query.");
  121.                
  122.         if (MySQL_Num_Rows($Result))
  123.             {
  124.                 echo "<font color='red'>Login</font> <b>".$Login."</b> <font color='red'>Account Already Exists In Database</font>";
  125.             }
  126.            
  127.         elseif ((StrLen($Pass) < 4) or (StrLen($Pass) > 10))
  128.             {
  129.                 echo "The password must be at least 4 and no more than 10 letters long.";
  130.             }
  131.            
  132.         elseif ((StrLen($Repass) < 4) or (StrLen($Repass) > 10))
  133.             {
  134.                 echo "Confirm password must be at least 4 and no more than 10 letters long.";
  135.             }
  136.            
  137.         elseif ((StrLen($Email) < 4) or (StrLen($Email) > 25))
  138.             {
  139.                 echo "Email must be at least 4 and no more than 25 letters long.";
  140.             }
  141.         else
  142.             {
  143.                 $Result = MySQL_Query("SELECT name FROM users WHERE name='$Email'") or ("Can't execute query. Select E-Mail");
  144.         if (MySQL_Num_Rows($Result))
  145.             {
  146.                 echo "<font color='red'>E-Mail</font> <b>".$Email."</b> <font color='red'>Has already been Registered.</font>";
  147.             }
  148.            
  149.         elseif ($Pass != $Repass)
  150.             {
  151.                 echo "Passwords Do Not Match";
  152.             }        
  153.         else
  154.             {
  155.             $Salt = $Login.$Pass;
  156.             $Salt = md5($Salt);
  157.             $Salt = "0x".$Salt;
  158.             MySQL_Query("call adduser('$Login', $Salt, '0', '0', '0', '0', '$Email', '0', '0', '0', '0', '0', '0', '0', '', '', $Salt)") or die ("Can't execute query.");
  159.                 $mysqlresult=MySQL_Query("select * from `users` WHERE `name`='$Login'");
  160.                 $User_ID=MySQL_result($mysqlresult,0,'ID');
  161.                 MySQL_Query("INSERT INTO `gs1_clone` VALUES ('$Login', '$ipcheck', '$Email');") or die ("MYSQL ERROR GS1_CLONE Database Error");
  162.    
  163.                 echo "User: <b>".$Login." ~";
  164.                 echo "Pass: <b>".$Pass." ~";
  165.                 echo "Email: <b>".$Email." ~";
  166.                 echo "<font color='green'>Account <b>".$Login." Success!";
  167.                 echo "Encrypted Pass: ".$Login." </br> Keep a Copy!"
  168.                 }
  169.             }
  170.         }
  171.     }
  172.  echo $Data;
  173. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement