Changeset 309
- Timestamp:
- Mar 13, 2008, 8:45:46 PM (17 years ago)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
events.php
r175 r309 38 38 39 39 // 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()'); 41 41 while($Row = $DbResult->fetch_array()) 42 42 { … … 54 54 55 55 // 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()'); 57 57 while($Row = $DbResult->fetch_array()) 58 58 { … … 81 81 ShowHeader(); 82 82 83 echo('<h3>Ud álosti ve høe:</h3><div align="center">');83 echo('<h3>Ud�losti ve h�e:</h3><div align="center">'); 84 84 85 85 $Events = Events(); 86 86 echo('<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>');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>'); 89 89 ShowEventList($Events['Running']); 90 echo('<tr><td colspan="5"><strong style="color: yellow;">Pl ánovanéakce</strong></td></tr>');90 echo('<tr><td colspan="5"><strong style="color: yellow;">Pl�novan� akce</strong></td></tr>'); 91 91 ShowEventList($Events['Planned']); 92 92 echo('</table></div>'); -
guildy.php
r190 r309 39 39 echo('</tr>'); 40 40 // 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); 42 42 while($Guild = $Result->fetch_array()) 43 43 { … … 49 49 } else { 50 50 $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'); 52 52 if($Result->num_rows > 0) 53 53 { … … 56 56 //if($Guild['info'] != '') $Guild['info'] = ''.$Guild['info'].'</i>'; 57 57 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'); 59 59 $GuildMaster = $Result->fetch_array(); 60 60 echo('Vedoucí spolku: '.$GuildMaster['name'].'<br>'); … … 72 72 while($GuildRank = $Result->fetch_array()) $GuildRanks[$GuildRank['rid']] = $GuildRank; 73 73 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); 75 75 while($Member = $Result->fetch_array()) 76 76 { -
honor.php
r140 r309 34 34 $order_dir = ($dir) ? "ASC" : "DESC"; 35 35 36 $result = $Database->query("SELECT count(*) FROM `character `");36 $result = $Database->query("SELECT count(*) FROM `characters`"); 37 37 $Row = $result->fetch_array(); 38 38 $total_online = $Row[0]; … … 48 48 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank, 49 49 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); 51 51 52 52 require_once("minimanager/lang/enUS.php"); -
minimanager/pomm_public/pomm_run.php
r142 r309 3 3 * Project Name: MiniManager for Mangos Server 4 4 * 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) 6 6 * Copyright: Q.SA 7 7 * Email: ***** … … 18 18 19 19 if( !$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"); 21 21 if ($sql->num_rows($result)){ 22 22 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? … … 27 27 $result = $sql->query("SELECT name,race,class,position_x,position_y,map,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1), 28 28 SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 37), ' ', -1),zone 29 FROM `character ` WHERE `online`= 1 $order_side");29 FROM `characters` WHERE `online`= 1 $order_side"); 30 30 31 31 $i = 0; … … 33 33 $char_gender = str_pad(dechex($char[7]),8, 0, STR_PAD_LEFT); 34 34 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]); 36 36 $arr[$i]['x'] = $pos['x']; 37 37 $arr[$i]['y'] = $pos['y']; … … 48 48 $sql->close(); 49 49 50 $_RESULT =$arr; 50 $_RESULT =$arr; 51 51 ?> -
online_player.php
r140 r309 13 13 $dir = ($dir) ? 0 : 1; 14 14 15 $result = $Database->query("SELECT count(*) FROM `character ` WHERE `online`= 1");15 $result = $Database->query("SELECT count(*) FROM `characters` WHERE `online`= 1"); 16 16 $Row = $result->fetch_array(); 17 17 $total_online = $Row[0]; … … 23 23 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank, 24 24 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"); 26 26 27 27 require_once("minimanager/lang/enUS.php");
Note:
See TracChangeset
for help on using the changeset viewer.