Advertisement
Guest User

modern

a guest
Sep 6th, 2012
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. <?php
  2. require("config.php");
  3. $ots = POT::getInstance();
  4. $ots->connect(POT::DB_MYSQL, connection());
  5. $SQL = $ots->getDBHandle();
  6.  
  7. require("system/application/config/create_character.php");
  8.  
  9. echo '<br /><div align="center">';
  10. @$_world = (int)$_REQUEST['world'];
  11. if(!@$config['servers'][$_world]['vapusid'])
  12. echo @"Please edit your config.php:<br /><span style=\"font-size: 8px\">\$config['servers'][{$_world}]['vapusid'] = ID; // Replace ID with the server id from VAPus.net<br />
  13. To get the ID just register and click on the server the last number in the URL is your ID (/otlist.serv/10 means ID = 10)
  14. </span>";
  15. else
  16. echo @'<a href="http://vapus.net/otlist.serv/'.$config['servers'][$_world]['vapusid'].'"><img src="http://vapus.net/otlist.graph/'.$config['servers'][$_world]['vapusid'].'/'.$config['VAPusGraphStep'].'" alt="http://vapus.net Server Graph" /></a>';
  17.  
  18. echo "</div><br />";
  19.  
  20. $ide = new IDE;
  21. try { $ide->loadInjections("players_online"); } catch(Exception $e) { error($e->getMessage()); }
  22. echo form_open("character/online", array('method'=>'POST'));
  23. if(count($config['worlds']) > 1) {
  24. echo "<b>World </b> &nbsp; <select name='world'>";
  25. echo "<option value=''>All</optino>";
  26. foreach($config['worlds'] as $key=>$value) {
  27. echo "<option ".set_select('world', $key)." value='$key'>$value</option>";
  28. }
  29. echo "</select>&nbsp; &nbsp;";
  30.  
  31. }
  32.  
  33. echo "<b>Sort by </b> &nbsp; <select name='sort'>";
  34. echo "<option value=''>None</option>";
  35. echo "<option ".set_select('sort', 'level')." value='level'>Level</option>";
  36. echo "<option ".set_select('sort', 'Vocation')." value='Vocation'>Profession</option>";
  37. echo "<option ".set_select('sort', 'name')." value='name'>Name</option>";
  38. echo "</select>";
  39. echo "&nbsp; <input type='submit' value='Order'>";
  40. echo "</form>";
  41.  
  42. echo "</form>";
  43. echo "<table width='100%' cellspacing='1' cellpadding='3'>";
  44. echo "<tr><td align=center><b>Outfit</b></td><td align=center><b>Name</b></td><td align=center><b>Level</b></td><td align=center><b>Vocation</b></td><td align=center><b>World</b></td></tr>";
  45. $players = $SQL->query("SELECT `name`, `level`, `promotion`, `world_id`, `vocation`, `lookfeet`, `lookhead`, `looklegs`, `lookbody`, `looktype`, `lookaddons` FROM `players` WHERE `online`='0' ORDER BY `level` DESC;")->fetchAll();
  46. foreach($players as $row) {
  47. if(in_array(strtolower($row['name']), $config['restricted_names'])) continue;
  48. echo "<tr><td><div style='position: relative; width: 64px; height: 32px;'><div style='background:transparent url(/public/outfiter.php?id=".$row['looktype']."&addons=".$row['lookaddons']."&head=".$row['lookhead']."&body=".$row['lookbody']."&legs=".$row['looklegs']."&feet=".$row['lookfeet']."); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;'></div></div></td><td align=center><a href=\"../character/view/".$row['name']."\">".$row['name']."</a></td><td align=center>".$row['level']."</td><td align=center>".getVocationName($row['vocation'], $row['promotion'])."</td><td align=center>".$config['worlds'][$row['world_id']]."</td></tr>";
  49. }
  50. echo "</table>";
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement