PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/shistory.php

https://github.com/delete66/sikevux-s-tracker
PHP | 80 lines | 75 code | 3 blank | 2 comment | 30 complexity | 09a8a5253c141a696ea772850ed3dbd3 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. //////////drykilllogics shoutbox ripped to shoutboxhistory by Bigjoos///////////////////////////
  3. require_once("include/bittorrent.php");
  4. require_once "include/user_functions.php";
  5. require_once ("include/bbcode_functions.php");
  6. dbconn(false);
  7. maxcoder();
  8. if(!logged_in())
  9. {
  10. header("HTTP/1.0 404 Not Found");
  11. // moddifed logginorreturn by retro//Remember to change the following line to match your server
  12. print("<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 (xxxxx) Server at ".$_SERVER['SERVER_NAME']." Port 80</address></body></html>\n");
  13. die();
  14. }
  15. if (get_user_class() < UC_SYSOP)
  16. hacker_dork("Shout History - Nosey Cunt !");
  17. stdhead("Admin Shout History Check");
  18. $count1 = number_format(get_row_count("shoutbox"));
  19. print("<h2 align=center>Full Shout History</h2>");
  20. print("<center><font class=small>We currently have " . htmlspecialchars($count1) . " shouts on history</font></center>");
  21. begin_main_frame();
  22. $res1 = mysql_query("SELECT COUNT(*) FROM shoutbox $limit") or sqlerr();
  23. $row1 = mysql_fetch_array($res1);
  24. $count = $row1[0];
  25. $shoutsperpage = 30;
  26. list($pagertop, $pagerbottom, $limit) = pager($shoutsperpage, $count, "shistory.php?");
  27. print("$pagertop");
  28. $res = sql_query("SELECT * FROM shoutbox ORDER BY date DESC $limit") or sqlerr(__FILE__, __LINE__);
  29. if (mysql_num_rows($res) == 0)
  30. print("\n");
  31. else
  32. {
  33. print("<table border=0 cellspacing=0 cellpadding=2 width='100%' align='left' class='small'>\n");
  34. $i = 0;
  35. while ($arr = mysql_fetch_assoc($res))
  36. {
  37. $res2 = sql_query("SELECT username,class,donor,warned,downloadpos,chatpost,forumpost,uploadpos,parked FROM users WHERE id=$arr[userid]") or sqlerr(__FILE__, __LINE__);
  38. $arr2 = mysql_fetch_array($res2);
  39. $resowner = sql_query("SELECT id, username, class FROM users WHERE id=$arr[userid]") or print(mysql_error());
  40. $rowowner = mysql_fetch_array($resowner);
  41. if ($rowowner["class"] == "7")
  42. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  43. if ($rowowner["class"] == "6")
  44. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  45. if ($rowowner["class"] == "5")
  46. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  47. if ($rowowner["class"] == "4")
  48. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  49. if ($rowowner["class"] == "3")
  50. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  51. if ($rowowner["class"] == "2")
  52. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  53. if ($rowowner["class"] == "1")
  54. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  55. if ($rowowner["class"] == "0")
  56. $usercolor= " <font color='#".get_user_class_color($rowowner['class'])."'>".safechar($rowowner['username'])."</font>";
  57. $pm = "<span class='date'>[<a target=_blank href=sendmessage.php?receiver=$arr[userid]>pm</a>]</span>\n";
  58. if($i%2 == 0)
  59. $bg = 'bgcolor=#555555';
  60. else
  61. $bg = 'bgcolor=#777777';
  62. print("<tr $bg><td><font color=white>[<span class='date'>".strftime("%d.%m %H:%M",$arr["date"])."]</font></span>\n$del $edit $pm <a href='userdetails.php?id=".$arr["userid"]."' target='_blank'>$usercolor</a>\n" .
  63. ($arr2["donor"] == "yes" ? "<img src=pic/star.gif alt='DONOR'>\n" : "") .
  64. ($arr2["warned"] == "yes" ? "<img src="."pic/warned.gif alt='Warned'>\n" : "") .
  65. ($arr2["chatpost"] == "no" ? "<img src=pic/chatpos.gif alt='No Chat'>\n" : "") .
  66. ($arr2["downloadpos"] == "no" ? "<img src=pic/downloadpos.gif alt='No Downloads'>\n" : "") .
  67. ($arr2["forumpost"] == "no" ? "<img src=pic/forumpost.gif alt='No Posting'>\n" : "") .
  68. ($arr2["uploadpos"] == "no" ? "<img src=pic/uploadpos.gif alt='No upload'>\n" : "") .
  69. ($arr2["parked"] == "yes" ? "<img src=pic/parked.gif alt='Account Parked'>\n" : "") ." ".format_comment($arr["text"])."\n</td></tr>\n");
  70. $i++;
  71. }
  72. print("</table><br />");
  73. }
  74. print("$pagerbottom");
  75. end_main_frame();
  76. stdfoot();
  77. ?>