This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

#3

By: a guest on Mar 8th, 2013  |  syntax: None  |  size: 4.63 KB  |  views: 2  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <table align="center" width="908" border="0">
  2.   <tr>
  3.   <td width="256">
  4.   <?php
  5. if(isset($_SESSION['ip'])){
  6. echo "<font size='+1'><a href='../index.html'>Back to HomePage</a> | <a href='addnew.php'>Add New Sever</a> | <a href='editserver.php'>Server CP</a></font>";
  7. }else{
  8. echo "<h5><a href='../index.html'>Back to Homepage</a> | <a href='addnew.php'>Add New Sever</a> | <a href='editlogin.php'>Login</a></h5>";
  9. }
  10.  ?></td>
  11.   <td width="642"></td>
  12.  </table>
  13.                                                                         <center><div id="content">
  14.                                                                          
  15.                                                                           <table width="754" cellspacing="0" cellpadding="0" class="newslist">
  16.                                                                                         <tr>
  17.                                                                                                 <td>
  18.                                                                                                         <center><div class="Toplist-line-thing style7 style8"><font size="+3">Toplist</font></div></center>
  19.                                                                                                         <p />
  20.                                                                                                 </td>
  21.                                                                                         </tr>
  22.                                                                                         <tr>
  23.                                                                                                 <td id="newslist">
  24.                 <?php
  25.                 include('inc/open.php');
  26.                 echo "
  27. <h2><font color='#f3b13f'>Sponsored Servers</font></h2>";
  28. $result = mysql_query("SELECT * FROM status WHERE sponsor='1' and status='1' ORDER BY votes DESC",$db);
  29. if(isset($_SESSION['ip'])){
  30. echo "<font color='#999999' size='+1'>Welcome </font><font color='#f3b13f'>" .$_SESSION['owner']. "</font>.<font color='#999999'> Your server IP is: </font><font color='#f3b13f'>".$_SESSION['ip']."</font><font color='#999999'>.</font>";
  31. }else{
  32. echo "<font color='#999999' size='+1'>You are not logged on.</font>";
  33. }
  34.                 echo "<table border='0' width='90%' align='center'>
  35. <tr>
  36. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Server Name</b></td>
  37. <td width='10%' bgcolor='#d0d0d0' align='center'><b>Version</b></td>
  38. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Owner</b></td>
  39. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Votes</b></td>
  40. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Uptime</b></td>
  41. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Status</b></td>
  42. </tr>";
  43. while ($myrow = mysql_fetch_array($result))
  44. {
  45. $uptime_calc = $myrow['checks'] - $myrow['down'];
  46. $uptime = round( ($uptime_calc/$myrow['checks'])*100, 0 );
  47. echo "
  48. <tr>
  49. <td align='center'><a href=viewserver.php?id=".$myrow['id'].">".$myrow['name']."</a>
  50. <td align='center' font color='#f3b13f'>".$myrow['version']."</font>
  51. <td align='center' font color='#f3b13f'>".$myrow['owner']."</font>
  52. <td align='center' font color='#f3b13f'>".$myrow['votes']."</font>
  53. <td align='center' font color='#f3b13f'>".$myrow['uptime']."%</font>";
  54. echo "<td align='center'>";
  55. if (! $sock = @fsockopen($myrow['ip'], $myrow['port'], $num, $error, 5))
  56. mysql_query("UPDATE status SET online='0' WHERE id=".$myrow['id']."");//Offline status!! Wooot By Zant
  57. else{
  58. mysql_query("UPDATE status SET online='1' WHERE id=".$myrow['id']."");//Online status!! Wooot By Zant
  59. $myrow['checks'] = $myrow['checks'] + 1;
  60. fclose($sock);
  61. }
  62. if ($myrow['online'] == 1) {//Online status!! Wooot By Zant
  63. echo '<font color=lime>Online</font>';
  64. }else{
  65. echo '<font color=red>Offline</font>';
  66. }
  67. }
  68.         echo "</td></table>";
  69.         echo "<br />";
  70.         echo "<br />";
  71.         echo "<br />";
  72. echo '<hr width="100%"/>';
  73. echo "<h2><font color='#999999'>Regular Servers</font></h2>";
  74. $result = mysql_query("SELECT * FROM status WHERE sponsor='0' and status='1'    ORDER BY votes DESC",$db);//Changed status to votes :)
  75.                 echo "<table border='0' width='90%' align='center'>
  76. <tr>
  77. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Server Name</b></td>
  78. <td width='10%' bgcolor='#d0d0d0' align='center'><b>Version</b></td>
  79. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Owner</b></td>
  80. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Votes</b></td>
  81. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Uptime</b></td>
  82. <td width='15%' bgcolor='#d0d0d0' align='center'><b>Status</b></td>
  83. </tr>";
  84. while ($myrow = mysql_fetch_array($result))
  85. {
  86. echo "
  87. <tr>
  88. <td align='center' font color='#f3b13f'><a href=viewserver.php?id=".$myrow['id'].">".$myrow['name']."</a>
  89. <td align='center' font color='#999999'>".$myrow['version']."</font>
  90. <td align='center' font color='#999999'>".$myrow['owner']."</font>
  91. <td align='center' font color='#999999'>".$myrow['votes']."</font>
  92. <td align='center' font color='#999999'>".$myrow['uptime']."%</font>";
  93. echo "<td align='center'>";
  94. if (! $sock = @fsockopen($myrow['ip'], $myrow['port'], $num, $error, 5))
  95. mysql_query("UPDATE status SET online='0' WHERE id=".$myrow['id']."");
  96. else{
  97. mysql_query("UPDATE status SET online='1' WHERE id=".$myrow['id']."");
  98. $myrow['checks'] = $myrow['checks'] + 1;
  99. fclose($sock);
  100. }
  101. if ($myrow['online'] == 1) {
  102. echo '<font color=lime>Online</font>';
  103. }else{
  104. echo '<font color=red>Offline</font>';
  105. }
  106. }
  107. echo "</td></table>";
  108. ?>
  109.                                         </td>
  110.                                                                         </tr>
  111.                                                                 </table>
  112.                                                         </div></center>
clone this paste RAW Paste Data