Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. <?php
  2.  
  3. function displayInfo2($the_userid) {
  4.  
  5. $bar_class = new User($the_userid);
  6.  
  7. if ($bar_class->id == "") {
  8. $the_info = "<u><i>Invalid User ID</i></u>.";
  9. } else {
  10.  
  11. if ($bar_class->hppercent >= 75) {
  12. $colour = "#00DD00";
  13. } else {
  14. $colour = "#BB0000";
  15. }
  16. if ((time() - $bar_class->lastactive) < 900) {
  17. $colour1 = "#005500";
  18. $colour2 = "#006600";
  19. } else {
  20. $colour1 = "#550000";
  21. $colour2 = "#660000";
  22. }
  23.  
  24. $the_info = '<table width="450px" class="userbar" cellspacing="0" cellpadding="3"><tr onclick="DoNav(\'' . $bar_class->id . '\');"><td width="40%">' . $bar_class->formattedname . '</td><td style="border-left: 1px solid #444444;" width="15%">LVL:&nbsp;' . $bar_class->level . '</td><td style="border-left: 1px solid #444444;" width="15%">HP:&nbsp;<font color="' . $colour . '">' . $bar_class->hppercent . '%</font></td><td style="border-left: 1px solid #444444;" width="26%"><a href="/travel/bus.php">' . $bar_class->cityname . '</a></td><td align="center" style="border-left: 1px solid #444444; background-color:' . $colour1 . ';" width="4%"><div style="background-color:' . $colour2 . ';">&nbsp;&nbsp;</div></td></tr></table><table width="450px" class="userbar2" cellspacing="0" cellpadding="3"><tr><td width="20%" align="center">[<a href="/attack.php?attack=' . $bar_class->id . '">attack</a>]</td><td style="border-left: 1px solid #444444;" width="20%" align="center">[<a href="/mug.php?mug=' . $bar_class->id . '">mug</a>]</td><td style="border-left: 1px solid #444444;" width="20%" align="center">[<a href="/spy.php?id=' . $bar_class->id . '">spy</a>]</td><td style="border-left: 1px solid #444444;" width="20%" align="center">[<a href="/profiles.php?id=' . $bar_class->id . '&contact=friend">friend</a>]</td><td style="border-left: 1px solid #444444;" width="20%" align="center">[<a href="/profiles.php?id=' . $bar_class->id . '&contact=enemy">enemy</a>]</td></tr></table>';
  25. }
  26. return $the_info;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement