Changeset 705 for trunk/pages
- Timestamp:
- Apr 4, 2010, 9:37:19 AM (15 years ago)
- Location:
- trunk/pages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/spolek.php
r695 r705 18 18 $DbResult = $db2->query('SELECT `guildid`, `name`, FROM_UNIXTIME(`createdate`) AS `createdate` FROM `guild` WHERE `guildid` = '.$guild_id.' LIMIT 1'); 19 19 $guild_data = $DbResult->fetch_assoc(); 20 $members = $db2->query('SELECT guild_member.guid, guild_member.rank AS mrank, `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, (SELECT rname FROM guild_rank WHERE guildid ='.$guild_id.' AND rid = mrank + 1) AS rname, guild_member.pnote, guild_member.offnote FROM guild_member,`characters` LEFT JOIN guild_member k1 ON k1.`guid`=`characters`.`guid` WHERE guild_member.guildid = '.$guild_id.' AND guild_member.guid=`characters`.guid ORDER BY mrank');20 $members = $db2->query('SELECT `guild_member`.`guid`, `guild_member`.`rank` AS `mrank`, `characters`.`name`, `characters`.`level`, (SELECT `rname` FROM `guild_rank` WHERE `guildid` ='.$guild_id.' AND `rid` = `mrank` + 1) AS `rname`, `guild_member`.`pnote`, `guild_member`.`offnote` FROM `guild_member`,`characters` LEFT JOIN `guild_member` AS `k1` ON `k1`.`guid`=`characters`.`guid` WHERE `guild_member`.`guildid` = '.$guild_id.' AND `guild_member`.`guid`=`characters`.`guid` ORDER BY `mrank`'); 21 21 $total_members = $members->num_rows; 22 $DbResult = $db2->query('SELECT count(*) AS online_mem FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = '.$guild_id.' AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online= 1');22 $DbResult = $db2->query('SELECT count(*) AS `online_mem` FROM `guild_member`, `characters`, `guild` WHERE `guild`.`guildid` = '.$guild_id.' AND `guild_member`.`guildid` = `guild`.`guildid` AND `guild_member`.`guid` = `characters`.`guid` AND `characters`.`online` = 1'); 23 23 $online_mem = $DbResult->fetch_assoc(); 24 24 … … 42 42 <td>'.$total_members.' (Online : '.$online_mem['online_mem'].')</td> 43 43 </tr>'); 44 $DbResult = $db->query('SELECT Homepage FROM GuildInfo WHERE Guild='.$guild_id.' AND Realm='.$Realm->Id);44 $DbResult = $db->query('SELECT `Homepage` FROM `GuildInfo` WHERE `Guild`='.$guild_id.' AND `Realm`='.$Realm->Id); 45 45 $DbRow = $DbResult->fetch_assoc(); 46 46 $Homepage = $DbRow['Homepage']; … … 69 69 while($member = $members->fetch_row()) 70 70 { 71 $query = $db2->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ", -1) as unsigned) ), 8, 0), 4, 1) as genderFROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;');71 $query = $db2->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, `level`, `gender` FROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;'); 72 72 $online = $query->fetch_assoc(); 73 73 $accid = $online['account']; -
trunk/pages/spolky.php
r697 r705 46 46 } else 47 47 { 48 echo('<h3 class="PageTitle">Seznam spolků</h3>'); 49 echo('<table class="BaseTable"> 50 <tr> 51 <th>'.MakeLink('', 'fraction').'</th> 52 <th>'.MakeLink('Jméno spolku', 'name').'</th> 53 <th>'.MakeLink('Celkem členů', 'member_count').'</th> 54 <th>Členů online</th> 55 <th>Guild master</th> 56 <th>'.MakeLink('Webové stránky', 'homepage').'</th> 57 <th>'.MakeLink('Datum založení', 'createdate').'</th> 58 </tr>'); 48 echo('<h2 class="PageTitle">Seznam spolků</h2>'); 49 echo('<table class="BaseTable">'. 50 '<tr>'. 51 '<th>'.MakeLink('', 'fraction').'</th>'. 52 '<th>'.MakeLink('Jméno spolku', 'name').'</th>'. 53 '<th>'.MakeLink('Celkem členů', 'member_count').'</th>'. 54 '<th>Členů online</th>'. 55 '<th>Guild master</th>'. 56 '<th>'.MakeLink('Webové stránky', 'homepage').'</th>'. 57 '</tr>'); 59 58 60 59 … … 72 71 $time = mktime($time_stp[0], $time_stp[1], $time_stp[2], $date[1], $date[2], $date[0]); 73 72 $human_date = date('d.m.Y H:i:s', $time); 74 echo('<tr> 75 <td align="center">'.FrakceImg($row['fraction']).'</td> 76 <td align="center"><a href="'.$html->Link($row['URLName'].'/').'">'.$row['name'].'</a></td> 77 <td align="center">'.$row['member_count'].'</td> 78 <td align="center">'.$online_mem['online_mem'].'</td> 79 <td align="center">'.$Realm->GuidToCharName($row['leader']).'</td> 80 <td align="center">'.GuildPages($Homepage, $row['name']).'</td> 81 <td align="center">'.$human_date.'</td> 82 </tr>'); 73 echo('<tr>'. 74 '<td align="center">'.FrakceImg($row['fraction']).'</td>'. 75 '<td align="center"><a href="'.$html->Link($row['URLName'].'/').'">'.$row['name'].'</a></td>'. 76 '<td align="center">'.$row['member_count'].'</td>'. 77 '<td align="center">'.$online_mem['online_mem'].'</td>'. 78 '<td align="center">'.$Realm->GuidToCharName($row['leader']).'</td>'. 79 '<td align="center">'.GuildPages($Homepage, $row['name']).'</td>'. 80 '</tr>'); 83 81 } 84 82 echo('</table>');
Note:
See TracChangeset
for help on using the changeset viewer.