- Timestamp:
- Mar 19, 2010, 9:46:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/player.php
r690 r691 17 17 18 18 if($err == 0) echo('<img src="'.$html->Link('/imgs/inc/on.gif').'"> <font color="#234303" size="4">'.$text.'</font><br />'); 19 else echo('<img src="'.$html->Link(' imgs/inc/off.gif').'"> <font color="#990000" size="4\">'.$text.'</font><br />');19 else echo('<img src="'.$html->Link('/imgs/inc/off.gif').'"> <font color="#990000" size="4\">'.$text.'</font><br />'); 20 20 } 21 21 … … 37 37 { 38 38 $this->Msg('Zadané jmnéno účtu již existuje', 1); 39 $this->Recall(3);40 39 } 41 40 } … … 55 54 $_SESSION['UserName'] = $username; 56 55 $this->Msg('Přihlášení úspěšné', 0); 57 $this->Recall(1);58 56 } else 59 57 { 60 58 $this->Msg('Přihlášení neúspěšné', 1); 61 $this->Recall(3);62 59 } 63 60 } … … 68 65 $_SESSION['UserName'] = ''; 69 66 $this->Msg('Odhlášení úspěšné', 0); 70 $this->Recall(1);71 67 } 72 68 … … 329 325 } 330 326 331 public function Recall($time)332 {333 global $Config;334 335 if(isset($_SERVER['HTTP_REFERER']))336 {337 $link = parse_url($_SERVER['HTTP_REFERER']);338 if(($link['host'] == $Config['Web']['WoWServerAddr']) or ($link['host'] == 'localhost'))339 {340 echo('<meta http-equiv="refresh" content="'.$time.';?'.$link['query'].'">');341 } else342 {343 echo('<meta http-equiv="refresh" content="'.$time.';">');344 }345 }346 }347 348 327 public function CharsOnAcc($accid) 349 328 { 350 global $Config, $System ;329 global $Config, $System, $html; 351 330 352 331 echo('<table class="BaseTable"> … … 366 345 '<td>'.$row['name'].'</td>'. 367 346 '<td>'.$this->GetPlayerLvl($row['guid']).'</td>'. 368 '<td><img src=" imgs/icons/'.$row['race'].'-'.$gender.'.gif" alt="rasa" /></td>'.369 '<td><img src=" imgs/icons/'.$row['class'].'.gif" alt="trida" /></td>'.347 '<td><img src="'.$html->Link('imgs/icons/'.$row['race'].'-'.$gender.'.gif').'" alt="rasa" /></td>'. 348 '<td><img src="'.$html->Link('/imgs/icons/'.$row['class'].'.gif').'" alt="trida" /></td>'. 370 349 '<td>'.round($row['totaltime'] / 3600).' h</td>'. 371 350 '</tr>'); -
trunk/index.php
r690 r691 10 10 $_SERVER['QUERY_STRING'] = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1); 11 11 else $_SERVER['QUERY_STRING'] = ''; 12 echo(phpinfo());12 //echo(phpinfo()); 13 13 14 14 if(count($QueryItems) > 0) … … 19 19 else die('Nenalezen soubor inc/config.php. Vytvořte jej z předlohy config.sample.php.'); 20 20 21 if(array_key_exists('RealmIndex', $_POST))22 {23 setcookie('RealmIndex', $_POST['RealmIndex']);24 $_COOKIE['RealmIndex'] = $_POST['RealmIndex'];25 }26 if(array_key_exists('RealmIndex', $_GET))27 {28 setcookie('RealmIndex', $_GET['RealmIndex']);29 $_COOKIE['RealmIndex'] = $_GET['RealmIndex'];30 }31 21 32 22 session_start(); … … 51 41 $html->Start(); 52 42 $_GET = $html->GetQueryStringArray(); 43 44 if(array_key_exists('RealmIndex', $_POST)) 45 { 46 setcookie('RealmIndex', $_POST['RealmIndex']); 47 $_COOKIE['RealmIndex'] = $_POST['RealmIndex']; 48 } 49 if(array_key_exists('RealmIndex', $_GET)) 50 { 51 setcookie('RealmIndex', $_GET['RealmIndex']); 52 $_COOKIE['RealmIndex'] = $_GET['RealmIndex']; 53 } 53 54 54 55 if(isset($_COOKIE['hof-random']) and $_COOKIE['hof-random'] == 'no') $num_headers = 1; -
trunk/pages/online-hraci.php
r690 r691 5 5 $order_dir = ($dir == 'up') ? 'ASC' :'DESC'; 6 6 $dir = ($dir == 'down') ? 'up' : 'down'; 7 $dir_img = ($dir == 'down') ? '<img src=" imgs/inc/up.gif" alt="vzestupně" />' : '<img src="imgs/inc/down.gif" alt="sestupně"/>';7 $dir_img = ($dir == 'down') ? '<img src="'.$html->Link('/imgs/inc/up.gif').'" alt="vzestupně" />' : '<img src="'.$html->Link('/imgs/inc/down.gif').'" alt="sestupně"/>'; 8 8 9 9 function MakeLink($show, $sort) 10 10 { 11 global $dir, $dir_img; 11 global $dir, $dir_img, $html; 12 12 13 if(isset($_GET['order']) and $_GET['order'] == $sort) 13 14 { … … 18 19 $arrow = ''; 19 20 } 20 return($arrow.'<a href=" ?page=online&order='.$sort.'&dir='.$dir.'">'.$show.'</a>');21 return($arrow.'<a href="'.$html->Link('/online-hraci/?order='.$sort.'&dir='.$dir).'">'.$show.'</a>'); 21 22 } 22 23 … … 46 47 { 47 48 $aliance = array(1, 3, 4, 7, 11); 48 $frakce = (in_array($row['race'], $aliance)) ? '<img src=" imgs/inc/a.gif" alt="aliance"/>' : '<img src="imgs/inc/h.gif" alt="horda" />';49 $frakce = (in_array($row['race'], $aliance)) ? '<img src="'.$html->Link('/imgs/inc/a.gif').'" alt="aliance"/>' : '<img src="'.$html->Link('/imgs/inc/h.gif').'" alt="horda" />'; 49 50 $gender = ($row['gender'] == 0) ? '0' : '1'; 50 51 echo('<tr> 51 52 <td align="center">'.$frakce.'</td> 52 53 <td align="center">'.$row['name'].'</td> 53 <td align="center"><img src=" imgs/icons/'.$row['race'].'-'.$gender.'.gif" alt="rasa" /></td>54 <td align="center"><img src=" imgs/icons/'.$row['class'].'.gif" alt="třída" /></td>54 <td align="center"><img src="'.$html->Link('/imgs/icons/'.$row['race'].'-'.$gender.'.gif').'" alt="rasa" /></td> 55 <td align="center"><img src="'.$html->Link('/imgs/icons/'.$row['class'].'.gif').'" alt="třída" /></td> 55 56 <td align="center">'.$row['level'].'</td> 56 57 <td align="center">'.$server->MapName($row['map']).'<br />('.$server->ZoneName($row['zone']).')</td> -
trunk/pages/realmlist.php
r684 r691 19 19 { 20 20 $Server = new Server($System, $DbRow['Id']); 21 $Output .= '<div style="text-align: center">'.$DbRow['Name'].' '.$DbRow['ClientVersion'].' - realmlist: <a href=" ?page=realmlist&Server='.$DbRow['Id'].'">'.$DbRow['Address'];21 $Output .= '<div style="text-align: center">'.$DbRow['Name'].' '.$DbRow['ClientVersion'].' - realmlist: <a href="'.$html->Link('/realmlist/?Server='.$DbRow['Id']).'">'.$DbRow['Address']; 22 22 if($DbRow['Port'] != 3724) $Output .= ':'.$DbRow['Port']; 23 23 $Output .= '</a></div>'; … … 35 35 { 36 36 $Realm = new Realm($System, $DbRow['Id']); 37 $Output .= '<tr><td><a href=" ?page=online&RealmIndex='.$Realm->Id.'">'.$Realm->Data['Name'].'</a></td><td>'.$Realm->Data['Rate'].'</td><td>'.$Realm->Data['Type'].'</td><td>'.$Server->OnlineStateImage($Realm->Data['Online']).'</td><td>'.$Realm->OnlineCharactersCount().' / '.$Realm->Data['MaxOnlinePlayers'].' / '.$Realm->CharacterCount().'</td></tr>';37 $Output .= '<tr><td><a href="'.$html->Link('/online-hraci/?RealmIndex='.$Realm->Id).'">'.$Realm->Data['Name'].'</a></td><td>'.$Realm->Data['Rate'].'</td><td>'.$Realm->Data['Type'].'</td><td>'.$Server->OnlineStateImage($Realm->Data['Online']).'</td><td>'.$Realm->OnlineCharactersCount().' / '.$Realm->Data['MaxOnlinePlayers'].' / '.$Realm->CharacterCount().'</td></tr>'; 38 38 $Output .= '<tr><td colspan="5">'.$Realm->Data['Description'].'</td></tr>'; 39 39 //if(array_key_exists($Index + 1, $Config['Mangos']['RealmList'])) -
trunk/pages/spolek.php
r690 r691 16 16 { 17 17 $guild_id = $id; 18 $DbResult = $db2->query('SELECT `guildid`, `name`, `createdate` FROM `guild` WHERE `guildid` = '.$guild_id.' LIMIT 1');18 $DbResult = $db2->query('SELECT `guildid`, `name`, FROM_UNIXTIME(`createdate`) AS `createdate` FROM `guild` WHERE `guildid` = '.$guild_id.' LIMIT 1'); 19 19 $guild_data = $DbResult->fetch_assoc(); 20 20 $members = $db2->query('SELECT guild_member.guid, guild_member.rank AS mrank, `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, (SELECT rname FROM guild_rank WHERE guildid ='.$guild_id.' AND rid = mrank + 1) AS rname, guild_member.pnote, guild_member.offnote FROM guild_member,`characters` LEFT JOIN guild_member k1 ON k1.`guid`=`characters`.`guid` WHERE guild_member.guildid = '.$guild_id.' AND guild_member.guid=`characters`.guid ORDER BY mrank'); … … 29 29 $time = mktime($time_stp[0], $time_stp[1], $time_stp[2], $date[1], $date[2], $date[0]); 30 30 $human_date = date('d.m.Y H:i:s', $time); 31 echo('<a href=" ?page=guildy"><- Zpět na výpis</a><br />');31 echo('<a href="'.$html->Link('/spolky/').'"><- Zpět na výpis</a><br />'); 32 32 echo('<table class="BaseTable"> 33 33 <tr> … … 93 93 echo('<tr>'. 94 94 '<td align="center">'.$member[2].'</td>'. 95 '<td align="center"><img src=" imgs/icons/'.$online['race'].'-'.$gender.'.gif" alt="pohlaví" /></td>'.96 '<td align="center"><img src=" imgs/icons/'.$online['class'].'.gif" alt="třída" /></td>'.95 '<td align="center"><img src="'.$html->Link('/imgs/icons/'.$online['race'].'-'.$gender.'.gif').'" alt="pohlaví" /></td>'. 96 '<td align="center"><img src="'.$html->Link('/imgs/icons/'.$online['class'].'.gif').'" alt="třída" /></td>'. 97 97 '<td align="center" style="color: '.$LevelColor.'">'.$Level.'</td>'. 98 98 '<td align="center">'.$member[4].' ('.$member[1].')</td>'. 99 99 '<td align="center" style="color: '.$LogoutTimeColor.'">'.$LogoutTime.'</td>'. 100 '<td align="center">'.(($online['online']) ? '<img src=" imgs/inc/on.gif" alt="online" />' : '<img src="imgs/inc/off.gif" alt="offline" />').'</td>'.100 '<td align="center">'.(($online['online']) ? '<img src="'.$html->Link('/imgs/inc/on.gif').'" alt="online" />' : '<img src="'.$html->Link('/imgs/inc/off.gif').'" alt="offline" />').'</td>'. 101 101 '</tr>'); 102 102 } 103 103 echo('</table>'); 104 } else echo('<meta http-equiv="refresh" content="0;url= ?page=guildy">');104 } else echo('<meta http-equiv="refresh" content="0;url='.$html->Link('/spolky/').'">'); 105 105 106 106 ?> -
trunk/pages/spolky.php
r690 r691 49 49 $db2 = $Realm->CharactersDatabase; 50 50 51 $sql = $db2->query('SELECT `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.';');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.';'); 52 52 while($row = $sql->fetch_assoc()) 53 53 { … … 64 64 echo('<tr> 65 65 <td align="center">'.FrakceImg($row['fraction']).'</td> 66 <td align="center"><a href="'.$html->Link('/spolek/ '.$row['guildid'].'/').'">'.$row['name'].'</a></td>66 <td align="center"><a href="'.$html->Link('/spolek/?id='.$row['guildid']).'">'.$row['name'].'</a></td> 67 67 <td align="center">'.$row['member_count'].'</td> 68 68 <td align="center">'.$online_mem['online_mem'].'</td> -
trunk/pages/ucet.php
r690 r691 5 5 if(array_key_exists('pass', $_POST)) $pass = $_POST['pass']; else $pass = ''; 6 6 7 if(isset($_POST['login']) and ($_POST['user'] != '') and ($_POST['pass'] != ''))7 function Menu() 8 8 { 9 $player->Login($user, $pass); 10 } else 11 { 9 global $html, $player; 10 12 11 if($player->Check()) 13 12 { … … 40 39 $player->LoginForm(); 41 40 } 41 42 } 43 44 if(isset($_POST['login']) and ($_POST['user'] != '') and ($_POST['pass'] != '')) 45 { 46 $player->Login($user, $pass); 47 Menu(); 48 } else 49 { 50 Menu(); 42 51 } 43 52 $html->PrgStop();
Note:
See TracChangeset
for help on using the changeset viewer.