Guest User

Untitled

a guest
Sep 28th, 2015
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1. <?php
  2. include ("include.inc.php");
  3. $ptitle="Characters - $cfg[server_name]";
  4. include("header.inc.php");
  5. ?>
  6. <div id="content">
  7. <div class="top">Character Lookup</div>
  8. <div class="mid">
  9. <form method="get" action="characters.php"><br>
  10. <center><input type="text" name="player_name"/>
  11. <input type="submit" value="Search"/></center>
  12. </form>
  13. <?php
  14. $player = new Player();
  15. $SQL = new SQL();
  16.  
  17. if (!empty($_GET['player_id']) && $player->load($_GET['player_id']) || !empty($_GET['player_name']) && $player->find($_GET['player_name'])){
  18. echo '<hr/><table style="width: 100%"><tr><td><font class=f2>Name:</font><font class=f1> '.htmlspecialchars($player->getAttr('name'))."</font><br/>\n";
  19. echo '<font class=f2>Level:</font><font class=f1> '.$player->getAttr('level')."</font><br/>\n";
  20. echo '<font class=f2>Magic Level:</font><font class=f1> '.$player->getAttr('maglevel')."</font><br/>\n";
  21. echo '<font class=f2>Vocation:</font><font class=f1> '.$cfg['vocations'][$player->getAttr('vocation')]['name']."</font> ";
  22. /* INICIO VIP */
  23. $account = new Account();
  24. $account->load($player->getAttr('account'));
  25. if ($account->getAttr('premend') > time()) {
  26. echo "<a href=vantagens.php target=vantagens><font color=blue><b>(VIP)</b></font></a><br/>";
  27. } else { echo "<br/>\n";}
  28. /* FIM VIP */
  29. if ($player->isAttr('guild_name')){
  30. echo '<font class=f2>Guild:</font><font class=f1> '.$player->getAttr('guild_rank').' of <a href="guilds.php?guild_id='.$player->getAttr('guild_id').'">'.htmlspecialchars($player->getAttr('guild_name')).'</a></font><br/>'."\n";
  31. }
  32.  
  33. $gender = Array('Female','Male');
  34. echo '<font class=f2>Gender:</font><font class=f1> '.$gender[$player->getAttr('sex')].'</font><br/>'."\n";
  35. if (!empty($cfg['temple'][$player->getAttr('city')]['name'])){
  36. echo "<font class=f2>Residence:</font><font class=f1> ".ucfirst($cfg['temple'][$player->getAttr('city')]['name'])."</font><br/>";
  37. }
  38.  
  39. if ($player->isAttr('position'))
  40. echo "<font class=f2>Position: </font><font class=f1> ".$player->getAttr('position')."</font><br/>";
  41.  
  42. /* INICIO DO STATUS */
  43. if($player->isOnline())
  44. echo '<font class=f2>Status:</font> <font class=f1><font color=green><b>Online</b></font></font><br/>';
  45. else
  46. echo '<font class=f2>Status:</font> <font class=f1><font color=red><b>Offline</b></font></font><br/>';
  47. /* FIM DO STATUS */
  48.  
  49. if ($player->getAttr('lastlogin') == 0){
  50. $lastlogin = 'Never';}
  51. else {
  52. $lastlogin = date("jS F Y H:i:s",$player->getAttr('lastlogin'));
  53. echo "<font class=f2>Last Login:</font><font class=f1> ".$lastlogin."</font><br/>\n";
  54. }
  55.  
  56. if ($player->getAttr('redskulltime') > time())
  57. echo '<font class=f2>Frag time left:</font><font class=f1> '.ceil(($player->getAttr('redskulltime') - time())/60/60).' h</font><br/>';
  58.  
  59. if ($cfg['show_skills']){
  60. echo "</td><td>";
  61. $sn = $cfg['skill_names'];
  62. for ($i=0; $i < count($sn); $i++){
  63. echo '<font class=f2>'.ucfirst($sn[$i]).':</font><font class=f1> '.$player->getSkill($i)."</font><br/>\n";
  64. }
  65. echo '</td></tr>';
  66. }
  67. echo '</table>';
  68. $account = new Account();
  69. if ($account->load($player->getAttr('account')))
  70. if (strlen($account->getAttr('comment'))>0){
  71. echo "<hr><font class=f3><center>Comments</center></font><br><div style=\"overflow:hidden\"><pre><font class=f1>".htmlspecialchars($account->getAttr('comment'))."</font></pre></div><br/>\n";
  72. }
  73. echo '<hr/>';
  74.  
  75. echo '<center><font class=f3>Special Skills</font><br><br></center><font class=f1><table border=0 cellpadding=1 cellspacing=1 width=right></table><hr/>';
  76.  
  77. if ($cfg['show_deathlist']){
  78. $deaths = $player->getDeaths();
  79. if ($deaths !== false && !empty($deaths)){
  80. echo '<font class=f3><center>Deaths</center></font><br/>';
  81. foreach ($deaths as $death){
  82. $killer = new Player($death['killer']);
  83. if ($killer->exists())
  84. $name = '<a href="characters.php?char='.$death['killer'].'">'.$death['killer'].'</a>';
  85. else
  86. $name = $death['killer'];
  87. echo '<font class=f2><i>'.date("jS F Y H:i:s",$death['date']).'</i> Killed at level '.$death['level'].' by '.$name.'</font><br/>';
  88. }
  89. }
  90. }
  91. }elseif (isset($_GET['player_id']) || isset($_GET['player_name'])) echo '<font class=f1><br>Player not found</font>';
  92. ?>
  93. </div>
  94. <div class="bot"></div>
  95. </div>
  96. <?php include ("footer.inc.php"); ?>
Advertisement
Add Comment
Please, Sign In to add comment