Changeset 695 for trunk/pages/spolky.php
- Timestamp:
- Mar 20, 2010, 9:10:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/spolky.php
r691 r695 33 33 } 34 34 35 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 36 $db2 = $Realm->CharactersDatabase; 37 38 if(count($QueryItems) > 3) 39 { 40 $GuildName = $QueryItems[3]; 41 $DbResult = $db2->query('SELECT guildid FROM guild WHERE '.$System->SQLURLName('Name').'="'.$GuildName.'"'); 42 $DbRow = $DbResult->fetch_assoc(); 43 $_GET['id'] = $DbRow['guildid']; 44 include('spolek.php'); 45 } else 46 { 35 47 echo('<h3 class="PageTitle">Seznam spolků</h3>'); 36 48 echo($server->RealmSelection()); … … 46 58 </tr>'); 47 59 48 $Realm = new Realm($System, $_COOKIE['RealmIndex']);49 $db2 = $Realm->CharactersDatabase;50 60 51 $sql = $db2->query('SELECT `guild`.name, `guild`.guildid, FROM_UNIXTIME(`guild`.`createdate`) AS `createdate`, COUNT(`guild_member`.`guildid`) AS member_count ,`leader`.`race` IN (1, 3, 4, 7, 11) AS fraction , `leader`.`guid` AS leader FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` AS `memebers` ON `memebers`.`guid`= `guild_member`.`guid` JOIN `characters` AS `leader` ON `leader`.`guid`= `guild`.`leaderguid` GROUP BY guild.name ORDER BY '.$order_by.' '.$order_dir.';');61 $sql = $db2->query('SELECT `guild`.name, '.$System->SQLURLName('`guild`.name').' AS URLName, `guild`.guildid, FROM_UNIXTIME(`guild`.`createdate`) AS `createdate`, COUNT(`guild_member`.`guildid`) AS member_count ,`leader`.`race` IN (1, 3, 4, 7, 11) AS fraction , `leader`.`guid` AS leader FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` AS `memebers` ON `memebers`.`guid`= `guild_member`.`guid` JOIN `characters` AS `leader` ON `leader`.`guid`= `guild`.`leaderguid` GROUP BY guild.name ORDER BY '.$order_by.' '.$order_dir.';'); 52 62 while($row = $sql->fetch_assoc()) 53 63 { … … 64 74 echo('<tr> 65 75 <td align="center">'.FrakceImg($row['fraction']).'</td> 66 <td align="center"><a href="'.$html->Link( '/spolek/?id='.$row['guildid']).'">'.$row['name'].'</a></td>76 <td align="center"><a href="'.$html->Link($row['URLName'].'/').'">'.$row['name'].'</a></td> 67 77 <td align="center">'.$row['member_count'].'</td> 68 78 <td align="center">'.$online_mem['online_mem'].'</td> … … 73 83 } 74 84 echo('</table>'); 85 } 75 86 76 87 ?>
Note:
See TracChangeset
for help on using the changeset viewer.