- Timestamp:
- May 18, 2009, 9:31:31 PM (16 years ago)
- Location:
- trunk/pages
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/banlist.php
r582 r592 39 39 $sqldata = $db->query('SELECT `account`.`last_ip`,`ip_banned`.`bandate`,`ip_banned`.`unbandate`,`ip_banned`.`bannedby`,`ip_banned`.`banreason` FROM `account` INNER join `ip_banned` ON `account`.`last_ip`=`ip_banned`.`ip`'); 40 40 41 echo('<table border="1">');41 echo('<table class="BaseTable">'); 42 42 echo('<tr><th>IP</th><th>Od</th><th>Do</th><th>Banoval</th><th>Důvod</th></tr>'); 43 43 -
trunk/pages/guildy.php
r583 r592 1 1 <?php 2 // razeni 3 $order_by = (isset($_GET["order"])) ? $db->real_escape_string($_GET["order"]) : "name"; 4 5 $dir = (isset($_GET["dir"])) ? $db->real_escape_string($_GET["dir"]) : "down"; 6 $order_dir = ($dir == "up") ? "ASC" : "DESC"; 7 $dir = ($dir == "down") ? "up" : "down"; 8 $dir_img = ($dir == "down") ? "<img src=\"imgs/inc/up.gif\">" : "<img src=\"imgs/inc/down.gif\">"; 2 3 $order_by = (isset($_GET['order'])) ? $_GET['order'] : 'name'; 4 $dir = (isset($_GET['dir'])) ? $_GET['dir'] : 'down'; 5 $order_dir = ($dir == 'up') ? 'ASC' : 'DESC'; 6 $dir = ($dir == 'down') ? 'up' : 'down'; 7 $dir_img = ($dir == 'down') ? '<img src="imgs/inc/up.gif" alt="nahoru">' : '<img src="imgs/inc/down.gif" alt="dolu" />'; 9 8 10 9 11 function MakeLink ($show,$sort)10 function MakeLink($show, $sort) 12 11 { 13 global $dir , $dir_img; 14 if (isset($_GET["order"]) AND $_GET["order"] == $sort) 15 { 16 $arrow = $dir_img.""; 17 } 18 else 19 { 20 $arrow = ""; 21 } 22 return $arrow."<a href=\"?page=guildy&order=".$sort."&dir=".$dir."\">".$show."</a>"; 12 global $dir, $dir_img; 13 if (isset($_GET['order']) and $_GET['order'] == $sort) $arrow = $dir_img; 14 else $arrow = ''; 15 return($arrow.'<a href="?page=guildy&order='.$sort.'&dir='.$dir.'">'.$show.'</a>'); 23 16 } 24 function GuildPages ($row,$name) 17 18 function GuildPages($row, $name) 25 19 { 26 20 global $server; 27 if ($row != "") 28 { 29 return "<a href=\"http://".$row."/\" target=\"_blank\">www</a>"; 30 } 31 else 32 { 33 // return "<a href=\"http://www.parime.eu/guilda/?=".$server -> SeoUrl($name)."\" target=\"_blank\">".$name."</a>"; 34 } 21 22 if($row != '') return('<a href="http://'.$row.'/" target="_blank">www</a>'); 23 else return(''); 35 24 } 36 function FrakceImg ($frakce) 25 26 function FrakceImg($frakce) 37 27 { 38 if ($frakce == 0) 39 { 40 return "<img src=\"imgs/inc/h.gif\">"; 41 } 42 else 43 { 44 return "<img src=\"imgs/inc/a.gif\">"; 45 } 28 if($frakce == 0) return('<img src="imgs/inc/h.gif" alt="horda" />'); 29 else return('<img src="imgs/inc/a.gif" alt="aliance" />'); 46 30 } 47 31 48 echo('<table class="BaseTable"> 32 echo('<h3 class="PageTitle">Seznam guild</h3>'); 33 echo('<table class="BaseTable" style="font-size: small;"> 49 34 <tr> 50 35 <th>'.MakeLink('', 'fraction').'</th> … … 59 44 $db->select_db($Config['Mangos']['DatabaseCharacters']); 60 45 61 $sql = $db ->query('SELECT `guild`.homepage, `guild`.name, `guild`.guildid, `guild`.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.';');62 while($row = $sql -> fetch_array())46 $sql = $db->query('SELECT `guild`.homepage, `guild`.name, `guild`.guildid, `guild`.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.';'); 47 while($row = $sql->fetch_assoc()) 63 48 { 64 $online_mem = $db -> query("SELECT count(*) AS online_mem FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = ".$row["guildid"]." AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online = 1;") -> fetch_array();; 65 $date_arr = explode(" ",$row["createdate"]); 66 $date = explode("-",$date_arr[0]); 67 $time_stp = explode(":",$date_arr[1]); 68 $time = mktime($time_stp[0],$time_stp[1],$time_stp[2],$date[1],$date[2],$date[0]); 69 $human_date = date ("d.m.Y H:i:s",$time); 70 echo " 71 <tr> 72 <td align=\"center\">".FrakceImg($row["fraction"])."</td> 73 <td align=\"center\"><a href=\"?page=guilda&id=".$row["guildid"]."\">".$row["name"]."</a></td> 74 <td align=\"center\">".$row["member_count"]."</td> 75 <td align=\"center\">".$online_mem["online_mem"]."</td> 76 <td align=\"center\">".$server -> GuidToCharName($row["leader"])."</td> 77 <td align=\"center\">".GuildPages($row["homepage"],$row["name"])."</td> 78 <td align=\"center\">".$human_date."</td> 79 </tr> 80 "; 81 49 $DbResult = $db->query('SELECT count(*) AS online_mem FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = '.$row['guildid'].' AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online = 1'); 50 $online_mem = $DbResult->fetch_assoc(); 51 $date_arr = explode(' ', $row['createdate']); 52 $date = explode('-', $date_arr[0]); 53 $time_stp = explode(':', $date_arr[1]); 54 $time = mktime($time_stp[0], $time_stp[1], $time_stp[2], $date[1], $date[2], $date[0]); 55 $human_date = date('d.m.Y H:i:s', $time); 56 echo('<tr> 57 <td align="center">'.FrakceImg($row['fraction']).'</td> 58 <td align="center"><a href="?page=guilda&id='.$row['guildid'].'">'.$row['name'].'</a></td> 59 <td align="center">'.$row['member_count'].'</td> 60 <td align="center">'.$online_mem['online_mem'].'</td> 61 <td align="center">'.$server->GuidToCharName($row['leader']).'</td> 62 <td align="center">'.GuildPages($row['homepage'],$row['name']).'</td> 63 <td align="center">'.$human_date.'</td> 64 </tr>'); 82 65 } 83 84 66 echo('</table>'); 85 67 -
trunk/pages/online.php
r583 r592 22 22 23 23 echo('Ve hře se právě nachází '.$server->MangosOnline().' hráčů.'. 24 '<center> 25 <table class="BaseTable"> 24 '<table class="BaseTable" style="font-size: small;"> 26 25 <tr> 27 26 <th align="center">Frakce</th> … … 55 54 <td align="center">'.$row['highest_rank'].'<br />'.$row['arena_points'].'</td></tr>'); 56 55 } 57 echo('</table> </center>');56 echo('</table>'); 58 57 59 58 ?>
Note:
See TracChangeset
for help on using the changeset viewer.