include '../connect/sqlconnect.php';
include '../include/navigation.php';
include '../include/layout.php';
include '../include/User.php';
if ($_GET[s]=="Register")
{
$error = "";
if (!CheckUserName($_POST[UserName]))
{
$error .= "That Username has already been taken. Please choose a different one.
";
}
if (!CheckPassword($_POST[UserPassword],$_POST[UserPassword2]))
{
$error .= "Your passwords do not match or are empty.
";
}
if ((empty($_POST[FirstName]))||(empty($_POST[LastName]))||(empty($_POST[Email]))||(empty($_POST[Address1]))||(empty($_POST[City]))||(empty($_POST[PostalCode]))||(empty($_POST[ProvinceID]))||(empty($_POST[CountryID])))
{
$error .= "Please fill in all required fields.
";
}
if (empty($error))
{
RegisterNewUser($_POST);
?>
die();
}
} // end if s=Register
if ($_GET[s]=="SendEmail")
{
SendActivationEmail($_GET[UserName],$_GET[Email]);
}// end if SendEmail
if ($_GET[s]=="Activate")
{
$sql = "Update unipageone.WebUsers SET Active = 1 WHERE UserName = '$_GET[UserName]'";
mssql_query($sql) or die();
SetUnipageCookies($_GET[UserName]);
}// end if Activate
?>