Files @ ffe4eed53549
Branch filter:

Location: DistRen/htdocs/add.php

ethanzonca
removed terrible stuff :D
<?php


$firstname = $_POST["firstname"];
$lastname = $_POST["lastname"];
$username = $_POST["username"];
$email = $_POST["email"];

$name = $firstname . "_" . $lastname;

# echo "useradd -M -c \"$name,$email\" -d /home/distren --gid 537 $username";



# passthru("sudo /usr/sbin/useradd -M -c \"$name,$email\" -d /home/distren -G distren $username", $return);

$regkey = md5(uniqid(rand(),TRUE));
$regdate = date("Y-m-d");
$db = mysql_connect("localhost", "distren", "008987");
mysql_select_db("distrenusers", $db);
$sql = "INSERT INTO users VALUES(NULL,'$username','$email','$name','$regdate','$regkey')";
mysql_query($sql);
print("<h2>The data was entered.... or so we hope</h2>\n");
echo "$regkey";

$header = "From:UserBot<userbot@protofusion.org>";
$subject = "Activate your DistRen Account";
$body = "Here is your DistRen activation code: $regkey \n This code will allow you to someday activate your account!";
mail($email, $subject, $body, $header);


# if($return == 9){
# echo "whoa, that username exists already! Please try something else!";
# }
# if($return == 0){
# echo "okay, you have been registered. Now you need to check your email, and follow the link in it.";
# }


?>