Changeset 307 for minimanager/guild.php


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/guild.php

    r304 r307  
    3232
    3333 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS name,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate,
    34                                                 (SELECT name FROM `character` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars
     34                                                (SELECT name FROM `characters` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars
    3535                                                FROM guild ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");
    3636 $this_page = $sql->num_rows($query);
     
    7171while ($data = $sql->fetch_row($query)) {
    7272
    73  $gonline = $sql->query("SELECT count(*) AS GCNT  FROM `guild_member`, `character`, `guild` WHERE guild.guildid = ".$data[0]." AND guild_member.guildid = guild.guildid AND guild_member.guid = character.guid AND character.online = 1;");
     73 $gonline = $sql->query("SELECT count(*) AS GCNT  FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = ".$data[0]." AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online = 1;");
    7474  $guild_online = $sql->result($gonline,"GCNT");
    7575
     
    114114
    115115if ($search_by == "leaderguid"){
    116         $temp = $sql->query("SELECT guid FROM `character` WHERE name ='$search_value'");
     116        $temp = $sql->query("SELECT guid FROM `characters` WHERE name ='$search_value'");
    117117        $search_value = $sql->result($temp, 0, 'guid');
    118118}
    119119
    120120 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS name,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate,
    121                                                 (SELECT name FROM `character` WHERE guid = lguid) AS l_name, (SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars
     121                                                (SELECT name FROM `characters` WHERE guid = lguid) AS l_name, (SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars
    122122                                                FROM guild WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit");
    123123 $total_found = $sql->num_rows($query);
     
    197197
    198198 $members = $sql->query("SELECT guild_member.guid, guild_member.rank AS mrank,
    199                                                 `character`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', 35), ' ', -1) AS level,
    200                                                 (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank) AS rname,
     199                                                `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level,
     200                                                (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank+1) AS rname,
    201201                                                guild_member.Pnote, guild_member.OFFnote
    202                                                 FROM guild_member,`character`
    203                                                 LEFT JOIN guild_member k1 ON k1.`guid`=`character`.`guid`
    204                                                 WHERE guild_member.guildid = '$guild_id' AND guild_member.guid=`character`.guid
     202                                                FROM guild_member,`characters`
     203                                                LEFT JOIN guild_member k1 ON k1.`guid`=`characters`.`guid`
     204                                                WHERE guild_member.guildid = '$guild_id' AND guild_member.guid=`characters`.guid
    205205                                                ORDER BY mrank");
    206206
     
    252252 while ($member = $sql->fetch_row($members)){
    253253
    254         $query = $sql->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`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 `character` WHERE `name` = '$member[2]';");
     254        $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[2]';");
    255255
    256256        $online = $sql->fetch_row($query);
     
    335335        <td><img src='img/c_icons/{$online[1]}.gif' onmousemove='toolTip(\"".get_player_class($online[1])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td>
    336336        <td>$lev</td>
    337         <td>".($member[4]?$member[4]:$lang_guild['guild_leader'])." ($member[1])</td>
     337        <td>$member[4] ($member[1])</td>
    338338        <td>$member[5]</td>
    339339        <td>$member[6]</td>
     
    405405        $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    406406
    407         $char_data = $sql->query("SELECT data FROM `character` WHERE guid = '$guid' LIMIT 1");
     407        $char_data = $sql->query("SELECT data FROM `characters` WHERE guid = '$guid' LIMIT 1");
    408408        $data = $sql->result($char_data, 0, 'data');
    409409        $data = explode(' ',$data);
     
    411411        $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0;
    412412        $data = implode(' ',$data);
    413         $sql->query("UPDATE `character` SET data = '$data' WHERE guid = '$guid'");
     413        $sql->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guid'");
    414414        $sql->query("DELETE FROM guild_member WHERE guid = '$guid'");
    415415
Note: See TracChangeset for help on using the changeset viewer.