source: minimanager/honor.php@ 392

Last change on this file since 392 was 374, checked in by george, 17 years ago
  • Aktualizováno: Minimanager 0.12 rev. 99. Opraveno zobrazování honoru, přidána captcha p?i registraci nového účtu a mini fórum.
  • Přidáno: Český překlad pro Minimanager 0.12.
  • Smazáno: Staré fotky fyzického serveru přesunuty do fotogalerie.
  • Přidáno: Nějaké návody na eventy od bbtrashe.
File size: 7.7 KB
Line 
1<?php
2/*
3 * Project Name: MiniManager for Mangos Server
4 * Date: 17.10.2006 inital version (0.0.1a)
5 * Author: Shnappie
6 * Copyright: Q.SA, Shnappie
7 * Email: *****
8 * License: GNU General Public License v2(GPL)
9 */
10
11 require_once("header.php");
12 valid_login($action_permission['read']);
13 require_once("scripts/get_lib.php");
14 require_once("scripts/defines.php");
15 require_once("scripts/id_tab.php");
16
17 global $lang_honor, $lang_global, $output, $characters_db, $realm_id, $itemperpage, $realm_db;
18
19 $sql = new SQL;
20 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
21
22 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0;
23 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "atid";
24
25 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1;
26 $order_dir = ($dir) ? "ASC" : "DESC";
27 $dir = ($dir) ? 0 : 1;
28
29 $query = $sql->query("SELECT
30 guid,name,race,class,
31 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS honor ,
32 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1)AS UNSIGNED) AS level,
33 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".(CHAR_DATA_OFFSET_GUILD_ID+1)."), ' ', -1) AS UNSIGNED) as GNAME,
34 mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender
35 FROM `characters`
36 where race in (1,3,4,7,11)
37 order by CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) desc
38 LIMIT 25;");
39
40 $this_page = $sql->num_rows($query);
41
42$output .= "<script type=\"text/javascript\">
43 answerbox.btn_ok='{$lang_global['yes_low']}';
44 answerbox.btn_cancel='{$lang_global['no']}';
45 </script>
46 <center>
47 <fieldset style=\"width: 776px;\">
48 <legend><img src='img/alliance.gif' /></legend>
49
50 <table class=\"lined\" style=\"width: 705px;\">
51
52 <tr class=\"bold\">
53 <td colspan=\"11\">{$lang_honor['allied']} {$lang_honor ['browse_honor']}</td>
54 </tr>
55
56 <tr>
57 <th width=\"30%\">{$lang_honor['guid']}</th>
58 <th width=\"7%\">{$lang_honor['race']}</th>
59 <th width=\"7%\">{$lang_honor['class']}</th>
60 <th width=\"7%\">{$lang_honor['level']}</th>
61 <th width=\"10%\">{$lang_honor['honor points']}</th>
62 <th width=\"9%\">{$lang_honor['honor']}</th>
63 <th width=\"30%\">{$lang_honor['guild']}</th>
64 </tr>";
65
66
67while ($char = $sql->fetch_row($query)) {
68
69$guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[6].";"));
70
71 $level = $char[5];
72
73 if($level < 10)
74 $lev = '<font color="#FFFFFF">'.$level.'</font>';
75 else if($level < 20)
76 $lev = '<font color="#858585">'.$level.'</font>';
77 else if($level < 30)
78 $lev = '<font color="#339900">'.$level.'</font>';
79 else if($level < 40)
80 $lev = '<font color="#3300CC">'.$level.'</font>';
81 else if($level < 50)
82 $lev = '<font color="#C552FF">'.$level.'</font>';
83 else if($level < 60)
84 $lev = '<font color="#FF8000">'.$level.'</font>';
85 else if($level < 70)
86 $lev = '<font color="#FFF280">'.$level.'</font>';
87 else if($level < 80)
88 $lev = '<font color="#FF0000">'.$level.'</font>';
89 else
90 $lev = '<font color="#000000">'.$level.'</font>';
91
92 $output .= " <tr>
93 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td>
94 <td><img src='img/c_icons/{$char[2]}-{$char[7]}.gif' onmousemove='toolTip(\"".get_player_race($char[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
95 <td><img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
96 <td>$lev</td>
97 <td>$char[4]</td>
98 <td><span onmouseover='toolTip(\"".$CHAR_RANK[$CHAR_RACE[$char[2]][1]][pvp_ranks($char[4])]."\",\"item_tooltip\")' onmouseout='toolTip()' style='color: white;'><img src='img/ranks/rank".pvp_ranks($char[4],$CHAR_RACE[$char[2]][1]).".gif'></span></td>
99 <td><a href=\"guild.php?action=view_guild&amp;error=3&amp;id=$char[6]\">$guild_name[0]</a></td>
100 </tr>";
101}
102
103$output .= "</table><br /></fieldset>";
104
105$query = $sql->query("SELECT
106 guid,name,race,class,
107 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank ,
108 CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1)AS UNSIGNED) AS level,
109 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".(CHAR_DATA_OFFSET_GUILD_ID+1)."), ' ', -1) AS UNSIGNED) as GNAME,
110 mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender
111 FROM `characters`
112 where race not in (1,3,4,7,11)
113 order by CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) desc
114 LIMIT 25;");
115
116
117 $this_page = $sql->num_rows($query);
118
119$output .= "<script type=\"text/javascript\">
120 answerbox.btn_ok='{$lang_global['yes_low']}';
121 answerbox.btn_cancel='{$lang_global['no']}';
122 </script>
123 <center>
124 <fieldset style=\"width: 776px;\">
125 <legend><img src='img/horde.gif' /></legend>
126 <table class=\"lined\" style=\"width: 705px;\">
127 <tr class=\"bold\">
128 <td colspan=\"11\">{$lang_honor['horde']} {$lang_honor ['browse_honor']}</td>
129 </tr>
130
131 <tr>
132 <th width=\"30%\">{$lang_honor['guid']}</th>
133 <th width=\"7%\">{$lang_honor['race']}</th>
134 <th width=\"7%\">{$lang_honor['class']}</th>
135 <th width=\"7%\">{$lang_honor['level']}</th>
136 <th width=\"10%\">{$lang_honor['honor points']}</th>
137 <th width=\"9%\">{$lang_honor['honor']}</th>
138 <th width=\"30%\">{$lang_honor['guild']}</th>
139 </tr>";
140
141
142while ($char = $sql->fetch_row($query)) {
143
144$guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[6].";"));
145
146 $level = $char[5];
147
148 if($level < 10)
149 $lev = '<font color="#FFFFFF">'.$level.'</font>';
150 else if($level < 20)
151 $lev = '<font color="#858585">'.$level.'</font>';
152 else if($level < 30)
153 $lev = '<font color="#339900">'.$level.'</font>';
154 else if($level < 40)
155 $lev = '<font color="#3300CC">'.$level.'</font>';
156 else if($level < 50)
157 $lev = '<font color="#C552FF">'.$level.'</font>';
158 else if($level < 60)
159 $lev = '<font color="#FF8000">'.$level.'</font>';
160 else if($level < 70)
161 $lev = '<font color="#FFF280">'.$level.'</font>';
162 else if($level < 80)
163 $lev = '<font color="#FF0000">'.$level.'</font>';
164 else
165 $lev = '<font color="#000000">'.$level.'</font>';
166
167 $output .= " <tr>
168 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td>
169 <td><img src='img/c_icons/{$char[2]}-{$char[7]}.gif' onmousemove='toolTip(\"".get_player_race($char[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
170 <td><img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
171 <td>$lev</td>
172 <td>$char[4]</td>
173 <td><span onmouseover='toolTip(\"".$CHAR_RANK[$CHAR_RACE[$char[2]][1]][pvp_ranks($char[4])]."\",\"item_tooltip\")' onmouseout='toolTip()' style='color: white;'><img src='img/ranks/rank".pvp_ranks($char[4],$CHAR_RACE[$char[2]][1]).".gif'></span></td>
174 <td><a href=\"guild.php?action=view_guild&amp;error=3&amp;id=$char[6]\">$guild_name[0]</a></td>
175 </tr>";
176}
177
178$output .= "</table><br /></fieldset>";
179 $sql->close();
180
181
182require_once("footer.php");
183?>
Note: See TracBrowser for help on using the repository browser.