Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- <!--
- .style9 {font-size: 12px; font-weight: bold; font-family: Tahoma; color: #205980; }
- .style10 {
- font-size: 12px;
- font-family: Tahoma;
- }
- .style12 {color: #205980}
- .style13 {color: #FF0000}
- -->
- </style>
- <?
- include("functions.php");
- include("network.php");
- switch ($_GET["view"])
- {
- case "2";
- $id = $_GET["view"];
- break;
- default:
- $username = "";
- $password = "";
- if (isset($_POST["Username"]) && isset($_POST["Password"]))
- {
- $username = $_POST["Username"];
- $password = $_POST["Password"];
- $password2 = $_POST["Password2"];
- $email = $_POST["Email"];
- $email2 = $_POST["Email2"];
- $first = $_POST["FirstName"];
- $last = $_POST["LastName"];
- $agree = $_POST["agree"];
- $gender = $_POST["select"];
- $number = 0;
- if($username == "")
- {
- $msg = "- Please enter a <b>username</b> you wish to use!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($password == "")
- {
- $msg2 = "- Please enter a <b>password</b> you wish to use!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($password2 == "")
- {
- $msg3 = "- Please repeat your <b>password</b> to verify its correct!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($email == "")
- {
- $msg3 = "- Please enter your <b>email address</b>!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($email2 == "")
- {
- $msg4 = "- Please repeat your <b>email address</b> to verify its correct!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($first == "")
- {
- $msg5 = "- Please enter your <b>first name</b>!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($last == "")
- {
- $msg6 = "- Please enter your <b>last name</b>!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($agree == "")
- {
- $msg7 = "- Please agree to the <b>terms and conditions</b>!<br>";
- }
- else
- {
- $number = $number + "1";
- }
- if($email2 == $email)
- {
- $number = $number + "1";
- }
- else
- {
- $msg9 = "- Your <B>repeated email password</b> is incorrect!<br>";
- }
- if($password2 == $password)
- {
- $number = $number + "1";
- }
- else
- {
- $msg9 = "- Your <B>repeated password</b> is incorrect!<br>";
- }
- if($number < 10)
- {
- echo("<center><table style=\"border-collapse: collapse\" width=\"800\" height=\"49\" cellspacing=\"0\" cellpadding=\"5\" bordercolor=\"#FFCC00\" border=\"1\" bgcolor=\"#FFFF00\">
- <tbody>
- <tr>
- <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>
- </tr>
- </tbody>
- </table></center></b><br>");
- }
- else
- {
- $check = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'");
- $check2 = mysql_num_rows($check);
- if($check2 > 0)
- {
- $msg10 = "- That <b>username</b> is already in use!<br>";
- }
- else
- {
- $number1 = $number1 + "1";
- }
- $dis = mysql_query("SELECT * FROM `users` WHERE `email` = '$email'");
- $dis2 = mysql_num_rows($dis);
- if($dis2 > 0)
- {
- $msg11 = "- That <b>email</b> is already in use!<br>";
- }
- else
- {
- $number1 = $number1 + "1";
- }
- if($number < 2)
- {
- echo("<center><table style=\"border-collapse: collapse\" width=\"800\" height=\"49\" cellspacing=\"0\" cellpadding=\"5\" bordercolor=\"#FFCC00\" border=\"1\" bgcolor=\"#FFFF00\">
- <tbody>
- <tr>
- <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>
- </tr>
- </tbody>
- </table></center></b><br>");
- }
- else
- {
- $alphanum = "ABCDEFGHIJKLMNPRSTUVWXYZabcdefghijklmnpqrstuvwxyz123456789";
- $id = substr(str_shuffle($alphanum), 0, 20);
- $ip = $_SERVER["REMOTE_ADDR"];
- $hostname = gethostbyaddr($ip);
- $date = date("d-m-Y");
- $picture = "http://e-mx.co.uk/pictures/logo2.png";
- $lowerusername = strtolower($username);
- $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";
- 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')");
- mysql_query("INSERT INTO `emx_emx`.`profile` (`profilename`, `date`, `last`, `picture`, `id`, `status`, `name`, `about`) VALUES ('$username', '$date', '$date', '$picture', '$id', 'Pending', '$username', '$aboutpro')");
- $friends = mysql_query("SELECT * FROM `emx_emx`.`users` WHERE `username` = '$username'");
- $showfriends = mysql_fetch_array($friends);
- $userid = $showfriends["userid"];
- $ourFileName = "/home/emx/public_html/friends/".$lowerusername.".txt";
- $fh = fopen($ourFileName, 'a+') or die("");
- $stringData = "disasterpiece";
- fwrite($fh, $stringData);
- fclose($fh);
- $myFile = "/home/emx/public_html/friends/disasterpiece.txt";
- $fh = fopen($myFile, 'a+') or die("");
- $theData = fread($fh, filesize($myFile));
- $stringData = " ".$username;
- fwrite($fh, $stringData);
- fclose($fh);
- mysql_query("INSERT INTO `friends` (`friendid`, `userid`, `rank`) VALUES ('1', '$userid', '1')");
- mysql_query("INSERT INTO `friends` (`friendid`, `userid`, `rank`) VALUES ('$userid', '1', '1')");
- mkdir("/home/emx/public_html/pictures/$lowerusername", 0777);
- ## header("Location: register.php?step=2&id=$id");
- echo("<center><table style=\"border-collapse: collapse\" width=\"800\" height=\"49\" cellspacing=\"0\" cellpadding=\"5\" bordercolor=\"#FFCC00\" border=\"1\" bgcolor=\"#FFFF00\">
- <tbody>
- <tr>
- <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>
- </tr>
- </tbody>
- </table></center></b><br>");
- $headers = 'From: E-mx.co.uk ~ Verify E-Mail Address' . "\r\n" .
- 'Reply-To: DO NOT REPLY' . "\r\n";
- mail($email,"E-mx.co.uk - Verify E-Mail Address","
- Dear $first,
- Please in-order to cut down on spammers, Please verify your e-mail address.
- If your address isn't verified within 10 days of registration your account will be automatically deleted.
- Copy the url below, to verify your e-mail.\n
- http://e-mx.co.uk/index.php?page=verify&id=$id
- Your login details are below!\n
- Your username: $username
- Your password: $password
- Thank you for registrating on E-mx.co.uk!
- E-mx Admins
- admins@e-mx.co.uk
- ",$headers);
- echo("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"3; URL=index.php\">");
- }
- }
- }
- }
- include("regform.php");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement