Changeset 11 for guildy.php


Ignore:
Timestamp:
Aug 11, 2007, 12:04:22 AM (17 years ago)
Author:
george
Message:

Sjednocení parametrů připojení k databázi do jednoho souboru config.php.
Přepsání všech cest na relativní.
Přidání parametru BaseUrl do souboru config.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guildy.php

    r8 r11  
    1919if(!array_key_exists('guild', $_GET))
    2020{
    21   echo('<h3>Seznam guild:</h3>');
    22   echo('<div align="center"><table class="TableGuilda" style="align: center;" border="1" cellpadding="3" cellspacing="0" ><tr><th>Název</th><th>Poèet èlenù</th><th>Souèet levelù</th><th>Souèet bodù cti</th><th>Webové stránky</th></tr>');
     21  echo('<div align="center"><strong>Seznam guild:</strong>');
     22  echo('<table class="TableGuilda" style="align: center;" border="1" cellpadding="3" cellspacing="0" ><tr><th>Název</th><th>Poèet èlenù</th><th>Souèet levelù</th><th>Souèet bodù cti</th><th>Webové stránky</th></tr>');
    2323//  DB_Query(' COUNT(guild_member.guildid) as member_count FROM guild JOIN guild_member ON guild_member.guildid = guild.guildid GROUP BY guild.name ORDER BY member_count DESC');
    2424  DB_Query('SELECT `guild`.name, guild.guildid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 1421), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `character` ON `character`.`guid`= `guild_member`.`guid` GROUP BY guild.name ORDER BY guild.name');
     
    3030} else {
    3131  $_GET['guild'] = addslashes($_GET['guild']);
    32   DB_Query('SELECT `guild`.name, guild.guildid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 1421), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `character` ON `character`.`guid`= `guild_member`.`guid` WHERE guild.guildid='.$_GET['guild'].' GROUP BY guild.name');
     32  DB_Query('SELECT `guild`.name, guild.guildid, guild.leaderguid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", 1421), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `character` ON `character`.`guid`= `guild_member`.`guid` WHERE guild.guildid='.$_GET['guild'].' GROUP BY guild.name');
    3333  if(DB_NumRows() > 0)
    3434  {
     
    3636    //  if($Guild['homepage'] != '') $Guild['name'] = $Guild['name'].' <a href="'.$Guild['homepage'].'">WWW</a>';
    3737    //if($Guild['info'] != '') $Guild['info'] = ''.$Guild['info'].'</i>';
    38     echo('<h3>Seznam èlenù guildy '.$Guild['name'].':</h3>');
    39     echo('<div align="center"><table class="TableGuilda" border="1" cellpadding="1" cellspacing="0">');
     38    echo('<div align="center"><strong>Seznam èlenù guildy '.$Guild['name'].'</strong><br>');
     39    DB_Select('`character`', 'name', $Guild['leaderguid'].'=guid');
     40    $GuildMaster = DB_Row();
     41    echo('Vedoucí guildy: '.$GuildMaster['name'].'<br>');
     42    echo('<table class="TableGuilda" border="1" cellpadding="1" cellspacing="0">');
    4043    echo('<tr><th>Jméno</th><th>Level</th><th>Hodnost</th><th>Body cti</th></tr>');
    4144    //echo('<tr><td colspan="2" Class="TdGuilda">Informace: '.$Guild['public_info'].'</td></tr>');
Note: See TracChangeset for help on using the changeset viewer.