Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.20 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. if ($_COOKIE['Username']) {
  5. $username = $_COOKIE['Username'];
  6. // SET UP
  7.  
  8. $status = strip_tags($_POST['status']);
  9. $ID = $_GET['id'];
  10. $DeleteStatus = $_GET['username'];
  11. $warn_username = $_GET['warn_username'];
  12. $BanUser = $_GET['user'];
  13. $Comment = strip_tags($_POST["Comment"]);
  14. $StatusId = $_POST["StatusID"];
  15.  
  16. $connect=mysql_connect("localhost","405587","22395001440120");
  17. $db=mysql_select_db("405587");
  18.  
  19. // Track User
  20. $track=mysql_query("SELECT*from track WHERE username='$username'")
  21. or die("Failed To Connect....");
  22. $user=mysql_fetch_array($track);
  23. $OnlineName = $user["username"];
  24.  
  25. $TrackTime = date("m/d/y h:i A");
  26. $Place = "Viewing Status";
  27.  
  28. if ($username == $OnlineName) {
  29. mysql_query("UPDATE track SET time = '$TrackTime', place='$Place' WHERE username = '$username'");
  30. }
  31. else {
  32. $sql = MYSQL_QUERY("INSERT INTO track (username, time, place) VALUES ('$username','$TrackTime','$Place')");
  33. if(!$sql) { die(mysql_error()); }
  34. }
  35.  
  36.  
  37. // SELECT FROM THESE TABLES
  38. // SELECT FROM BANNED
  39. $ban=mysql_query("SELECT*from banned WHERE username='$username'")
  40. or die("Failed To Connect...");
  41. $banned=mysql_fetch_array($ban);
  42. $bannedusername = $banned[username];
  43.  
  44. // SELECT FROM PROFILES
  45. $result=mysql_query("SELECT*from profiles WHERE username='$username'")
  46. or die("Failed To Connect...");
  47. $worked=mysql_fetch_array($result);
  48. $sig=$worked[sig];
  49. $Icon=$worked[icon];
  50. $Points = $worked['points'];
  51. $PointAdd = ($Points) + 1;
  52.  
  53. // SELECT FROM USERS
  54. $result=mysql_query("SELECT*from users WHERE username='$username'")
  55. or die("Failed To Connect...");
  56. $worked=mysql_fetch_array($result);
  57. $rank=$worked[rank];
  58. $Fav=$worked[Fav];
  59.  
  60. // CHECK IF USER IS BANNED,
  61. if ($username == $bannedusername) {
  62. header ("location: Index.php"); }
  63. else {}
  64.  
  65.  
  66. // OVERLORD, CO-OVERLORD, OVERLORD ADMIN,
  67. // AND ADMIN CONTROLS
  68. // DELETE STATUS
  69. if ($ID&&$DeleteStatus&$rank) {
  70. mysql_query("DELETE FROM status WHERE id='$ID' AND username='$DeleteStatus'");
  71. header ("location: Status.php"); }
  72. else {}
  73.  
  74. // WARN USER
  75. if ($warn_username&$rank) {
  76. $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')");
  77. header ("location: Status.php");
  78. if(!$sql) { die(mysql_error()); } }
  79. else {}
  80. // BAN USER
  81. if ($BanUser&$rank&$username) {
  82. $sql = MYSQL_QUERY("INSERT INTO banned (id, username, admin) VALUES ('NULL','$BanUser','$username')");
  83. if(!$sql) { die(mysql_error()); }
  84.  
  85. // CONNECTED WITH BAN ABOVE
  86. // THIS POSTS THE BAN
  87. $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!')");
  88. header ("location: Status.php");
  89. if(!$sql) { die(mysql_error());} }
  90. else {}
  91.  
  92.  
  93. // CHECK VARIABLES AND OR REPLACE THEM
  94. if ($Fav == "") {
  95. $Fav = "Blue"; }
  96.  
  97. if ($sig == "") {
  98. $sig = "Nothing..."; }
  99.  
  100. if ($Icon == "") {
  101. $Icon = "/Avatars/default.png"; }
  102.  
  103. if ($Fav == "summer") {
  104. $Fav = "lightgreen"; }
  105.  
  106.  
  107. // INPUT STATUS
  108. if ($username&&$status) {
  109.  
  110. if ($status == "/away") {
  111. $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')");
  112. if(!$sql) { die(mysql_error()); } }
  113. else {
  114. header ("location: Status.php");
  115. $sql = MYSQL_QUERY("INSERT INTO status (id, username, status, rank, time, icon, sig) VALUES ('NULL','$username','$status','$rank','$time','$Icon','$sig')");
  116. $sql = MYSQL_QUERY("UPDATE profiles SET points = '$PointAdd' WHERE username='$username'");
  117. if(!$sql) { die(mysql_error()); } } }
  118.  
  119. if ($Comment) {
  120. header ("location: Status.php");
  121. $sql = MYSQL_QUERY("INSERT INTO scomments (id, username, statusid, comment) VALUES ('NULL','$username','$StatusId','$Comment')"); }
  122. echo "
  123. <html>
  124. <head>
  125. <title>:: SocialHub - Status ::</title>
  126. <meta name=\"viewport\" content=\"width=240\">
  127. <link rel='stylesheet' href='CSS/My_Xml.css' type='text/css' />
  128. <style>
  129. body {
  130. margin: 0px;
  131. font-size: 11px;
  132. text-align: center; }
  133.  
  134. textarea {
  135. text-align: center;
  136. overflow-y: hidden;
  137. width: 160px;height: 40px; }
  138.  
  139. .PostButton {
  140. width: 100px;height: auto; }
  141.  
  142. #TopScreen, #BottomScreen {
  143. width: 240px;height: 176px; }
  144.  
  145. #Status {
  146. color: White;
  147. text-align: left;
  148. overflow-x: hidden;
  149. width: 240px;height: auto;
  150. background-color: $Fav; }
  151.  
  152. .Comments {
  153. display: none;
  154. color: White;
  155. align: center;
  156. overflow-x: hidden;
  157. width: 240px;height: 176px;
  158. background-color: $Fav; }
  159.  
  160. #Top {
  161. opacity:0.8;
  162. border-left: none;
  163. border-right: none;
  164. background-color: $Fav;
  165. width: 240px;height: 1px;
  166. border-top: 1px solid Light$Fav;
  167. border-bottom: 1px solid Dark$Fav; }
  168.  
  169. #Bottom {
  170. opacity:0.8;
  171. border-left: none;
  172. border-right: none;
  173. background-color: $Fav;
  174. width: 240px;height: 1px;
  175. border-top: 1px solid Dark$Fav;
  176. border-bottom: 1px solid Light$Fav; }
  177.  
  178. hr {
  179. margin: 0px;
  180. width: 240px;height: 1px;
  181. border: 1px solid $Fav;
  182. border-left: none;
  183. border-right: none;
  184. background-color: White; }
  185.  
  186. img {
  187. width: 32px;height: 32px;
  188. position: relative;left: 0px; }
  189.  
  190. #Smilie {
  191. width: 16px;height: 16px; }
  192.  
  193. a {
  194. color: White; }
  195.  
  196. .a {
  197. color: Blue; }
  198.  
  199. #Delete {
  200. width: 138px;
  201. text-align: center;
  202. border-right: none;
  203. border-top: none;
  204. border: 1px outset Red;
  205. background-color: Red;
  206. position: relative;top: 0px;left: 50px; }
  207.  
  208. #Delete:hover {
  209. background-color: Darkred; }
  210.  
  211. #Back {
  212. width: 240px;
  213. text-align: left; }
  214.  
  215. #Next {
  216. width: 240px;
  217. text-align: right; }
  218.  
  219. #Comment {
  220. width: 228px;height: auto;
  221. position: relative;left: 5px;
  222. border: 1px outset White; }
  223. #CommentTitle {
  224. width: 226px;height: auto;
  225. border: 1px inset White;
  226. border-top: none; }
  227. </style>
  228. <script src=\"JS/Main.js\"></script>
  229. </head>
  230. <body>";
  231.  
  232. // ALERT
  233.  
  234. echo"
  235. <div id=\"TopScreen\">
  236. <br /><br /><br /><br />
  237.  
  238. <h1>SocialHub</h1><br />
  239. <h3>Status</h3>
  240. </div>
  241.  
  242. <div id=\"BottomScreen\">
  243. <a href=\"Index.php\"</a>
  244.  
  245. <form method=\"POST\">
  246. <textarea name=\"status\"></textarea>
  247. <input type=\"submit\" class=\"Post Button\" value=\"Post\">
  248. </form>
  249. <br /><br /><br /><br />";
  250.  
  251. $Delete All = $_GET['Delete All'];
  252. if ($rank == "Overlord") {
  253. if ($Delete All) {
  254. mysql_query("DELETE FROM status");
  255. header ("location: Status.php");
  256. } else { echo "
  257. <a href=\"?Delete All=Yes\" class=\"a\">Delete All</a>
  258. </div>"; } }
  259. else {}
  260. if(isset($_GET['page'])) {
  261. $page = $_GET['page'];
  262. }
  263. else {
  264. $page = 0;
  265. }
  266. $sql = "SELECT NULL FROM status";
  267. $result = mysql_query($sql);
  268. $num = mysql_num_rows($result);
  269. $pages = ceil($num);
  270. if ($page > 9) {
  271. echo "<div id=\"Back\"><a href=\"Status.php?page=" . ($page - 10) . "\" class=\"a\">Back Page</a></div>";
  272. }
  273. else {
  274. echo "";
  275. }
  276. if($page < $pages - 10) {
  277. echo "<div id=\"Next\"><a href=\"Status.php?page=" . ($page + 10) . "\" class=\"a\">Next Page</a></div>";
  278. }
  279. else {
  280. echo "";
  281. }
  282.  
  283. $result = mysql_query("SELECT * FROM status ORDER BY ID DESC LIMIT $page,10");
  284.  
  285. while($row = mysql_fetch_array($result))
  286. {
  287.  
  288. // CHECK IF RANK IS OVERLORD
  289. 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>";
  290.  
  291. if ($username == $row['username']) { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
  292. if ($row['rank'] == "AdminBot") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
  293. } else {}
  294.  
  295.  
  296.  
  297.  
  298. // CHECK IF RANK IS OVERLORD ADMIN
  299. 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>";
  300. if ($username == $row['username']) { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
  301. if ($row['rank'] == "AdminBot") {
  302. $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
  303.  
  304. if ($row['rank'] == "Overlord") { $Delete = ""; }
  305. if ($row['rank'] == "Co-Overlord") { $Delete = ""; }
  306. if ($row['rank'] == "Overlord Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
  307. 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>"; }
  308. } else {}
  309.  
  310. // CHECK IF RANK IS ADMIN
  311. 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>";
  312.  
  313.  
  314. if ($row['rank'] == "Overlord Admin") { $row['rank'] = "<red>OverLord Admin</red>"; }
  315. if ($row['rank'] == "Admin") { $row['rank'] = "<blue>Admin</blue>"; }
  316. if ($row['rank'] == "Mod") { $row['rank'] = "<green>Mod</green>"; }
  317. if ($row['rank'] == "Admin") { $Delete = "<div id=\"Delete\"><a href=\"?id=" .$row['id']. "&username=" .$row['username']."\">(Delete)</a></div>"; }
  318. } else {}
  319.  
  320. // SET COLORS TO RANKS
  321. if ($row['rank'] == "Overlord Admin") { $row['rank'] = "<red>OverLord Admin</red>"; }
  322. if ($row['rank'] == "Admin") { $row['rank'] = "<blue>Admin</blue>"; }
  323. if ($row['rank'] == "Mod") { $row['rank'] = "<green>Mod</green>"; }
  324.  
  325.  
  326. // SMILIES
  327. $row['status'] = str_ireplace<img src="smilies/8D.png"> 8D</p>
  328. $row['status'] = str_ireplace<img src="smilies/srs.png"> :I</p>
  329. $row['status'] = str_ireplace<img src="smilies/xD.png"> xD</p>
  330. $row['status'] = str_ireplace<img src="smilies/hehe.png"> :hehe:</p>
  331. $row['status'] = str_ireplace<img src="smilies/crooked.png"> :\</p>
  332. $row['status'] = str_ireplace<img src="smilies/facepalm.gif"> :facepalm:</p>
  333. $row['status'] = str_ireplace$row['status'] = str_ireplace
  334. $row['status'] = str_ireplace<img src="smilies/forbing.png"> D:</p>
  335. $row['status'] = str_ireplace<img src="smilies/invertD.png"> invertD</p>
  336. $row['status'] = str_ireplace<img src="smilies/psmile.png"> :P</p>
  337. $row['status'] = str_ireplace<img src="smilies/smile.gif"> :)</p>
  338. $row['status'] = str_ireplace<img src="smilies/sad.gif"> :(</p>
  339. $row['status'] = str_ireplace<img src="smilies/bigO.png"> :o or :O</p>
  340. $row['status'] = str_ireplace<img src="smilies/thumb.gif"> :thumb:</p>
  341. $row['status'] = str_ireplace<img src="smilies/=D.gif"> =D</p>
  342. $row['status'] = str_ireplace<img src="smilies/angry.gif"> :@</p>
  343. $row['status'] = str_ireplace<img src="smilies/evil.gif"> :evil:</p>
  344. $row['status'] = str_ireplace<img src="smilies/cool.gif"> :cool:</p>
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. // ADD-ONS
  355. // ADDS BREAK DONT TOUCH
  356. $row['status'] = str_replace("
  357. ", "<br />", $row['status']);
  358. $row['status'] = str_replace("[a]", "<a href=\"", $row['status']);
  359. $row['status'] = str_replace("[/a]", "\">Link</a>", $row['status']);
  360. $row['status'] = str_replace("[img]", "<img src='", $row['status']);
  361. $row['status'] = str_replace("[/img]", "'>", $row['status']);
  362.  
  363. // Copy Script Below And Insert In Last Row Of Words
  364. // $row['status'] = str_ireplace("word", "****", $row['status']);
  365.  
  366.  
  367. $row["status"] = str_ireplace("ass", "***", $row["status"]);
  368. $row["status"] = str_ireplace("bitch", "*****", $row["status"]);
  369. $row["status"] = str_ireplace("boner", "*****", $row["status"]);
  370. $row["status"] = str_ireplace("boob", "****", $row["status"]);
  371. $row["status"] = str_ireplace("cock", "****", $row["status"]);
  372. $row["status"] = str_ireplace("cum", "****", $row["status"]);
  373. $row["status"] = str_ireplace("cunt", "****", $row["status"]);
  374. $row["status"] = str_ireplace("dick", "****", $row["status"]);
  375. $row["status"] = str_ireplace("dildo", "****", $row["status"]);
  376. $row["status"] = str_ireplace("douchebag", "****", $row["status"]);
  377. $row["status"] = str_ireplace("fag", "****", $row["status"]);
  378. $row["status"] = str_ireplace("fuck", "****", $row["status"]);
  379. $row["status"] = str_ireplace("hump", "****", $row["status"]);
  380. $row["status"] = str_ireplace("jackoff", "****", $row["status"]);
  381. $row["status"] = str_ireplace("lesbian", "****", $row["status"]);
  382. $row["status"] = str_ireplace("masturbate", "****", $row["status"]);
  383. $row["status"] = str_ireplace("nigger", "****", $row["status"]);
  384. $row["status"] = str_ireplace("oral", "****", $row["status"]);
  385. $row["status"] = str_ireplace("orgasm", "****", $row["status"]);
  386. $row["status"] = str_ireplace("penis", "****", $row["status"]);
  387. $row["status"] = str_ireplace("pussy", "****", $row["status"]);
  388. $row["status"] = str_ireplace("nigga", "****", $row["status"]);
  389. $row["status"] = str_ireplace("rape", "****", $row["status"]);
  390. $row["status"] = str_ireplace("sex", "****", $row["status"]);
  391. $row["status"] = str_ireplace("shit", "****", $row["status"]);
  392. $row["status"] = str_ireplace("skeet", "****", $row["status"]);
  393. $row["status"] = str_ireplace("slut", "****", $row["status"]);
  394. $row["status"] = str_ireplace("tit", "****", $row["status"]);
  395.  
  396.  
  397.  
  398. $sql = mysql_query("SELECT * FROM scomments WHERE statusid='$row[id]'");
  399. $StatusNum = mysql_num_rows($sql);
  400.  
  401. echo "
  402. <hr id=\"Top\">
  403. <div id=\"Status\">
  404. $Delete
  405. <img src=\"" .$row['icon']. "\">
  406. <a href=\"index.php?Profile=" .$row['username']. "\">" .$row['username']. "</a> " .$row['rank']. " <font color=\"Black\">( " .$row['time'] ." )</font><br />
  407. said:
  408. <hr>
  409. " .$row['status']. "
  410. <hr>
  411. Sig: " .$row['sig']. "
  412. <hr>
  413. <a href=\"javascript:toggle(". $row['id'] .");\"><center>Show Comments($StatusNum)</center></a>
  414. <div id=\"". $row['id'] ."\" class=\"Comments\">
  415. <form method=\"POST\">
  416. <center>
  417. <textarea name=\"Comment\"></textarea><br />
  418. <input type=\"hidden\" name=\"Status ID\" value=\"". $row['id'] ."\">
  419. <input type=\"submit\" class=\"Post Button\" value=\"Post\">
  420. </center>
  421. </form>";
  422.  
  423. $sql = mysql_query("SELECT * FROM scomments WHERE statusid='$row[id]'");
  424. $scomments = mysql_num_rows($sql);
  425.  
  426. if ($scomments == "0") {
  427. echo "No Comments..."; }
  428.  
  429. else {
  430. $newresult = mysql_query("SELECT * FROM scomments WHERE statusid='$row[id]' ORDER BY ID DESC LIMIT 15");
  431. while($commentrow = mysql_fetch_array($newresult))
  432. {
  433. echo "
  434. <div id=\"Comment\">
  435. <div id=\"CommentTitle\">
  436. " .$commentrow['username']. "
  437. </div>
  438. " .$commentrow['comment']. "
  439. </div>
  440. <br /><br />"; } }
  441.  
  442. echo "
  443. </div></div>
  444. <hr id=\"Bottom\">
  445. <br />";
  446. }
  447.  
  448. echo "
  449. <a href=\"\" class=\"a\">Refresh</a>";
  450. if(isset($_GET['page'])) {
  451. $page = $_GET['page'];
  452. }
  453. else {
  454. $page = 0;
  455. }
  456. $sql = "SELECT NULL FROM status";
  457. $result = mysql_query($sql);
  458. $num = mysql_num_rows($result);
  459. $pages = ceil($num);
  460. if ($page > 9) {
  461. echo "<div id=\"Back\"><a href=\"Status.php?page=" . ($page - 5) . "\" class=\"a\">Back! </a></div>";
  462. }
  463. else {
  464. echo "";
  465. }
  466. if($page < $pages - 10) {
  467. echo "<div id=\"Next\"><a href=\"status.php?page=" . ($page + 5) . "\" class=\"a\">Next! </a></div>";
  468. }
  469. else {
  470. echo "";
  471. }
  472. echo "
  473. </body>
  474. <script>
  475. document.body.scrollTop = \"176\";
  476. echo "
  477. <style>
  478. #BottomScreen {
  479. background-image:url("". $Fav .".png);background-repeat: repeat-x; }
  480. $switch
  481. </style>"; }
  482.  
  483. else {}
  484. echo "</html>"; }
  485.  
  486. else {
  487. header ("location: index.php"); }
  488. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement