Guest User

Untitled

a guest
Oct 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. <div class='message'>
  2. <div class='title'>Staff Members</div>
  3. <div class='content'>
  4. <?PHP
  5. /* * * * * * * * * * * * * * * * * * * * * * * * * *
  6. * Improved Support List *
  7. * Adapted for Modern AAC by Cybermaster *
  8. * Original from AchTung *
  9. * Credits to Gesior(Standard Version) *
  10. * Credits to Zonet(Improved the PHP script with css part)*
  11. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  12. require("config.php");
  13. $ots = POT::getInstance();
  14. $ots->connect(POT::DB_MYSQL, connection());
  15. $SQL = $ots->getDBHandle();
  16.  
  17. //IMPORTANT!! SET SERVER DIR HERE \/
  18. $config['site']['server_path'] = "root/tfs";
  19.  
  20. if($groups = simplexml_load_file($config['site']['server_path'].'/data/XML/groups.xml') or die('<strong>Could not load groups!</strong>'))
  21. foreach($groups->group as $g)
  22. $groupList[(int)$g['id']] = $g['name'];
  23. $list = $SQL->query("SELECT `name`, `online`, `group_id`, `world_id` FROM `players` WHERE `group_id` > 1 ORDER BY `group_id` DESC");
  24. $showed_players = 0;
  25. $headline = '<table class="houses_list_box" border="0" cellspacing="0" cellpadding="4" width="100%">
  26. <tr class="bar"><td class="house_title" width="30%"><strong>Group</strong> </td>
  27. <td class="house_title" width="35%"><strong>Name</strong></td>
  28. <td class="house_title" width="15%"><strong>Status</strong></td>
  29. <td class="house_title" width="20%"><strong>World</strong></td>';
  30.  
  31. $group_id = 0;
  32. foreach($list as $gm)
  33. {
  34. if($group_id != (int)$gm['group_id'])
  35. {
  36. if($group_id != 0)
  37. echo'</table><br />';
  38. echo $headline;
  39. $group_id = (int)$gm['group_id'];
  40. }
  41. echo'<tr class="over"><td>'.$groupList[(int)$gm['group_id']].'</td><td><a class="link" href="'.WEBSITE.'/index.php/character/view/'.$gm['name'].'">'.$gm['name'].'</a></td><td><font color="'.($gm['online'] == 0 ? 'red">Offline' : 'green">Online').'</font></td><td>'.$config['worlds'][$gm['world_id']].'</td></tr>';
  42. }
  43. echo'</table>';
  44. ?>
  45. <style type="text/css">
  46. tr.over:hover {
  47. background-color: #000000;
  48. }
  49. .link {text-decoration: none;font-weight:bold;color:whrite;}
  50. .more { display: none;}
  51. </style>
  52. </div></div>
Add Comment
Please, Sign In to add comment