1?"Anonymous_".$id:$email; $email="Anonymous_".$id==$username2?$email:""; $vercode=$email==""?RndStr(4):$vercode; $names=array(0=>"userid","username","email","password","vercode","level","first_login","last_login","is_online"); $values=array(0=> $id,$username2,clean($email),md5($pass),$vercode,$level,"'now()'","'now()'",0); SqlCreateRow("user_simple",$names, $values); $names=array(0=>"userid","conversations","current_conv","changed_name","signaled"); $values=array(0=> $id,0,0,0,0); SqlCreateRow("user_bogpsg",$names, $values); if (strlen($vercode) > 4) { $query="INSERT INTO `page_access` (`page`, `filename`, `visits`, `flags`) VALUES ('?register&verify=".$id."', 'restricted/register.php', 0, 'include_htmlbody=1 include_redir=1 must_logout=1 log_all=1');"; $result=mysql_query($query, $db_id); if (!$result) { echo("Failed page_access. ".mysql_error()); return 0; } } if (strlen($vercode) > 4) { $headers = "MIME-Version: 1.0 \n"; $headers .= "From:\"".$site_name."\" <".$admin_email."> \n"; $headers .= "X-Sender:".$site_name." <".$admin_email."> \n"; $headers .= "X-Mailer:ffzt.net \n"; $headers .= "X-Priority:3 \n"; $headers .= "Return-Path: <".$admin_email."> \n"; $headers .= "Content-Type:text/html;charset=iso-8859-1 \n"; $message = "Store and mark this message for future reference.\n\n"; $message .= "Our site is called: ".$site_url."\n\n"; $message .= "Your e-mail is: ".$email."\n"; $message .= "Your internal id is: ".$id."\n"; $message .= "Your username is: Anonymous_".$id."\n"; $message .= "Your password is: ".$pass."\n\n"; $message .= "You can log in using any of these\n\n"; $message .= "To start using our site goto this link:\n"; $message .= $site_url."?register&verify=".$id."&".$id."=".$vercode."\n\n"; $message .= "See you soon!"; $mail_fn=mail($email,"Talk to God online!",$message,$headers); } $headers = "MIME-Version: 1.0 \n"; $headers .= "From:\"".$site_name."\" <".$admin_email."> \n"; $headers .= "X-Sender:".$site_name." <".$admin_email."> \n"; $headers .= "X-Mailer:ffzt.net \n"; $headers .= "X-Priority:3 \n"; $headers .= "Return-Path: <".$admin_email."> \n"; $headers .= "Content-Type:text/html;charset=iso-8859-1 \n"; $newuser=$email==""?$username2:$email; $message = $newuser." Just signed up\n\n"; $message .= "He's using ".$_SERVER["HTTP_USER_AGENT"]."\n\n"; $message .= "Click ".$site_url."?".$id." to chat\n\n"; $message .= "See you soon!"; $mail_fn=mail($admin_email,"BogPSG has a new user!",$message,$headers); // echo("

Welcome. We come in peace

We will now attempt to verify your identity.
Check your e-mail for further instructions

You can close this window now."); return $id; } // password reset mail function function resetpassemail($email) { global $db_id; $user=GetUser($email); // $id = "(".$area.")"." ".RndInt(3)."-".$range1." ".$range2; $id=$user[0]; $vercode = RndStr(13); SqlSetCol("user_simple","userid",$id,"vercode",$vercode); $headers = "MIME-Version: 1.0 \n"; $headers .= "From:".$admin_email." \n"; $headers .= "X-Sender:".$site_name."<".$admin_email."> \n"; $headers .= "X-Mailer:ffzt.net \n"; $headers .= "X-Priority:3 \n"; $headers .= "Return-Path: <".$admin_email."> \n"; $headers .= "Content-Type:text/html;charset=iso-8859-1 \n"; $message = "Store and mark this message for future reference.\n\n"; $message .= "A request has been made to change your password at: ".$site_url."\n\n"; $message .= "Your e-mail is: ".$email."\n"; $message .= "Your internal id is: ".$id."\n"; $message .= "Your username is: ".$name."\n\n"; $message .= "If you initiated this request and want to reset your password, goto this link:\n"; $message .= $site_url."?forgot&user=".$email."&verify=".$vercode."\n\n"; $message .= "If you didn't forget your password, goto this link:\n"; $message .= $site_url."?register&verify=".$id."&".$id."=".$vercode."\n\n"; $message .= "Stay safe!"; $mail_fn=mail($email,"Did you forget your password?",$message,$headers); echo("Check your e-mail for further instructions"); } function Impulse() { if (strlen($_SESSION["cookie"]["last_response"]) > 0) { if ($_SESSION["cookie"]["idletime"] == 1 && RandBool(15/1)) return 1; if ($_SESSION["cookie"]["idletime"] == 2 && RandBool(25/1)) return 1; if ($_SESSION["cookie"]["idletime"] == 3 && RandBool(45/1)) return 1; if ($_SESSION["cookie"]["idletime"] == 4 && RandBool(55/1.5)) return 1; if ($_SESSION["cookie"]["idletime"] == 5 && RandBool(55/2.5)) return 1; if ($_SESSION["cookie"]["idletime"] == 6 && RandBool(55/3.5)) return 1; if ($_SESSION["cookie"]["idletime"] == 7 && RandBool(55/4.5)) return 1; if ($_SESSION["cookie"]["idletime"] == 8 && RandBool(55/3.5)) return 1; if ($_SESSION["cookie"]["idletime"] == 9 && RandBool(75/2.5)) $_SESSION["cookie"]["idletime"]=0; } return 0; } ?>