Ignore:
Timestamp:
Mar 13, 2008, 8:18:42 PM (17 years ago)
Author:
george
Message:

Aktualizace na minimanager 0.1.6g.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/arenateam.php

    r178 r307  
    3232
    3333 $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,
    3535                                        rating AS atrating, games as atgames, wins as atwins
    3636                                        FROM arena_team, arena_team_stats
     
    7474while ($data = $sql->fetch_row($query)) {
    7575
    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;");
    7777  $arenateam_online = $sql->result($gonline,"GCNT");
    7878
     
    118118
    119119if ($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'");
    121121        $search_value = $sql->result($temp, 0, 'guid');
    122122}
    123123
    124124 $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,
    126126                                        rating AS atrating, games as atgames, wins as atwins
    127127                                        FROM arena_team, arena_team_stats
     
    164164while ($data = $sql->fetch_row($query)) {
    165165
    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;");
    167167  $arenateam_online = $sql->result($gonline,"GCNT");
    168168
     
    215215  $arenateamstats_data = $sql->fetch_row($query);
    216216
    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,
    219219                                                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");
    223223
    224224 $total_members = $sql->num_rows($members);
     
    259259     <td colspan=\"11\">{$lang_arenateam['standings']} {$arenateamstats_data[7]} ( {$arenateamstats_data[2]})</td>
    260260  </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 .= "
    263266        <th width=\"21%\">{$lang_arenateam['name']}</th>
    264267    <th width=\"3%\">Race</th>
     
    276279 while ($member = $sql->fetch_row($members)){
    277280
    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]';");
    279282
    280283        $online = $sql->fetch_row($query);
     
    350353        }
    351354
    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&amp;id=$member[0]&amp;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&amp;id=$member[0]&amp;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>
    356361                <td><img src='img/c_icons/{$online[1]}.gif' onmousemove='toolTip(\"".get_player_class($online[1])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
    357362                <td>$lev</td>
     
    399404                        <font class=\"bold\">{$lang_arenateam['arenateam_id']}: $id {$lang_global['will_be_erased']}</font><br /><br />
    400405                        <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\" />
    402407                        <input type=\"hidden\" name=\"check\" value=\"-$id\" />
    403408                 <table class=\"hidden\">
     
    426431        $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    427432
    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");
    429434        //$data = $sql->result($char_data, 0, 'data');
    430435        //$data = explode(' ',$data);
     
    432437        //$data[CHAR_DATA_OFFSET_GUILD_RANK] = 0;
    433438        //$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'");
    435440        $sql->query("DELETE FROM arena_team_member WHERE guid = '$guid'");
    436441
Note: See TracChangeset for help on using the changeset viewer.