Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function legionranking() {
- $dbname = "au_server_gs";
- $out = "";
- $dbuser = $this->game_user;
- $dbpass = $this->game_pw;
- $dbhost = $this->game_host;
- $mysql = $this->game_mysql;
- $result = $mysql->query("SELECT
- p.name
- p.race
- l.name AS 'legion_name'
- l.level
- l.contribution_points AS 'legion_ap'
- lm.legion_id
- FROM
- ".$dbname.".legions l
- LEFT JOIN
- ".$dbname.".legion_members lm
- ON
- lm.legion_id = l.id
- LEFT JOIN
- ".$dbname.".players p
- ON
- p.id = lm.player_id
- WHERE
- l.contribution_points>1
- ORDER BY
- l.contribution_points DESC
- LIMIT 10");
- if($mysql->affected_rows>0) {
- $out = "<div class='pagehead'>".$this->titel($_GET['s'])."</div>";
- $out .= "<div class='page'>";
- $out .= "<table align='center' style='width:90%;' cellpadding='3' cellspacing='2'>";
- $out .= "<tr class='liste' align='center'>";
- $out .= "<th>Legion</th>";
- $out .= "<th>Rasse</th>";
- $out .= "<th>Leader</th>";
- $out .= "<th>Level</th>";
- $out .= "<th>Abyss Punkte</th>";
- $out .= "</tr>";
- while($row = $result->fetch_assoc())
- {
- // Player Race
- if ($row["race"] == 'ELYOS') { $race = "<img src='Bilder/elyos.png'>";}
- elseif ($row["race"] == 'ASMODIANS') {$race = "<img src='Bilder/asmodian.png'>";}
- $out .= "<tr class='liste' align='center'>";
- $out .= "<td>".$legion_name."</td>";
- $out .= "<td>".$race."</td>";
- $out .= "<td>".$row["name"]."</td>";
- $out .= "<td>".$row["level"]."</td>";
- $out .= "<td>".$legion_ap."</td>";
- $out .= "</tr>";
- }
- $out .= "</table>";
- $out .= "</div>";
- }
- return $out;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement