Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_COOKIE['Username']) {
- $username = $_COOKIE['Username'];
- // SET UP
- $status = strip_tags($_POST['status']);
- $ID = $_GET['id'];
- $DeleteStatus = $_GET['username'];
- $warn_username = $_GET['warn_username'];
- $BanUser = $_GET['user'];
- $Comment = strip_tags($_POST["Comment"]);
- $StatusId = $_POST["StatusID"];
- $connect=mysql_connect("localhost","405587","22395001440120");
- $db=mysql_select_db("405587");
- // Track User
- $track=mysql_query("SELECT*from track WHERE username='$username'")
- or die("Failed To Connect....");
- $user=mysql_fetch_array($track);
- $OnlineName = $user["username"];
- $TrackTime = date("m/d/y h:i A");
- $Place = "Viewing Status";
- if ($username == $OnlineName) {
- mysql_query("UPDATE track SET time = '$TrackTime', place='$Place' WHERE username = '$username'");
- }
- else {
- $sql = MYSQL_QUERY("INSERT INTO track (username, time, place) VALUES ('$username','$TrackTime','$Place')");
- if(!$sql) { die(mysql_error()); }
- }
- // SELECT FROM THESE TABLES
- // SELECT FROM BANNED
- $ban=mysql_query("SELECT*from banned WHERE username='$username'")
- or die("Failed To Connect...");
- $banned=mysql_fetch_array($ban);
- $bannedusername = $banned[username];
- // SELECT FROM PROFILES
- $result=mysql_query("SELECT*from profiles WHERE username='$username'")
- or die("Failed To Connect...");
- $worked=mysql_fetch_array($result);
- $sig=$worked[sig];
- $Icon=$worked[icon];
- $Points = $worked['points'];
- $PointAdd = ($Points) + 1;
- // SELECT FROM USERS
- $result=mysql_query("SELECT*from users WHERE username='$username'")
- or die("Failed To Connect...");
- $worked=mysql_fetch_array($result);
- $rank=$worked[rank];
- $Fav=$worked[Fav];
- // CHECK IF USER IS BANNED,
- if ($username == $bannedusername) {
- header ("location: Index.php"); }
- else {}
- // OVERLORD, CO-OVERLORD, OVERLORD ADMIN,
- // AND ADMIN CONTROLS
- // DELETE STATUS
- if ($ID&&$DeleteStatus&$rank) {
- mysql_query("DELETE FROM status WHERE id='$ID' AND username='$DeleteStatus'");
- header ("location: Status.php"); }
- else {}
- // WARN USER
- if ($warn_username&$rank) {
- $sql = MYSQL_QUERY("INSERT INTO status (id, username, status, rank, time, icon, sig) VALUES ('NULL','$username','<red>Warning $warn_username</red>','$rank','$time','$Icon','$sig')");
- header ("location: Status.php");
- if(!$sql) { die(mysql_error()); } }
- else {}
- // BAN USER
- if ($BanUser&$rank&$username) {
- $sql = MYSQL_QUERY("INSERT INTO banned (id, username, admin) VALUES ('NULL','$BanUser','$username')");
- if(!$sql) { die(mysql_error()); }
- // CONNECTED WITH BAN ABOVE
- // THIS POSTS THE BAN
- $sql = MYSQL_QUERY("INSERT INTO status (id, username, status, rank, time, icon, sig) VALUES ('NULL','SocialHubBot','<red>$BanUser Has Been Banned By $username</red>','AdminBot','$time','/images/SHB.png','Im SocialHub AdminBot!')");
- header ("location: Status.php");
- if(!$sql) { die(mysql_error());} }
- else {}
- // CHECK VARIABLES AND OR REPLACE THEM
- if ($Fav == "") {
- $Fav = "Blue"; }
- if ($sig == "") {
- $sig = "Nothing..."; }
- if ($Icon == "") {
- $Icon = "/Avatars/default.png"; }
- if ($Fav == "summer") {
- $Fav = "lightgreen"; }
- // INPUT STATUS
- if ($username&&$status) {
- if ($status == "/away") {
- $sql = MYSQL_QUERY("INSERT INTO status (id, username, status, rank, time, icon, sig) VALUES ('NULL','$username','<red>$username Has Left SocialHub :: Status</red>','$rank','$time','$Icon','$sig')");
- if(!$sql) { die(mysql_error()); } }
- else {
- header ("location: Status.php");
- $sql = MYSQL_QUERY("INSERT INTO status (id, username, status, rank, time, icon, sig) VALUES ('NULL','$username','$status','$rank','$time','$Icon','$sig')");
- $sql = MYSQL_QUERY("UPDATE profiles SET points = '$PointAdd' WHERE username='$username'");
- if(!$sql) { die(mysql_error()); } } }
- if ($Comment) {
- header ("location: Status.php");
- $sql = MYSQL_QUERY("INSERT INTO scomments (id, username, statusid, comment) VALUES ('NULL','$username','$StatusId','$Comment')"); }
- echo "
- <html>
- <head>
- <title>:: SocialHub - Status ::</title>
- <meta name=\"viewport\" content=\"width=240\">
- <link rel='stylesheet' href='CSS/My_Xml.css' type='text/css' />
- <style>
- body {
- margin: 0px;
- font-size: 11px;
- text-align: center; }
- textarea {
- text-align: center;
- overflow-y: hidden;
- width: 160px;height: 40px; }
- .PostButton {
- width: 100px;height: auto; }
- #TopScreen, #BottomScreen {
- width: 240px;height: 176px; }
- #Status {
- color: White;
- text-align: left;
- overflow-x: hidden;
- width: 240px;height: auto;
- background-color: $Fav; }
- .Comments {
- display: none;
- color: White;
- align: center;
- overflow-x: hidden;
- width: 240px;height: 176px;
- background-color: $Fav; }
- #Top {
- opacity:0.8;
- border-left: none;
- border-right: none;
- background-color: $Fav;
- width: 240px;height: 1px;
- border-top: 1px solid Light$Fav;
- border-bottom: 1px solid Dark$Fav; }
- #Bottom {
- opacity:0.8;
- border-left: none;
- border-right: none;
- background-color: $Fav;
- width: 240px;height: 1px;
- border-top: 1px solid Dark$Fav;
- border-bottom: 1px solid Light$Fav; }
- hr {
- margin: 0px;
- width: 240px;height: 1px;
- border: 1px solid $Fav;
- border-left: none;
- border-right: none;
- background-color: White; }
- img {
- width: 32px;height: 32px;
- position: relative;left: 0px; }
- #Smilie {
- width: 16px;height: 16px; }
- a {
- color: White; }
- .a {
- color: Blue; }
- #Delete {
- width: 138px;
- text-align: center;
- border-right: none;
- border-top: none;
- border: 1px outset Red;
- background-color: Red;
- position: relative;top: 0px;left: 50px; }
- #Delete:hover {
- background-color: Darkred; }
- #Back {
- width: 240px;
- text-align: left; }
- #Next {
- width: 240px;
- text-align: right; }
- #Comment {
- width: 228px;height: auto;
- position: relative;left: 5px;
- border: 1px outset White; }
- #CommentTitle {
- width: 226px;height: auto;
- border: 1px inset White;
- border-top: none; }
- </style>
- <script src=\"JS/Main.js\"></script>
- </head>
- <body>";
- // ALERT
- echo"
- <div id=\"TopScreen\">
- <br /><br /><br /><br />
- <h1>SocialHub</h1><br />
- <h3>Status</h3>
- </div>
- <div id=\"BottomScreen\">
- <a href=\"Index.php\"</a>
- <form method=\"POST\">
- <textarea name=\"status\"></textarea>
- <input type=\"submit\" class=\"Post Button\" value=\"Post\">
- </form>
- <br /><br /><br /><br />";
- $Delete All = $_GET['Delete All'];
- if ($rank == "Overlord") {
- if ($Delete All) {
- mysql_query("DELETE FROM status");
- header ("location: Status.php");
- } else { echo "
- <a href=\"?Delete All=Yes\" class=\"a\">Delete All</a>
- </div>"; } }
- else {}
- if(isset($_GET['page'])) {
- $page = $_GET['page'];
- }
- else {
- $page = 0;
- }
- $sql = "SELECT NULL FROM status";
- $result = mysql_query($sql);
- $num = mysql_num_rows($result);
- $pages = ceil($num);
- if ($page > 9) {
- echo "<div id=\"Back\"><a href=\"Status.php?page=" . ($page - 10) . "\" class=\"a\">Back Page</a></div>";
- }
- else {
- echo "";
- }
- if($page < $pages - 10) {
- echo "<div id=\"Next\"><a href=\"Status.php?page=" . ($page + 10) . "\" class=\"a\">Next Page</a></div>";
- }
- else {
- echo "";
- }
- $result = mysql_query("SELECT * FROM status ORDER BY ID DESC LIMIT $page,10");
- while($row = mysql_fetch_array($result))
- {
- // CHECK IF RANK IS OVERLORD
- if ($rank == "Overlord") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a> | <a href=\"?warn_username=" .$row['username']. "\">Warning</a> | <a href=\"?user=" .$row['username']. "\">(Ban)</a></div>";
- if ($username == $row['username']) { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
- if ($row['rank'] == "AdminBot") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
- } else {}
- // CHECK IF RANK IS OVERLORD ADMIN
- if ($rank == " Overlord Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a> | <a href=\"?warn_username=" .$row['username']. "\">Warning</a> | <a href=\"?user=" .$row['username']. "\">(Ban)</a></div>";
- if ($username == $row['username']) { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
- if ($row['rank'] == "AdminBot") {
- $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
- if ($row['rank'] == "Overlord") { $Delete = ""; }
- if ($row['rank'] == "Co-Overlord") { $Delete = ""; }
- if ($row['rank'] == "Overlord Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
- if ($row['rank'] == "Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a>|<a href=\"?user=" .$row['username']. "\">(Ban)</a></div>"; }
- } else {}
- // CHECK IF RANK IS ADMIN
- if ($rank == "Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a> | <a href=\"?warn_username=" .$row['username']. "\">Warning</a> | <a href=\"?user=" .$row['username']. "\">(Ban)</a></div>";
- if ($row['rank'] == "Overlord Admin") { $row['rank'] = "<red>OverLord Admin</red>"; }
- if ($row['rank'] == "Admin") { $row['rank'] = "<blue>Admin</blue>"; }
- if ($row['rank'] == "Mod") { $row['rank'] = "<green>Mod</green>"; }
- if ($row['rank'] == "Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
- } else {}
- // SET COLORS TO RANKS
- if ($row['rank'] == "Overlord Admin") { $row['rank'] = "<red>OverLord Admin</red>"; }
- if ($row['rank'] == "Admin") { $row['rank'] = "<blue>Admin</blue>"; }
- if ($row['rank'] == "Mod") { $row['rank'] = "<green>Mod</green>"; }
- // SMILIES
- $row['status'] = str_ireplace<img src="smilies/8D.png"> 8D</p>
- $row['status'] = str_ireplace<img src="smilies/srs.png"> :I</p>
- $row['status'] = str_ireplace<img src="smilies/xD.png"> xD</p>
- $row['status'] = str_ireplace<img src="smilies/hehe.png"> :hehe:</p>
- $row['status'] = str_ireplace<img src="smilies/crooked.png"> :\</p>
- $row['status'] = str_ireplace<img src="smilies/facepalm.gif"> :facepalm:</p>
- $row['status'] = str_ireplace$row['status'] = str_ireplace
- $row['status'] = str_ireplace<img src="smilies/forbing.png"> D:</p>
- $row['status'] = str_ireplace<img src="smilies/invertD.png"> invertD</p>
- $row['status'] = str_ireplace<img src="smilies/psmile.png"> :P</p>
- $row['status'] = str_ireplace<img src="smilies/smile.gif"> :)</p>
- $row['status'] = str_ireplace<img src="smilies/sad.gif"> :(</p>
- $row['status'] = str_ireplace<img src="smilies/bigO.png"> :o or :O</p>
- $row['status'] = str_ireplace<img src="smilies/thumb.gif"> :thumb:</p>
- $row['status'] = str_ireplace<img src="smilies/=D.gif"> =D</p>
- $row['status'] = str_ireplace<img src="smilies/angry.gif"> :@</p>
- $row['status'] = str_ireplace<img src="smilies/evil.gif"> :evil:</p>
- $row['status'] = str_ireplace<img src="smilies/cool.gif"> :cool:</p>
- // ADD-ONS
- // ADDS BREAK DONT TOUCH
- $row['status'] = str_replace("
- ", "<br />", $row['status']);
- $row['status'] = str_replace("[a]", "<a href=\"", $row['status']);
- $row['status'] = str_replace("[/a]", "\">Link</a>", $row['status']);
- $row['status'] = str_replace("[img]", "<img src='", $row['status']);
- $row['status'] = str_replace("[/img]", "'>", $row['status']);
- // Copy Script Below And Insert In Last Row Of Words
- // $row['status'] = str_ireplace("word", "****", $row['status']);
- $row["status"] = str_ireplace("ass", "***", $row["status"]);
- $row["status"] = str_ireplace("bitch", "*****", $row["status"]);
- $row["status"] = str_ireplace("boner", "*****", $row["status"]);
- $row["status"] = str_ireplace("boob", "****", $row["status"]);
- $row["status"] = str_ireplace("cock", "****", $row["status"]);
- $row["status"] = str_ireplace("cum", "****", $row["status"]);
- $row["status"] = str_ireplace("cunt", "****", $row["status"]);
- $row["status"] = str_ireplace("dick", "****", $row["status"]);
- $row["status"] = str_ireplace("dildo", "****", $row["status"]);
- $row["status"] = str_ireplace("douchebag", "****", $row["status"]);
- $row["status"] = str_ireplace("fag", "****", $row["status"]);
- $row["status"] = str_ireplace("fuck", "****", $row["status"]);
- $row["status"] = str_ireplace("hump", "****", $row["status"]);
- $row["status"] = str_ireplace("jackoff", "****", $row["status"]);
- $row["status"] = str_ireplace("lesbian", "****", $row["status"]);
- $row["status"] = str_ireplace("masturbate", "****", $row["status"]);
- $row["status"] = str_ireplace("nigger", "****", $row["status"]);
- $row["status"] = str_ireplace("oral", "****", $row["status"]);
- $row["status"] = str_ireplace("orgasm", "****", $row["status"]);
- $row["status"] = str_ireplace("penis", "****", $row["status"]);
- $row["status"] = str_ireplace("pussy", "****", $row["status"]);
- $row["status"] = str_ireplace("nigga", "****", $row["status"]);
- $row["status"] = str_ireplace("rape", "****", $row["status"]);
- $row["status"] = str_ireplace("sex", "****", $row["status"]);
- $row["status"] = str_ireplace("shit", "****", $row["status"]);
- $row["status"] = str_ireplace("skeet", "****", $row["status"]);
- $row["status"] = str_ireplace("slut", "****", $row["status"]);
- $row["status"] = str_ireplace("tit", "****", $row["status"]);
- $sql = mysql_query("SELECT * FROM scomments WHERE statusid='$row[id]'");
- $StatusNum = mysql_num_rows($sql);
- echo "
- <hr id=\"Top\">
- <div id=\"Status\">
- $Delete
- <img src=\"" .$row['icon']. "\">
- <a href=\"index.php?Profile=" .$row['username']. "\">" .$row['username']. "</a> " .$row['rank']. " <font color=\"Black\">( " .$row['time'] ." )</font><br />
- said:
- <hr>
- " .$row['status']. "
- <hr>
- Sig: " .$row['sig']. "
- <hr>
- <a href=\"javascript:toggle(". $row['id'] .");\"><center>Show Comments($StatusNum)</center></a>
- <div id=\"". $row['id'] ."\" class=\"Comments\">
- <form method=\"POST\">
- <center>
- <textarea name=\"Comment\"></textarea><br />
- <input type=\"hidden\" name=\"Status ID\" value=\"". $row['id'] ."\">
- <input type=\"submit\" class=\"Post Button\" value=\"Post\">
- </center>
- </form>";
- $sql = mysql_query("SELECT * FROM scomments WHERE statusid='$row[id]'");
- $scomments = mysql_num_rows($sql);
- if ($scomments == "0") {
- echo "No Comments..."; }
- else {
- $newresult = mysql_query("SELECT * FROM scomments WHERE statusid='$row[id]' ORDER BY ID DESC LIMIT 15");
- while($commentrow = mysql_fetch_array($newresult))
- {
- echo "
- <div id=\"Comment\">
- <div id=\"CommentTitle\">
- " .$commentrow['username']. "
- </div>
- " .$commentrow['comment']. "
- </div>
- <br /><br />"; } }
- echo "
- </div></div>
- <hr id=\"Bottom\">
- <br />";
- }
- echo "
- <a href=\"\" class=\"a\">Refresh</a>";
- if(isset($_GET['page'])) {
- $page = $_GET['page'];
- }
- else {
- $page = 0;
- }
- $sql = "SELECT NULL FROM status";
- $result = mysql_query($sql);
- $num = mysql_num_rows($result);
- $pages = ceil($num);
- if ($page > 9) {
- echo "<div id=\"Back\"><a href=\"Status.php?page=" . ($page - 5) . "\" class=\"a\">Back! </a></div>";
- }
- else {
- echo "";
- }
- if($page < $pages - 10) {
- echo "<div id=\"Next\"><a href=\"status.php?page=" . ($page + 5) . "\" class=\"a\">Next! </a></div>";
- }
- else {
- echo "";
- }
- echo "
- </body>
- <script>
- document.body.scrollTop = \"176\";
- echo "
- <style>
- #BottomScreen {
- background-image:url("". $Fav .".png);background-repeat: repeat-x; }
- $switch
- </style>"; }
- else {}
- echo "</html>"; }
- else {
- header ("location: index.php"); }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement