The Zbang! "episode 0" beta is now available for download to a small number of our registered users !
To receive your download link, please fill out the following details :
"; $db = mysqli_connect("localhost", "zbeng", "GAXlDEkIjIx6RUJs", "zbeng"); $BadStuff = array(); $BadStuff["username"] = $_POST["username"] == ""; $BadStuff["lastname"] = $_POST["lastname"] == ""; $BadStuff["firstname"] = $_POST["firstname"] == ""; $BadStuff["password"] = $_POST["password"] == ""; $BadStuff["password2"] = $_POST["password2"] == ""; $BadStuff["email"] = $_POST["email"] == ""; $BadStuff["InvalidPwd"] = !($_POST["password"] == $_POST["password2"]); // if (!preg_match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST["email"])) { $email = $_POST["email"]; if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $BadStuff["InvalidEmail"] = true; } $checkline = "SELECT * from EngSiteUsers WHERE username = '${_POST["username"]}'"; $checkresult = mysqli_query($db,$checkline); if (!$checkresult) printf("%s",mysqli_error()); if (mysqli_num_rows($checkresult ) > 0) { $BadStuff["UserTaken"]= true; } $anybad = false; // check if there's any bad stuff and make anybad true foreach ($BadStuff as $a) { if ($a) $anybad = true; } if ($anybad) { Redify(true,"Please fill the missing or incorrent form items:"); echo "
"; WriteForm($BadStuff); } else { $now = date("Y-m-d H:i:s"); $entry = "INSERT into EngSiteUsers(username, firstname, lastname, password, email, city, country, hearabout, birthday, signupdate) values ('${_POST['username']}', '${_POST['firstname']}', '${_POST['lastname']}', '${_POST['password']}', '${_POST['email']}', '${_POST['city']}', '${_POST['country']}', '${_POST['hearabout']}', '${_POST['birthDay']}-${_POST['birthMonth']}-${_POST['birthYear']}', '$now')"; //printf("%s
",$entry); $result = mysqli_query($db,$entry); //printf("%s",$result); if (!$result) printf("%s",mysqli_error()); echo "Thanks for registering.
An email has been sent to you with further downloading instructions.
We hope you'll enjoy \"Zbang! Episode 0 (BETA DEMO)\"
\n"; $hash = md5($_POST["username"].'corbomite'); $confirmLink = "http://corbomitegames.com/zbang/downloadgame.php?username=${_POST["username"]}&code=$hash"; $mail_message = " Corbomite games, Zbang beta registration confirmation

Thank you for regisering to our beta.
You can go ahead and downlaod Zbang! Episode 0 (DEMO BETA) using this link:
$confirmLink

This is your download code to be used for downloading:
$hash
The Corbomite Games team.
"; // Adding extra headers $headers = 'Content-type: text/html; charset=windows-1255' ."\n"; $headers .= 'From: noreply@corbomitegames.com' . "\n"; $subject = 'Corbomite Games - Zbang registration confirmation'; // Sending the Email $mailres = mail($_POST["email"], $subject , $mail_message, $headers ); if (!$mailres) echo "
Error sending mail"; else echo "
You will get our email with the download link shortly.
"; } } /* puts a red around $content if $conditoin is true */ function Redify($condition,$content) { if ($condition) { echo '' . $content . ''; } else { echo $content; } } function WriteForm($BadStuff) { //var_dump($BadStuff); ?>
 
Username: ">
First Name: ">
Last Name: ">
 
Email: ">
Password: ">
Retype Password: ">
Birthday: Day: "> Month: Year:">
City: ">
Country: ">
How did you hear about Zbang! the game?:
  I have read and agree to the terms in the EULA and that by suppling us your email address and clicking accept, you agree to receive emails from us regarding our company, products, all other news, promotions, and letters from us and our partners and other such cool stuff!.