Changeset 309


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

Opravy související s přejmenování sloupce character na characters.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • events.php

    r175 r309  
    3838 
    3939  // Add already started events
    40   $DbResult = $Database->select('game_event', '*, UNIX_TIMESTAMP(start) as start', 'end > NOW() AND start < NOW()');
     40  $DbResult = $Database->select('game_event', '*, UNIX_TIMESTAMP(start_time) as start', 'end_time > NOW() AND start_time < NOW()');
    4141  while($Row = $DbResult->fetch_array())
    4242  {
     
    5454
    5555  // Add events not started so far
    56   $DbResult = $Database->select('game_event', '*, UNIX_TIMESTAMP(start) as start', 'start > NOW()');
     56  $DbResult = $Database->select('game_event', '*, UNIX_TIMESTAMP(start_time) as start', 'start_time > NOW()');
    5757  while($Row = $DbResult->fetch_array())
    5858  {
     
    8181ShowHeader();
    8282
    83 echo('<h3>Události ve høe:</h3><div align="center">');
     83echo('<h3>Ud�losti ve h�e:</h3><div align="center">');
    8484
    8585$Events = Events();
    8686echo('<table class="TableGuilda" border="1" cellpadding="3" cellspacing="0">');
    87 echo('<tr><th>Název</th><th>Zaèátek</th><th>Konec</th><th>Informace</th><th>Informace</th></tr>');
    88 echo('<tr><td colspan="5"><strong style="color: yellow;">Aktuálnì bì¾ící akce</strong></td></tr>');
     87echo('<tr><th>N�zev</th><th>Za��tek</th><th>Konec</th><th>Informace</th><th>Informace</th></tr>');
     88echo('<tr><td colspan="5"><strong style="color: yellow;">Aktu�ln� b���c� akce</strong></td></tr>');
    8989ShowEventList($Events['Running']);
    90 echo('<tr><td colspan="5"><strong style="color: yellow;">Plánované akce</strong></td></tr>');
     90echo('<tr><td colspan="5"><strong style="color: yellow;">Pl�novan� akce</strong></td></tr>');
    9191ShowEventList($Events['Planned']);
    9292echo('</table></div>');
  • guildy.php

    r190 r309  
    3939  echo('</tr>');
    4040//  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');
    41   $Result = $Database->query('SELECT `guild`.homepage, `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`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -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 '.$order_by.' '.$order_dir);
     41  $Result = $Database->query('SELECT `guild`.homepage, `guild`.name, guild.guildid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", 35), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` ON `characters`.`guid`= `guild_member`.`guid` GROUP BY guild.name ORDER BY '.$order_by.' '.$order_dir);
    4242  while($Guild = $Result->fetch_array())
    4343  {
     
    4949} else {
    5050  $GuildId = addslashes($_GET['guild']);
    51   $Result = $Database->query('SELECT `guild`.name, guild.guildid, guild.leaderguid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", '.(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -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='.$GuildId.' GROUP BY guild.name');
     51  $Result = $Database->query('SELECT `guild`.name, guild.guildid, guild.leaderguid, COUNT(`guild_member`.`guildid`) as member_count, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1)) as guild_level, SUM(SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)) as guild_honor FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` ON `characters`.`guid`= `guild_member`.`guid` WHERE guild.guildid='.$GuildId.' GROUP BY guild.name');
    5252  if($Result->num_rows > 0)
    5353  {
     
    5656    //if($Guild['info'] != '') $Guild['info'] = ''.$Guild['info'].'</i>';
    5757    echo('<h3>Seznam èlenù spolku '.$Guild['name'].'</h3><div align="center">');
    58     $Result = $Database->select('character', 'name', $Guild['leaderguid'].'=guid');
     58    $Result = $Database->select('characters', 'name', $Guild['leaderguid'].'=guid');
    5959    $GuildMaster = $Result->fetch_array();
    6060    echo('Vedoucí spolku: '.$GuildMaster['name'].'<br>');
     
    7272    while($GuildRank = $Result->fetch_array()) $GuildRanks[$GuildRank['rid']] = $GuildRank;
    7373 
    74     $Result = $Database->query('SELECT guild_member.rank, guild_member.guid, SUBSTRING_INDEX(SUBSTRING_INDEX(character.data," ", '.(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1)*1 as level, SUBSTRING_INDEX(SUBSTRING_INDEX(character.data," ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)*1 as honor, character.name FROM guild_member JOIN `character` ON guild_member.guid = character.guid AND guild_member.guildid='.$Guild['guildid'].' ORDER BY '.$order_by.' '.$order_dir);
     74    $Result = $Database->query('SELECT guild_member.rank, guild_member.guid, SUBSTRING_INDEX(SUBSTRING_INDEX(characters.data," ", '.(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1)*1 as level, SUBSTRING_INDEX(SUBSTRING_INDEX(characters.data," ", '.(CHAR_DATA_OFFSET_HONOR_POINTS+1).'), " ", -1)*1 as honor, characters.name FROM guild_member JOIN `characters` ON guild_member.guid = characters.guid AND guild_member.guildid='.$Guild['guildid'].' ORDER BY '.$order_by.' '.$order_dir);
    7575    while($Member = $Result->fetch_array())
    7676    {
  • honor.php

    r140 r309  
    3434        $order_dir = ($dir) ? "ASC" : "DESC";
    3535       
    36         $result = $Database->query("SELECT count(*) FROM `character`");
     36        $result = $Database->query("SELECT count(*) FROM `characters`");
    3737        $Row = $result->fetch_array();
    3838        $total_online = $Row[0];
     
    4848                        CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,
    4949                        CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1).'), " ", -1) AS UNSIGNED) AS level,account
    50                         FROM `character` WHERE 1 '.$order_side.' ORDER BY '.$order_by.' '.$order_dir.' LIMIT '.$Page*$PerPage.','.$PerPage);
     50                        FROM `characters` WHERE 1 '.$order_side.' ORDER BY '.$order_by.' '.$order_dir.' LIMIT '.$Page*$PerPage.','.$PerPage);
    5151
    5252        require_once("minimanager/lang/enUS.php");
  • minimanager/pomm_public/pomm_run.php

    r142 r309  
    33 * Project Name: MiniManager for Mangos Server
    44 * Date: 17.10.2006 inital version (0.0.1a)
    5  * Author: Q.SA (thanks to mirage666 for the original idea) 
     5 * Author: Q.SA (thanks to mirage666 for the original idea)
    66 * Copyright: Q.SA
    77 * Email: *****
     
    1818
    1919if( !$user_lvl && !$server[$realm_id]['both_factions']){
    20         $result = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");
     20        $result = $sql->query("SELECT race FROM `characters` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `characters` WHERE account = '$user_id') LIMIT 1");
    2121        if ($sql->num_rows($result)){
    2222                $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ?
     
    2727$result = $sql->query("SELECT name,race,class,position_x,position_y,map,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1),
    2828                SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 37), ' ', -1),zone
    29                 FROM `character` WHERE `online`= 1 $order_side");
     29                FROM `characters` WHERE `online`= 1 $order_side");
    3030
    3131$i = 0;
     
    3333        $char_gender = str_pad(dechex($char[7]),8, 0, STR_PAD_LEFT);
    3434
    35         $pos = get_player_position($char[3],$char[4],$char[5],$char[8]); 
     35        $pos = get_player_position($char[3],$char[4],$char[5],$char[8]);
    3636        $arr[$i]['x'] = $pos['x'];
    3737        $arr[$i]['y'] = $pos['y'];
     
    4848$sql->close();
    4949
    50 $_RESULT =$arr; 
     50$_RESULT =$arr;
    5151?>
  • online_player.php

    r140 r309  
    1313        $dir = ($dir) ? 0 : 1;
    1414       
    15         $result = $Database->query("SELECT count(*) FROM `character` WHERE `online`= 1");
     15        $result = $Database->query("SELECT count(*) FROM `characters` WHERE `online`= 1");
    1616        $Row = $result->fetch_array();
    1717        $total_online = $Row[0];
     
    2323                        CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,
    2424                        CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level,account
    25                         FROM `character` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir");
     25                        FROM `characters` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir");
    2626
    2727        require_once("minimanager/lang/enUS.php");
Note: See TracChangeset for help on using the changeset viewer.