'; $to = $form[5]; $subject = 'RPG Top List registration confirmation'; $message -> setTxtBody('Hello, ' . $form[2] . ' ' . $form[3] . "/n/n" . ' An account has recently been created using this email and ' . $form[6] . ' as password and is currently awaiting confirmation. To confirm enter your confirmation code: ' . $confirmcode . ' Enter it manually on www.rpgtoplist.com/register.php?step=confirm or go here: http://www.rpgtoplist.com/register.php?step=confirm&email=' . $form[5] . '&confirmcode=' . $confirmcode . ' If you have not created this account please go to http://www.rpgtoplist.com/register.php?step=cancel&email=' . $form[5] . '&confirmcode=' . $confirmcode . ' or do it manually with the above code. Our sincerest appologies for any discomfort this email may have caused you. Yours sincerely, Michaël Sluydts RPG Top List Management'); $message -> setHTMLBody('Hello, ' . $form[2] . ' ' . $form[3] . '

An account has recently been created using this email and ' . $form[6] . ' as password and is currently awaiting confirmation.

To confirm enter your confirmation code: ' . $confirmcode . ' Enter it manually on www.rpgtoplist.com/register.php?step=confirm or click here.

If you have not created this account please click here or do it manually with the above code. Our sincerest appologies for any discomfort this email may have caused you.


Yours sincerely,
Michaël Sluydts
RPG Top List Management'); $host = "mail.lotdhosting.com"; $username = "no-reply@rpgtoplist.com"; $password = "7890a3c"; $mailer= 'PHP/' . phpversion(); $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject, 'X-Mailer' => $mailer); $body = $message->get(); $headers = $message ->headers($headers); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("

" . $mail->getMessage() . "

"); } $form[8] = ucfirst($form[8]); $main = $main . '
' . $form[8] . ' Registration - Step 4
You have been registered and an email has been sent to your email containing your confirmation code. Please follow the instructions in the email to finish registration.
'; } break; case 3: $num = count($_POST['form']); for($i = 1; $i <= $num; $i++) { if((!$_POST['form'][$i]) && ($i < $num)) { $main = $main . '
Please fill in all fields.
'; $empty = 1; } $form[$i] = clean($_POST['form'][$i]); } if(($_POST['form'][6] != $_POST['form'][7]) && (!$empty)) { $main = $main . '
Your password and password verification did not match. Please enter them again.
'; break; } if(!$empty) { $type = ucfirst($_POST['form'][8]); $main = $main . '
' . $type . ' Registration - Step 3
Please confirm your details
Username:' . $form[1] . '
First name:' . $form[2] . '
Last name:' . $form[3] . '
Company:' . $form[4] . '
Email:' . $form[5] . '

Receive newsletter?' . $news . '
'; } break; case 2: if(!$_POST['form'][8]) { header("location: http://www.rpgtoplist.com/register.php"); } else { $type = ucfirst($_POST['form'][8]); $main = $main . '
' . $type . ' Registration - Step 2
Please fill in the following info
Username:
First name:
Last name:
Company:
Email:
Password:
Verify password:

Receive newsletter?
'; } break; default: if(($_GET['step'] == 'cancel') || ($_POST['step'] == 'cancel')) { if($_GET['email']) { $email=clean($_GET['email']); $confirmcode=clean($_GET['confirmcode']); } else { $email=clean($_POST['email']); $confirmcode=clean($_POST['confirmcode']); } $sql = @mysql_query("SELECT * FROM `accounts` WHERE `email` = '$email' AND `confirmcode` = '$confirmcode'"); $num = @mysql_num_rows($sql); if((!$_GET['confirmcode']) || (!$_GET['email'])) { $main = $main . '
Cancellation
Please fill in the form below:
Email:
Confirmation Code:
'; } elseif($num == 1) { if($_GET['confirm'] != 'Y') { $main = $main . '
Are you sure?
'; } else { @mysql_query("DELETE FROM `accounts` WHERE `email`='$_GET[email]' AND `confirmcode` = '$_GET[confirmcode]' AND `confirmed` = 'N'") or die (mysql_error()); $main = $main . '
Your account has now been cancelled. If you have any further questions please email admin@rpgtoplist.com
'; } } else { $main = $main . '
Your account could not be found. Either it never existed or the email owner deleted it.
'; } } elseif(($_GET['step'] == 'confirm') || ($_POST['step'] == 'confirm')) { if((!$_GET['confirmcode']) || (!$_GET['email'])) { $main = $main . '
Confirmation
Please fill in the form below:
Email:
Confirmation Code:
'; } else { $email = clean($_GET['email']); $confirmcode = clean($_GET['confirmcode']); $sql = @mysql_query("SELECT * FROM `accounts` WHERE `email` = '$email' AND `confirmcode` = '$confirmcode'"); $num=@mysql_num_rows($sql); if($num) { @mysql_query("UPDATE `accounts` SET `confirmed` = 'Y' WHERE `email` = '$email' AND `confirmcode` = '$confirmcode'") or die (mysql_error()); $main = $main . '
Your account has been confirmed. You can now login below.
Email:
Pass:
Disable Cookies
Disable IPGuard
'; } else { $main = $main . '
Your account could not be found. Either it never existed or the email owner deleted it.
'; } } } else { $main = $main . '
Registration - Step 1
What kind of account would you like to register? Player
Developer
'; } break; } include('footer.php'); ?>