function deleteAllMessages() { if(confirm('Are you sure you want to delete all of your messages? This is irreversable!')){location.href = 'http://www.flashnetworkonline.net/rush/index.php?page=deleteallpm'; } } function deleteComic(comicid) { if(confirm('Are you sure you want to delete this comic? This is irreversable!')){location.href = 'http://www.flashnetworkonline.net/rush/index.php?page=admindeletecomic&id=' + comicid;} } "); $page = $_GET['page']; if (empty($_GET['page'])){ $page = "idx"; } ?>
|
Rush Animations (Replace) |
|
");
if ($page == "idx"){
$gethome = mysql_query("SELECT * FROM rush_pages WHERE id = '1'")or die("Home: ".mysql_error());
$home = mysql_fetch_array($gethome);
$home[body] = str_replace("\n", "
", $home[body]); echo $home[body]; } if ($page == "register"){ if ($_POST['reg']){ $user = $_POST['user']; $user = trim($user); $user = htmlspecialchars($user); $pass = $_POST['pass']; $pass = trim($pass); $pass = htmlspecialchars($pass); $cpass = $_POST['cpass']; $cpass = trim($cpass); $cpass = htmlspecialchars($cpass); $email = $_POST['email']; $email = trim($email); $email = htmlspecialchars($email); $cemail = $_POST['cemail']; $cemail = trim($cemail); $cemail = htmlspecialchars($cemail); $ip = $_SERVER['REMOTE_ADDR']; $hash = md5($pass); $showemail = $_POST['showemail']; $rand = rand("1, 100"); $add = "dfsdfsdfdsf"; $gen = $rand.$add; $val = sha1($gen); if (empty($user)){die("You must provide a username!");} if (empty($pass)){die("You must provide a password!");} if (empty($cpass)){die("You must confirm your password!");} if (empty($email)){die("You must provide a email!");} if (empty($cemail)){die("You must confirm your email!");} if ($pass != $cpass){die("Your passwords do not match!");} if ($email != $cemail){die("Your emails do not match!");} $subject = "Rush Animations Signup"; $date = date("m/d/y, g:i a"); $message = " Thanks for signing up at Rush Animations! Your registeration is almost complete, one final step will be to click the link we provide. Your information:\n Username: $user\n Password: $pass\n To finish, visit this URL: http://www.flashnetworkonline.net/rush/index.php?page=validate&val=$val\n Note! This is an automated message! "; mail($email, $subject, $message); $getusertbl = mysql_query("SELECT * FROM rush_users"); $getlegit = mysql_query("SELECT * FROM rush_users WHERE username = '$user'")or die("Legit: ".mysql_error()); $legit = mysql_num_rows($getlegit); if ($legit>0){die("Sorry, but that username is already in our database!");} mysql_query("INSERT INTO rush_users (`username`, `password`, `email`, `showemail`, `validate`, `ip`, `date`) VALUES('$user', '$hash', '$email', '$showemail', '$val', '$ip', '$date')"); echo("You have sucessfully registered! The final step will be to check your emails for the validation email. Remember, if you do not see it in your inbox, check your spam/junk mail folders!"); } if (!$_POST['reg']){ echo(" "); } } if ($page == "validate"){ $getval = mysql_query("SELECT * FROM rush_users WHERE `validate` = '$_GET[val]'")or die("GetValidationLol". mysql_error()); $valnum = mysql_num_rows($getval); $addval = addslashes($_GET['val']); if ($valnum == 0){die("Error! THere is no validation url with that in our database!");} $update = mysql_query("UPDATE rush_users SET validated = 'yes' WHERE validate = '$addval'")or die("Update:". mysql_error()); echo("You have sucessfully validated your account! You can now login."); } if ($page == "login"){ if ($_POST['login']){ $user = $_POST['user']; $user = htmlspecialchars($user); $pass = $_POST['pass']; $pass = md5($pass); $pass = htmlspecialchars($pass); $infoisreal = mysql_query("SELECT * FROM rush_users WHERE username = '$user' && password = '$pass'"); $info = mysql_num_rows($infoisreal); $userstat = mysql_fetch_array($infoisreal); $userstat = mysql_escape_string($userstat); if ($info == 0){ die("Sorry, but that information is incorrect! Please try again.");} if ($userstate['validated'] == "no"){die("Sorry, but your account is not validated! You must first validate it before you can use it.");} $_SESSION['rush_username'] = $user; $_SESSION['rush_password'] = $pass; setcookie("PHPSESSID", session_id(),time()+(60*60*24*5), "/", ""); echo("You have sucessfully logged in!"); } if (!$_POST['login']){ echo(" "); } } if ($page == "profile"){ if (isset($_SESSION['rush_username'])){ $logged = $_SESSION['rush_username']; $no = "no"; $getnew = mysql_query("SELECT * FROM `rush_pm` WHERE `to` = '$logged' && `read` = '$no'")or die("PM: ".mysql_error()); $new = mysql_num_rows($getnew); echo(" Welcome, $_SESSION[rush_username]! Edit Profile Portal Submitions Private Messages ($new New) Logout "); $getisadmin = mysql_query("SELECT * FROM rush_users WHERE username = '$_SESSION[rush_username]'")or die("Admin: ".mysql_error()); $isadmin = mysql_fetch_array($getisadmin); if ($isadmin[group] == 4){ echo(" [Admin Only Options] Admin CP Upload Comic Edit/Delete Comics //More to come "); } } if (!isset($_SESSION['rush_username'])){ echo(" Please, Login first! You must have an account for profile options! "); } } if ($page == "logout"){ unset($_SESSION['rush_username']); unset($_SESSION['rush_password']); session_destroy(); echo("You have sucessfully logged out."); } if ($page == "pm"){ if (!isset($_SESSION[rush_username])){die("You must be logged in to view your pms!");} echo(" Write PM | Delete All Messages "); $getpm = mysql_query("SELECT * FROM rush_pm WHERE `to` = '$_SESSION[rush_username]' ORDER BY id DESC")or die("PM: ".mysql_error()); $pmnum = mysql_num_rows($getpm); if ($pmnum == "0"){echo("Error! You have no PM's in your inbox!");} while($pm = mysql_fetch_array($getpm)){ $n++; echo(" $n. $pm[name], by $pm[by]"); if ($pm[read] == "no"){echo(" (Unread)");}echo(" "); } } if ($page == "viewpm"){ $getpm = mysql_query("SELECT * FROM rush_pm WHERE id = '$_GET[id]'")or die("Get: ".mysql_error()); $pmnum = mysql_num_rows($getpm); if ($getpm == "o"){die("Error! There is no pm with this in our database!");} $pm = mysql_fetch_array($getpm); $to1 = strtolower($pm[to]); $to2 = strtolower($_SESSION[rush_username]); if ($to1 != $to2){die("This pm was not sent to you!");} $dropline = "\n"; $pm[body] = str_replace($dropline, " ", $pm[body]); $read = mysql_query("UPDATE `rush_pm` SET `read` = 'yes' WHERE `id` = '$_GET[id]'")or die("Update: ".mysql_error()); if ($pm[type] == "reply"){ $reply = "[reply]"; $replystart = ""; $pm[body] = str_replace($reply, $replystart, $pm[body]); echo(" Reply- $pm[body] From $pm[by], on $pm[date] Reply? | Report? "); } if ($pm[type] == "msg"){ echo(" Message- $pm[body] From $pm[by], on $pm[date] Reply? | Report? "); } } if ($page == "writepm"){ if ($loggedin == false){ echo("Error! You must be logged in to write a pm!"); } if ($loggedin == true){ $sendto = $_GET['to']; if ($_POST['write']){ $name = $_POST['subject']; $by = $_POST['by']; $body = $_POST['body']; $type = "msg"; $date = date("m/d/y, g:i a"); $ip = $_SERVER['REMOTE_ADDR']; $to = $_POST['to']; $no = "no"; if (empty($name)){die("Error! Please enter something for the subject!");} if (empty($body)){die("Error! Please enter a message!");} if (empty($to)){die("Error! Please enter someone's name to send to!");} $checklegit = mysql_query("SELECT * FROM rush_users WHERE username = '$to'"); $legit = mysql_num_rows($checklegit); if ($legit == "0"){die("Error. The user, $to, does not exist in our database!");} $getid = mysql_query("SELECT * FROM rush_users WHERE username = '$_SESSION[rush_username]'")or die("id: ".mysql_error()); $id = mysql_fetch_array($getid); $insert = mysql_query("INSERT INTO rush_pm (`name`, `by`, `to`, `bid`, `date`, `body`, `ip`, `type`) VALUES('$name', '$_SESSION[rush_username]', '$to', '$id[id]', '$date', '$body', '$ip', '$type')")or die("Send: ".mysql_error()); echo("You have sucessfully PMed $to!"); } if (!$_POST['write']){ echo(" |