$passkey=''; $password=''; $submit=''; $lefts=''; $rights=''; $content=''; $mess=''; $default=170; @extract($_POST); $updatetime=date("l, F j, Y, g:i:s a T"); require_once("../includes/genericIncludes.inc"); function getName($n) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ($i = 0; $i < $n; $i++) { $index = rand(0, strlen($characters) - 1); $randomString .= $characters[$index]; } return $randomString; } if($passkey=="")$passkey=$password; if ($submit && $person!="" && $passkey!="") { $unique=true; $query1="select count(*) as 'cP' from users where persona='".$person."'"; $stm1 = $DBH->prepare($query1); $stm1->execute(); $nrows1 = $stm->rowCount(); $query2="select count(*) as 'pP' from users where passkey='".$passkey."'"; $stm2 = $DBH->prepare($query2); $stm2->execute(); $nrows2 = $stm2->rowCount(); if ($nrows1 > 0)$messe= '
That login is taken, please select another login.
'; if ($nrows2 > 0)$messp= 'That password is taken, please select another password.
'; if ($nrows1 >0 || $nrows2>0)$unique=false; if($unique) { $myverificationcode=getName(200); $query = "INSERT into users (verifyCode,persona,passkey,lastvisit) VALUES ('".$myverificationcode."','$person','$passkey',NOW())" or die(mysql_error()); $stm = $DBH->prepare($query); $stm->execute(); $emailBegin='© NexusNews Account Verification | Copyright © 1995-'.date("Y").' Nexus Inc. All rights reserved. |
An account was created with your email address at NexusNews.us. To complete the account setup process click on this link within the next 24 hours. If you did not create this account let us know and disregard this email.
'.$emailEnd; mail("",$hourday.date("l")." Weather and Forecast ",$emailNews, $headersN); $months = array('January','February','March','April','May','June','July ','August','September','October','November','December',); $headers = "Content-Type: text/html\n"; $headers .= "Content-Transfer-Encoding: 7bit;\n "; $headers .= "charset=iso-8859-1\n"; $headers .= "From: Nexus Account VerificationSee the news you want with none of the hype.
'.$messe.$messp.$form; } //end of submitted stuff } // Below is for initial load of this form ?>See the news you want, and none of the hype.