Your IP has been logged."; // insert logging code here iffen you want; exit; } $mailheaders = ""; // just in case if ($username == "") { $logoutlink = ""; } else { $loginform = ""; $logoutlink = "| Log Out"; $notify = "$lang[loggedin]"; } if($status == 'Administrator') { $adminlink = "| admin"; } else { $adminlink = ""; } function aim_msg ($UserName) { ?> Send a message to
Download AIM 3.0AIM Remote
Send me an Instant Message
Add me to Your Buddy List
Join my Chat Room
Close This Window
Send a message to UIN:
Sender Name:

Sender EMail:

Message:

[ Close Window ]
$UserName is currently in use, please backup and select another username."; exit; } } // Creates Post Line if($icq != 0) $icq_add = "  "; $homepage = build_url($homepage); if($homepage != "") $homepage_add = " "; if($aim != "") $aim_add = " "; $post_line = $icq_add . $homepage_add . $aim_add; $post_line = addslashes($post_line); // $sql = "INSERT INTO members VALUES ('$UserName','$Password','" . time() . "','" . addslashes($signature) . "','$email','$timeoffset','" . addslashes($location) . "','" . addslashes($occupation) . "','" . addslashes($aim) . "','$homepage','" . addslashes($biography) . "','$icq','$allow_mod_email','$store_cookie','$show_email','$check_notification','$check_signature','Newbie','$prune','$avatar',0,'Inbox','" . strip_tags($cus_status) . "','$post_line','$impopup','0','$sex')"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); if ($store_cookie == "yes") { $time = time() + (60*60*24*365); } setcookie("username",$UserName,$time,$cookiepath); setcookie("password",crypt($Password, "BB"),$time,$cookiepath); setcookie("check_notification",$check_notification,$time,$cookiepath); setcookie("check_signature",$check_signature,$time,$cookiepath); setcookie("prunedays",$prune,$time,$cookiepath); setcookie("timeoffset",$timeoffset,$time,$cookiepath); redirect("$urltoforum", "Profile created! You will be redirected in two seconds. If you do not wish to wait, click here now."); exit; } elseif ($action == "viewprofile") { $sql = "SELECT * FROM members WHERE username='$UserName'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); $userinfo = mysql_fetch_array($query); $sql = "SELECT PID FROM post WHERE username='$UserName'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); $posts = mysql_num_rows($query); $UserName = $userinfo[username]; $email = $userinfo[email]; $location = $userinfo[location]; $occupation = $userinfo[occupation]; $aim = $userinfo[aim]; $homepage = "$userinfo[homepage]"; $biography = $userinfo[biography]; $icq = $userinfo[icq]; $status = $userinfo[status]; $cus_status = strip_tags($userinfo[cus_status]); $impopup = $userinfo[impopup]; if ($icq == 0) { $icq = ""; } if ($userinfo[show_email] == "no") { $email = "(private)"; } $register = date("F j, Y",$userinfo[register]+($foruminfo[timeoffset]*3600)); $navigation = "Index > Member Profile"; $newline = template("header.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("member_profile.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("footer.html"); eval("echo stripslashes(\"$newline\");"); exit; } elseif ($action == "modifyprofile") { checkid($UserName, $Password, "", ""); if ($store_cookie == "yes") { $time = time() + (60*60*24*365); } setcookie("check_notification",$check_notification,$time,$cookiepath); setcookie("check_signature",$check_signature,$time,$cookiepath); setcookie("timeoffset",$timeoffset,$time,$cookiepath); if($icq != 0) $icq_add = "\"Click \"Click "; $homepage = build_url($homepage); if($homepage != "") $homepage_add = "\"Click "; if($aim != "") $aim_add = "\"Click "; $post_line = $icq_add . $homepage_add . $aim_add; $post_line = addslashes($post_line); $sql = "UPDATE members SET password='$newpassword', signature='" . addslashes($signature) . "', email='$email', timeoffset='$timeoffset', location='" . addslashes($location) . "', occupation='" . addslashes($occupation) . "', aim='".addslashes($aim)."', homepage='$homepage', biography='" . addslashes($biography) . "', icq='$icq', allow_mod_email='$allow_mod_email', store_cookie='$store_cookie', show_email='$show_email', check_notification='$check_notification', check_signature='$check_signature', avatar='$avatar', post_line='$post_line', cus_status='" . strip_tags($cus_status) . "', impopup='$impopup', sex='$sex' WHERE username='$UserName'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); if (crypt($newpassword, "BB") != $Password) { setcookie("password"); } redirect("$urltoforum/index.php3?frame=index", "Profile edited! You will be redirected in two seconds. If you do not wish to wait, click here now."); } elseif ($action == "editprofile") { if (($UserName == "") OR ($Password == "")) { $navigation = "Index > Check Member ID"; $newline = template("header.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("member_checkid.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("footer.html"); eval("echo stripslashes(\"$newline\");"); exit; } checkid($UserName, $Password, "", ""); if ($password == "") { $password = crypt($Password, "BB"); } setcookie("check_signature","",0,$cookiepath); setcookie("check_notification","",0,$cookiepath); setcookie("timeoffset","",0,$cookiepath); $sql = "SELECT * FROM members WHERE username='$UserName'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); $member = mysql_fetch_array($query); // Some pre stuff for avatars $document_name = "editprofile"; $avatar_selection = "\n"; $UserName = $member[username]; $Password = $member[password]; $register= $member[register]; $signature = $member[signature]; $email = $member[email]; $location = $member[location]; $occupation = $member[occupation]; $aim = $member[aim]; $homepage = $member[homepage]; $biography = $member[biography]; $icq = $member[icq]; $allow_mod_email = $member[allow_mod_email]; $store_cookie = $member[store_cookie]; $prune = $member[prune]; $show_email = $member[show_email]; $status = $member[status]; $timeoffset = $member[timeoffset]; $cus_status = strip_tags($member[cus_status]); $impopup = ($member[impopup]); $osarr = array(1 => '-12', '-11', '-10', '-9', '-8', '-7', '-6', '-5', '-4', '-3', '-2', '-1', '0', '+1', '+2', '+3', '+4', '+5', '+6', '+7', '+8', '+9', '+10', '+11', '+12'); $osptime = time(); /* Begin Timezone selector code */ $ospop = ''; /* End Timezone selector code */ if ($member[check_signature] == "yes") { $sig_yes = "checked"; } else { $sig_no = "checked"; } /* Begin Sex Hack code */ $mssel = ''; $fssel = ''; if ($member[sex] == 0) { $mssel = 'selected'; } else { $fssel = 'selected'; } /* End Sex Hack code */ if ($member[check_notification] == "yes") { $notify_yes = "checked"; } else { $notify_no = "checked"; } if ($member[show_email] == "yes") { $showmail_yes = "checked"; } else { $showmail_no = "checked"; } if ($member[store_cookie] == "yes") { $cookie_yes = "checked"; } else { $cookie_no = "checked"; } if ($member[impopup] == 1) { $impopup = " yes no"; } else { $impopup = " yes no"; } $time = date("h:i A",time()); $navigation = "Index> Edit Profile"; $newline = template("header.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("member_editprofile.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("footer.html"); eval("echo stripslashes(\"$newline\");"); exit; } elseif ($action == "lostpass") { $navigation = "Index > Lost Password"; $newline = template("header.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("member_lostpass.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("footer.html"); eval("echo stripslashes(\"$newline\");"); exit; } elseif ($action == "email") { $user = $UserName; $navigation = "Index > Email a Member..."; $newline = template("header.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("member_mail_form.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("footer.html"); eval("echo stripslashes(\"$newline\");"); exit; } elseif ($action == "sendemail") { checkid($UserName, $Password, "", ""); $sql = "SELECT * FROM members WHERE username='$user'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); if ($memberinfo = mysql_fetch_array($query)) { $mailto = $memberinfo[email]; $mailto_name = $memberinfo[username]; $sql = "SELECT email FROM members WHERE username='$UserName'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); $memberinfo = mysql_fetch_array($query); $from = $memberinfo[email]; if ($use_smtp == 1) { require "smtp.php3"; $smtp=new smtp_class; $smtp->host_name="$SMTP"; $smtp->localhost="localhost"; if($smtp->SendMessage($from, array($mailto), array("From: $from", "To: $mailto", "Subject: $subject"), "Hello $mailto,\n\n$message\n") != 1) echo "Cound not send the message to $mailto_name.\nError: ".$smtp->error."\n"; } else { mail($mailto, $subject, $message, $mailheaders); } redirect("$urltoforum/index.php3?frame=index", "Email has been sent to $mailto_name! You will be redirected in two seconds. If you do not wish to wait, click here now."); exit; } else { echo "Sorry, but that email does not exist. Please back up and check the email you input into the form."; exit; } } elseif ($action == "passrequest") { $sql = "SELECT * FROM members WHERE email='$email'"; $query = mysql_db_query($database, $sql) or die(geterrdesc($sql)); if ($memberinfo = mysql_fetch_array($query)) { $mailto = $memberinfo[email]; $mailto_name = $memberinfo[username]; $mailsubject = "Password Requested"; $mailbody = "Someone requested for you password. Your password is $memberinfo[password].\n"; $mailbody .= "You can now relogin back into the site and continue what you were doing.\n"; $mailbody .= "Click $urltoforum to log back in now."; $from = $mailto; if ($use_smtp == 1) { require "smtp.php3"; $smtp=new smtp_class; $smtp->host_name=$SMTP; $smtp->localhost="localhost"; if($smtp->SendMessage($from, array($mailto), array("From: $from", "To: $mailto", "Subject: $mailsubject"), "Hello $mailto,\n\n$mailbody\n") != 1) echo "Cound not send the message to $mailto.\nError: ".$smtp->error."\n"; } else { mail($mailto, $mailsubject, $mailbody, $mailheaders); } redirect("$urltoforum", "Password has been sent to $email! Check your inbox for your password in the next few minutes. You will be redirected in two seconds. If you do not wish to wait, click here now."); exit; } else { echo "Sorry, but that email does not exist. Please back up and check the email you input into the form."; exit; } } elseif ($action == "aim") { if ($UserName == "") { echo "Sorry, AIM Messenging requires a username."; exit; } aim_msg(stripslashes($UserName)); } elseif ($action == "icq") { if ($from == "") { echo "Sorry, ICQ Messenging requires a username."; exit; } if ($uin == "") { echo "Sorry, ICQ Messenging requires a UIN."; exit; } icq_msg($uin, $from); } else { // Some pre stuff for avatars $document_name = "Register"; $avatar_selection = "\n"; $time = date("h:i A",time()+(0*3600)); $navigation = "Index > Register a New Account on $home_name"; $newline = template("header.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("member_form.html"); eval("echo stripslashes(\"$newline\");"); $newline = template("footer.html"); eval("echo stripslashes(\"$newline\");"); exit; } ?>