Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. function legionranking() {
  2.  
  3. $dbname = "au_server_gs";
  4. $out = "";
  5. $dbuser = $this->game_user;
  6. $dbpass = $this->game_pw;
  7. $dbhost = $this->game_host;
  8.  
  9. $mysql = $this->game_mysql;
  10.  
  11. $result = $mysql->query("SELECT
  12. p.name
  13. p.race
  14. l.name AS 'legion_name'
  15. l.level
  16. l.contribution_points AS 'legion_ap'
  17. lm.legion_id
  18. FROM
  19. ".$dbname.".legions l
  20. LEFT JOIN
  21. ".$dbname.".legion_members lm
  22. ON
  23. lm.legion_id = l.id
  24. LEFT JOIN
  25. ".$dbname.".players p
  26. ON
  27. p.id = lm.player_id
  28. WHERE
  29. l.contribution_points>1
  30. ORDER BY
  31. l.contribution_points DESC
  32. LIMIT 10");
  33. if($mysql->affected_rows>0) {
  34. $out = "<div class='pagehead'>".$this->titel($_GET['s'])."</div>";
  35. $out .= "<div class='page'>";
  36. $out .= "<table align='center' style='width:90%;' cellpadding='3' cellspacing='2'>";
  37. $out .= "<tr class='liste' align='center'>";
  38. $out .= "<th>Legion</th>";
  39. $out .= "<th>Rasse</th>";
  40. $out .= "<th>Leader</th>";
  41. $out .= "<th>Level</th>";
  42. $out .= "<th>Abyss Punkte</th>";
  43. $out .= "</tr>";
  44. while($row = $result->fetch_assoc())
  45. {
  46.  
  47. // Player Race
  48. if ($row["race"] == 'ELYOS') { $race = "<img src='Bilder/elyos.png'>";}
  49. elseif ($row["race"] == 'ASMODIANS') {$race = "<img src='Bilder/asmodian.png'>";}
  50.  
  51. $out .= "<tr class='liste' align='center'>";
  52. $out .= "<td>".$legion_name."</td>";
  53. $out .= "<td>".$race."</td>";
  54. $out .= "<td>".$row["name"]."</td>";
  55. $out .= "<td>".$row["level"]."</td>";
  56. $out .= "<td>".$legion_ap."</td>";
  57. $out .= "</tr>";
  58. }
  59. $out .= "</table>";
  60. $out .= "</div>";
  61. }
  62. return $out;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement