Advertisement
Guest User

Untitled

a guest
Jan 26th, 2012
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.41 KB | None | 0 0
  1. <style type="text/css">
  2. <!--
  3. .style9 {font-size: 12px; font-weight: bold; font-family: Tahoma; color: #205980; }
  4. .style10 {
  5. font-size: 12px;
  6. font-family: Tahoma;
  7. }
  8. .style12 {color: #205980}
  9. .style13 {color: #FF0000}
  10. -->
  11. </style>
  12. <?
  13. include("functions.php");
  14. include("network.php");
  15. switch ($_GET["view"])
  16. {
  17. case "2";
  18. $id = $_GET["view"];
  19.  
  20. break;
  21. default:
  22. $username = "";
  23. $password = "";
  24. if (isset($_POST["Username"]) && isset($_POST["Password"]))
  25. {
  26. $username = $_POST["Username"];
  27. $password = $_POST["Password"];
  28. $password2 = $_POST["Password2"];
  29. $email = $_POST["Email"];
  30. $email2 = $_POST["Email2"];
  31. $first = $_POST["FirstName"];
  32. $last = $_POST["LastName"];
  33. $agree = $_POST["agree"];
  34. $gender = $_POST["select"];
  35. $number = 0;
  36. if($username == "")
  37. {
  38. $msg = "- Please enter a <b>username</b> you wish to use!<br>";
  39. }
  40. else
  41. {
  42. $number = $number + "1";
  43. }
  44. if($password == "")
  45. {
  46. $msg2 = "- Please enter a <b>password</b> you wish to use!<br>";
  47. }
  48. else
  49. {
  50. $number = $number + "1";
  51. }
  52. if($password2 == "")
  53. {
  54. $msg3 = "- Please repeat your <b>password</b> to verify its correct!<br>";
  55. }
  56. else
  57. {
  58. $number = $number + "1";
  59. }
  60. if($email == "")
  61. {
  62. $msg3 = "- Please enter your <b>email address</b>!<br>";
  63. }
  64. else
  65. {
  66. $number = $number + "1";
  67. }
  68. if($email2 == "")
  69. {
  70. $msg4 = "- Please repeat your <b>email address</b> to verify its correct!<br>";
  71. }
  72. else
  73. {
  74. $number = $number + "1";
  75. }
  76. if($first == "")
  77. {
  78. $msg5 = "- Please enter your <b>first name</b>!<br>";
  79. }
  80. else
  81. {
  82. $number = $number + "1";
  83. }
  84. if($last == "")
  85. {
  86. $msg6 = "- Please enter your <b>last name</b>!<br>";
  87. }
  88. else
  89. {
  90. $number = $number + "1";
  91. }
  92. if($agree == "")
  93. {
  94. $msg7 = "- Please agree to the <b>terms and conditions</b>!<br>";
  95. }
  96. else
  97. {
  98. $number = $number + "1";
  99. }
  100. if($email2 == $email)
  101. {
  102. $number = $number + "1";
  103. }
  104. else
  105. {
  106. $msg9 = "- Your <B>repeated email password</b> is incorrect!<br>";
  107. }
  108. if($password2 == $password)
  109. {
  110. $number = $number + "1";
  111. }
  112. else
  113. {
  114. $msg9 = "- Your <B>repeated password</b> is incorrect!<br>";
  115. }
  116. if($number < 10)
  117. {
  118. echo("<center><table style=\"border-collapse: collapse\" width=\"800\" height=\"49\" cellspacing=\"0\" cellpadding=\"5\" bordercolor=\"#FFCC00\" border=\"1\" bgcolor=\"#FFFF00\">
  119. <tbody>
  120. <tr>
  121. <td width=\"100%\" valign=\"middle\" class=\"style9\"><p align=\"left\"><span class=\"style13\"><B><font face=\"Tahoma\" size=\"1\" color=\"darkred\">$msg$msg2$msg3$msg4$msg5$msg6$msg7$msg8$msg9</font></center></span> </td>
  122. </tr>
  123. </tbody>
  124. </table></center></b><br>");
  125. }
  126. else
  127. {
  128. $check = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'");
  129. $check2 = mysql_num_rows($check);
  130. if($check2 > 0)
  131. {
  132. $msg10 = "- That <b>username</b> is already in use!<br>";
  133. }
  134. else
  135. {
  136. $number1 = $number1 + "1";
  137. }
  138. $dis = mysql_query("SELECT * FROM `users` WHERE `email` = '$email'");
  139. $dis2 = mysql_num_rows($dis);
  140. if($dis2 > 0)
  141. {
  142. $msg11 = "- That <b>email</b> is already in use!<br>";
  143. }
  144. else
  145. {
  146. $number1 = $number1 + "1";
  147. }
  148. if($number < 2)
  149. {
  150. echo("<center><table style=\"border-collapse: collapse\" width=\"800\" height=\"49\" cellspacing=\"0\" cellpadding=\"5\" bordercolor=\"#FFCC00\" border=\"1\" bgcolor=\"#FFFF00\">
  151. <tbody>
  152. <tr>
  153. <td width=\"100%\" valign=\"middle\" class=\"style9\"><p align=\"left\"><span class=\"style13\"><B><font face=\"Tahoma\" size=\"1\" color=\"darkred\">$msg10$msg11</font></center></span> </td>
  154. </tr>
  155. </tbody>
  156. </table></center></b><br>");
  157. }
  158. else
  159. {
  160. $alphanum = "ABCDEFGHIJKLMNPRSTUVWXYZabcdefghijklmnpqrstuvwxyz123456789";
  161. $id = substr(str_shuffle($alphanum), 0, 20);
  162. $ip = $_SERVER["REMOTE_ADDR"];
  163. $hostname = gethostbyaddr($ip);
  164. $date = date("d-m-Y");
  165. $picture = "http://e-mx.co.uk/pictures/logo2.png";
  166. $lowerusername = strtolower($username);
  167. $aboutpro = "This is a new profile![n]Did you know you could use special commands?[n][n]Theres lots to learn, so you best get learning, and earning them credits![n][n]E-mx Team";
  168. mysql_query("INSERT INTO `emx_emx`.`users` (`username`, `password`, `email`, `firstname`, `secondname`, `date`, `ip`, `hostname`, `id`, `gender`, `status`) VALUES ('$username', '$password', '$email', '$first', '$last', '$date', '$ip', '$hostname', '$id', '$gender', 'Pending')");
  169. mysql_query("INSERT INTO `emx_emx`.`profile` (`profilename`, `date`, `last`, `picture`, `id`, `status`, `name`, `about`) VALUES ('$username', '$date', '$date', '$picture', '$id', 'Pending', '$username', '$aboutpro')");
  170. $friends = mysql_query("SELECT * FROM `emx_emx`.`users` WHERE `username` = '$username'");
  171. $showfriends = mysql_fetch_array($friends);
  172. $userid = $showfriends["userid"];
  173.  
  174. $ourFileName = "/home/emx/public_html/friends/".$lowerusername.".txt";
  175. $fh = fopen($ourFileName, 'a+') or die("");
  176. $stringData = "disasterpiece";
  177. fwrite($fh, $stringData);
  178. fclose($fh);
  179.  
  180. $myFile = "/home/emx/public_html/friends/disasterpiece.txt";
  181. $fh = fopen($myFile, 'a+') or die("");
  182. $theData = fread($fh, filesize($myFile));
  183. $stringData = " ".$username;
  184. fwrite($fh, $stringData);
  185. fclose($fh);
  186.  
  187. mysql_query("INSERT INTO `friends` (`friendid`, `userid`, `rank`) VALUES ('1', '$userid', '1')");
  188. mysql_query("INSERT INTO `friends` (`friendid`, `userid`, `rank`) VALUES ('$userid', '1', '1')");
  189. mkdir("/home/emx/public_html/pictures/$lowerusername", 0777);
  190. ## header("Location: register.php?step=2&id=$id");
  191. echo("<center><table style=\"border-collapse: collapse\" width=\"800\" height=\"49\" cellspacing=\"0\" cellpadding=\"5\" bordercolor=\"#FFCC00\" border=\"1\" bgcolor=\"#FFFF00\">
  192. <tbody>
  193. <tr>
  194. <td width=\"100%\" valign=\"middle\" class=\"style9\"><p align=\"left\"><span class=\"style13\"><B><font face=\"Tahoma\" size=\"1\" color=\"darkred\">Registration Complete!!!</font></center></span> </td>
  195. </tr>
  196. </tbody>
  197. </table></center></b><br>");
  198. $headers = 'From: E-mx.co.uk ~ Verify E-Mail Address' . "\r\n" .
  199. 'Reply-To: DO NOT REPLY' . "\r\n";
  200.  
  201. mail($email,"E-mx.co.uk - Verify E-Mail Address","
  202. Dear $first,
  203.  
  204. Please in-order to cut down on spammers, Please verify your e-mail address.
  205. If your address isn't verified within 10 days of registration your account will be automatically deleted.
  206. Copy the url below, to verify your e-mail.\n
  207. http://e-mx.co.uk/index.php?page=verify&id=$id
  208.  
  209. Your login details are below!\n
  210. Your username: $username
  211. Your password: $password
  212.  
  213. Thank you for registrating on E-mx.co.uk!
  214.  
  215. E-mx Admins
  216. admins@e-mx.co.uk
  217. ",$headers);
  218. echo("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; URL=index.php\">");
  219. }
  220. }
  221. }
  222. }
  223. include("regform.php");
  224. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement