Changeset 178 for minimanager/honor.php
- Timestamp:
- Dec 23, 2007, 2:55:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/honor.php
r143 r178 9 9 */ 10 10 11 require_once("scripts/defines.php"); 12 require_once("header.php"); 13 valid_login(1); 14 require_once("scripts/id_tab.php"); 15 //######################################################################################################################## 16 // BROWSE ARENA TEAMS 17 //######################################################################################################################## 18 function browse_teams() { 11 require_once("header.php"); 12 valid_login(0); 13 require_once("scripts/get_lib.php"); 14 require_once("scripts/defines.php"); 15 require_once("scripts/id_tab.php"); 16 19 17 global $lang_honor, $lang_global, $output, $characters_db, $realm_id, $itemperpage, $realm_db; 20 18 … … 29 27 $dir = ($dir) ? 0 : 1; 30 28 31 $query_1 = $sql->query("SELECT count(*) FROM arena_team");32 $all_record = $sql->result($query_1,0);33 34 29 $query = $sql->query("SELECT 35 36 37 CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', 35), ' ', -1)AS UNSIGNED) AS level,38 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(229+1)."), ' ', -1) AS UNSIGNED) as GNAME39 40 41 42 30 guid,name,race,class, 31 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS honor , 32 CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1)AS UNSIGNED) AS level, 33 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_GUILD_ID+1)."), ' ', -1) AS UNSIGNED) as GNAME 34 FROM `character` 35 where race in (1,3,4,7,11) 36 order by CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) desc 37 LIMIT 25;"); 43 38 44 39 $this_page = $sql->num_rows($query); … … 51 46 <fieldset style=\"width: 950px;\"> 52 47 <legend><img src='img/alliance.gif' /></legend> 48 53 49 <table class=\"lined\" style=\"width: 910px;\"> 50 54 51 <tr class=\"bold\"> 55 52 <td colspan=\"11\">{$lang_honor['allied']} {$lang_honor ['browse_honor']}</td> … … 67 64 68 65 69 while ($data = $sql->fetch_row($query)) { 70 71 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$data[6].";")); 72 73 $level = $data[5]; 74 66 while ($char = $sql->fetch_row($query)) { 67 68 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[6].";")); 69 70 $level = $char[5]; 71 72 $lev = '' ; 75 73 if($level > 0) 76 74 { … … 111 109 112 110 111 113 112 $output .= " <tr> 114 <td><a href=\"char.php?id=$ data[0]\">$data[1]</a></td>115 <td><img src='img/c_icons/{$ data[2]}-0.gif' onmousemove='toolTip(\"".get_player_race($data[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>116 <td><img src='img/c_icons/{$ data[3]}.gif' onmousemove='toolTip(\"".get_player_class($data[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>113 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td> 114 <td><img src='img/c_icons/{$char[2]}-0.gif' onmousemove='toolTip(\"".get_player_race($char[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 115 <td><img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 117 116 <td>$lev</td> 118 <td>$ data[4]</td>119 <td><span onmouseover='toolTip(\"".$CHAR_RANK[$CHAR_RACE[$data[2]][1]][pvp_ranks($data[4])]."\",\"item_tooltip\")' onmouseout='toolTip()' style='color: white;'><img src='img/ranks/rank".pvp_ranks($data[4],$CHAR_RACE[$data[2]][1]).".gif'></span></td>120 <td><a href=\"guild.php?id=$ data[6]\">$guild_name[0]</a></td>117 <td>$char[4]</td> 118 <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> 119 <td><a href=\"guild.php?id=$char[6]\">$guild_name[0]</a></td> 121 120 </tr>"; 122 121 } 123 122 124 $output .= "</table><br /> ";123 $output .= "</table><br /></fieldset>"; 125 124 126 125 $query = $sql->query("SELECT 127 guid,name,race,class, 128 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS honor , 129 CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', 35), ' ', -1)AS UNSIGNED) AS level, 130 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(229+1)."), ' ', -1) AS UNSIGNED) as GNAME 131 FROM `character` 132 where race not in (1,3,4,7,11) 133 order by CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) desc 134 LIMIT 25;"); 126 guid,name,race,class, 127 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank , 128 CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1)AS UNSIGNED) AS level, 129 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', ".(CHAR_DATA_OFFSET_GUILD_ID+1)."), ' ', -1) AS UNSIGNED) as GNAME 130 FROM `character` 131 where race not in (1,3,4,7,11) 132 order by CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) desc 133 LIMIT 25;"); 134 135 135 136 136 $this_page = $sql->num_rows($query); … … 159 159 160 160 161 while ($data = $sql->fetch_row($query)) { 162 163 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$data[6].";")); 164 165 $level = $data[5]; 166 167 switch(true) { 168 case (0 >= $level AND $level < 10): 169 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 170 break; 171 case (10 >= $level AND $level < 20): 172 $lev = '<font color="#858585">'.$level.'</font>'; 173 break; 174 case (20 >= $level AND $level < 30): 175 $lev = '<font color="#339900">'.$level.'</font>'; 176 break; 177 case (30 >= $level AND $level < 40): 178 $lev = '<font color="#3300CC">'.$level.'</font>'; 179 break; 180 case (40 >= $level AND $level < 50): 181 $lev = '<font color="#5552FF">'.$level.'</font>'; 182 break; 183 case (50 >= $level AND $level < 60): 184 $lev = '<font color="#FF8000">'.$level.'</font>'; 185 break; 186 case (60 >= $level AND $level < 70): 187 $lev = '<font color="#FF0000">'.$level.'</font>'; 188 break; 189 case ($level = 70): 190 $lev = '<font color="#FF00CC">'.$level.'</font>'; 191 break; 192 case ($level > 70): 193 $lev = '<font color="#FFF000">'.$level.'</font>'; 194 break; 195 }; 196 161 while ($char = $sql->fetch_row($query)) { 162 163 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[6].";")); 164 165 $level = $char[5]; 166 167 if($level > 0) 168 { 169 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 170 } 171 if($level > 9) 172 { 173 $lev = '<font color="#858585">'.$level.'</font>'; 174 } 175 if($level > 19) 176 { 177 $lev = '<font color="#339900">'.$level.'</font>'; 178 } 179 if($level > 29) 180 { 181 $lev = '<font color="#3300CC">'.$level.'</font>'; 182 } 183 if($level > 39) 184 { 185 $lev = '<font color="#5552FF">'.$level.'</font>'; 186 } 187 if($level > 49) 188 { 189 $lev = '<font color="#FF8000">'.$level.'</font>'; 190 } 191 if($level > 59) 192 { 193 $lev = '<font color="#FF0000">'.$level.'</font>'; 194 } 195 if($level > 69) 196 { 197 $lev = '<font color="#FF00CC">'.$level.'</font>'; 198 } 199 if($level > 70) 200 { 201 $lev = '<font color="#FFF000">'.$level.'</font>'; 202 } 197 203 198 204 $output .= " <tr> 199 <td><a href=\"char.php?id=$ data[0]\">$data[1]</a></td>200 <td><img src='img/c_icons/{$ data[2]}-0.gif' onmousemove='toolTip(\"".get_player_race($data[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>201 <td><img src='img/c_icons/{$ data[3]}.gif' onmousemove='toolTip(\"".get_player_class($data[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>205 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td> 206 <td><img src='img/c_icons/{$char[2]}-0.gif' onmousemove='toolTip(\"".get_player_race($char[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 207 <td><img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 202 208 <td>$lev</td> 203 <td>$ data[4]</td>204 <td><span onmouseover='toolTip(\"".$CHAR_RANK[$CHAR_RACE[$data[2]][1]][pvp_ranks($data[4])]."\",\"item_tooltip\")' onmouseout='toolTip()' style='color: white;'><img src='img/ranks/rank".pvp_ranks($data[4],$CHAR_RACE[$data[2]][1]).".gif'></span></td>205 <td><a href=\"guild.php?id=$ data[6]\">$guild_name[0]</a></td>209 <td>$char[4]</td> 210 <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> 211 <td><a href=\"guild.php?id=$char[6]\">$guild_name[0]</a></td> 206 212 </tr>"; 207 213 } 208 214 209 $output .= "</table><br /> ";215 $output .= "</table><br /></fieldset>"; 210 216 $sql->close(); 211 } 212 213 //######################################################################################################################## 214 // MAIN 215 //######################################################################################################################## 216 $err = (isset($_GET['error'])) ? $_GET['error'] : NULL; 217 218 $output .= "<div class=\"top\">"; 219 switch ($err) { 220 case 1: 221 $output .= "<h1><font class=\"error\">{$lang_global['empty_fields']}</font></h1>"; 222 break; 223 case 2: 224 $output .= "<h1><font class=\"error\">{$lang_global['err_no_search_passed']}</font></h1>"; 225 break; 226 case 3: //keep blank 227 break; 228 case 4: 229 $output .= "<h1>{$lang_honor ['team_search_result']}:</h1>"; 230 break; 231 default: //no error 232 $output .= "<h1>{$lang_honor ['browse_honor']}</h1>"; 233 } 234 $output .= "</div>"; 235 236 $action = (isset($_GET['action'])) ? $_GET['action'] : NULL; 237 238 switch ($action) { 239 case "browse_teams": 240 browse_teams(); 241 break; 242 case "search": 243 search(); 244 break; 245 case "view_team": 246 view_team(); 247 break; 248 case "del_team": 249 del_team(); 250 break; 251 case "rem_char_from_team": 252 rem_char_from_team(); 253 break; 254 default: 255 browse_teams(); 256 } 217 257 218 258 219 require_once("footer.php");
Note:
See TracChangeset
for help on using the changeset viewer.