Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. <?php require_once 'engine/init.php';
  2.  
  3. $records = mysql_select_multi('SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 1;');
  4. ?>
  5. <td width="95%"><img src="layout/images/line_body.gif" width="100%" height="7" border="0" hspace="0" vspace="0" align="left"></td>
  6. <img src="layout/images/titles/t_plaonline.png"/>
  7. <td width="95%"><img src="layout/images/line_body.gif" width="100%" height="7" border="0" hspace="0" vspace="0" align="left"></td>
  8. <br><br><p>
  9. <table>
  10. <tr class="yellow"><th>Server Status</th></tr>
  11. <tr><td><b><?php echo $config['site_title'] ?></b> record of players online: <?php echo $records[0]['record'] ?> on <?php echo date("j M Y", $records[0]['timestamp']) ?>.</td></tr>
  12. <tr><td><?php
  13. $status = true;
  14. if ($config['status']['status_check']) {
  15. @$sock = fsockopen ($config['status']['status_ip'], $config['status']['status_port'], $errno, $errstr, 1);
  16. if(!$sock) {
  17. echo '<b>';
  18. echo $config['site_title'];
  19. echo '</b> is currently offline.';
  20. $status = false;
  21. }
  22. else {
  23. $info = chr(6).chr(0).chr(255).chr(255).'info';
  24. fwrite($sock, $info);
  25. $data='';
  26. while (!feof($sock))$data .= fgets($sock, 1024);
  27. fclose($sock);
  28. echo 'Currently ';
  29. echo user_count_online();
  30. echo ' players are online.';
  31. }
  32. }
  33. ?></td></tr>
  34. </table>
  35. <?php
  36. $array = online_list();
  37. if ($array) {
  38. ?>
  39. <table id="onlinelistTable" class="table table-striped table-hover">
  40. <tr class="yellow">
  41. <th>Name</th>
  42. <th>Level</th>
  43. <th>Vocation</th>
  44. </tr>
  45. <?php
  46. foreach ($array as $value) {
  47.  
  48. $extra = isPromoted($value['id']) == 1 ? 4 : 0; ?>
  49. echo '<tr>';
  50. echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td>';
  51. echo '<td>'. $value['level'] .'</td>';
  52. echo '<td>'. vocation_id_to_name($value['vocation']+$extra) .'</td>';
  53. echo '</tr>';
  54. }
  55. ?>
  56. </table>
  57.  
  58. <?php
  59. }
  60. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement