Changeset 307 for minimanager/arenateam.php
- Timestamp:
- Mar 13, 2008, 8:18:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/arenateam.php
r178 r307 32 32 33 33 $query = $sql->query("SELECT arena_team.arenateamid AS atid, arena_team.name AS atname, arena_team.captainguid AS lguid, arena_team.type AS attype, 34 (SELECT name FROM `character ` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars,34 (SELECT name FROM `characters` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars, 35 35 rating AS atrating, games as atgames, wins as atwins 36 36 FROM arena_team, arena_team_stats … … 74 74 while ($data = $sql->fetch_row($query)) { 75 75 76 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `arena_team_member`, `character `, `arena_team` WHERE arena_team.arenateamid = ".$data[0]." AND arena_team_member.arenateamid = arena_team.arenateamid AND arena_team_member.guid = character.guid AND character.online = 1;");76 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `arena_team_member`, `characters`, `arena_team` WHERE arena_team.arenateamid = ".$data[0]." AND arena_team_member.arenateamid = arena_team.arenateamid AND arena_team_member.guid = characters.guid AND characters.online = 1;"); 77 77 $arenateam_online = $sql->result($gonline,"GCNT"); 78 78 … … 118 118 119 119 if ($search_by == "leaderguid"){ 120 $temp = $sql->query("SELECT guid FROM `character ` WHERE name ='$search_value'");120 $temp = $sql->query("SELECT guid FROM `characters` WHERE name ='$search_value'"); 121 121 $search_value = $sql->result($temp, 0, 'guid'); 122 122 } 123 123 124 124 $query = $sql->query("SELECT arena_team.arenateamid AS atid, arena_team.name AS atname, arena_team.captainguid AS lguid, arena_team.type AS attype, 125 (SELECT name FROM `character ` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars,125 (SELECT name FROM `characters` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM arena_team_member WHERE arenateamid = atid) AS tot_chars, 126 126 rating AS atrating, games as atgames, wins as atwins 127 127 FROM arena_team, arena_team_stats … … 164 164 while ($data = $sql->fetch_row($query)) { 165 165 166 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `arena_team_member`, `character `, `arena_team` WHERE arena_team.arenateamid = ".$data[0]." AND arena_team_member.arenateamid = arena_team.arenateamid AND arena_team_member.guid = character.guid AND character.online = 1;");166 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `arena_team_member`, `characters`, `arena_team` WHERE arena_team.arenateamid = ".$data[0]." AND arena_team_member.arenateamid = arena_team.arenateamid AND arena_team_member.guid = characters.guid AND characters.online = 1;"); 167 167 $arenateam_online = $sql->result($gonline,"GCNT"); 168 168 … … 215 215 $arenateamstats_data = $sql->fetch_row($query); 216 216 217 $members = $sql->query("SELECT arena_team_member.guid,`character `.name,218 `character `.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', 35), ' ', -1) AS level,217 $members = $sql->query("SELECT arena_team_member.guid,`characters`.name, 218 `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, 219 219 arena_team_member.played_week, arena_team_member.wons_week, arena_team_member.played_season, arena_team_member.wons_season 220 FROM arena_team_member,`character `221 LEFT JOIN arena_team_member k1 ON k1.`guid`=`character `.`guid`222 WHERE arena_team_member.arenateamid = '$arenateam_id' AND arena_team_member.guid=`character `.guid");220 FROM arena_team_member,`characters` 221 LEFT JOIN arena_team_member k1 ON k1.`guid`=`characters`.`guid` 222 WHERE arena_team_member.arenateamid = '$arenateam_id' AND arena_team_member.guid=`characters`.guid"); 223 223 224 224 $total_members = $sql->num_rows($members); … … 259 259 <td colspan=\"11\">{$lang_arenateam['standings']} {$arenateamstats_data[7]} ( {$arenateamstats_data[2]})</td> 260 260 </tr> 261 <tr> 262 <th width=\"3%\">{$lang_arenateam['remove']}</th> 261 <tr>"; 262 if ($user_lvl > 2){ 263 $output .= " <th width=\"3%\">{$lang_arenateam['remove']}</th>"; 264 } 265 $output .= " 263 266 <th width=\"21%\">{$lang_arenateam['name']}</th> 264 267 <th width=\"3%\">Race</th> … … 276 279 while ($member = $sql->fetch_row($members)){ 277 280 278 $query = $sql->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`character `.`data`, ' ', 35), ' ', -1) AS level FROM `character` WHERE `name` = '$member[1]';");281 $query = $sql->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `name` = '$member[1]';"); 279 282 280 283 $online = $sql->fetch_row($query); … … 350 353 } 351 354 352 $output .= " <tr> 353 <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[2]}</font><br />{$lang_global['are_you_sure']}', 'arenateam.php?action=rem_char_from_team&id=$member[0]&arenateam_id=$arenateam_id');\" style=\"cursor:pointer;\" /></td> 354 <td><a href=\"char.php?id=$member[0]\">$member[1]</a></td> 355 <td><img src='img/c_icons/{$online[0]}-0.gif' onmousemove='toolTip(\"".get_player_race($online[0])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 355 $output .= " <tr>"; 356 if ($user_lvl > 2){ 357 $output .= " <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[2]}</font><br />{$lang_global['are_you_sure']}', 'arenateam.php?action=rem_char_from_team&id=$member[0]&arenateam_id=$arenateam_id');\" style=\"cursor:pointer;\" /></td>"; 358 } 359 $output .= " <td><a href=\"char.php?id=$member[0]\">$member[1]</a></td> 360 <td><img src='img/c_icons/{$online[0]}-{$online[6]}.gif' onmousemove='toolTip(\"".get_player_race($online[0])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 356 361 <td><img src='img/c_icons/{$online[1]}.gif' onmousemove='toolTip(\"".get_player_class($online[1])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 357 362 <td>$lev</td> … … 399 404 <font class=\"bold\">{$lang_arenateam['arenateam_id']}: $id {$lang_global['will_be_erased']}</font><br /><br /> 400 405 <form action=\"cleanup.php?action=docleanup\" method=\"post\" name=\"form\"> 401 <input type=\"hidden\" name=\"type\" value=\" guild\" />406 <input type=\"hidden\" name=\"type\" value=\"arenateam\" /> 402 407 <input type=\"hidden\" name=\"check\" value=\"-$id\" /> 403 408 <table class=\"hidden\"> … … 426 431 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 427 432 428 //$char_data = $sql->query("SELECT data FROM `character ` WHERE guid = '$guid' LIMIT 1");433 //$char_data = $sql->query("SELECT data FROM `characters` WHERE guid = '$guid' LIMIT 1"); 429 434 //$data = $sql->result($char_data, 0, 'data'); 430 435 //$data = explode(' ',$data); … … 432 437 //$data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 433 438 //$data = implode(' ',$data); 434 //$sql->query("UPDATE `character ` SET data = '$data' WHERE guid = '$guid'");439 //$sql->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guid'"); 435 440 $sql->query("DELETE FROM arena_team_member WHERE guid = '$guid'"); 436 441
Note:
See TracChangeset
for help on using the changeset viewer.