Changeset 690 for trunk/inc/html.php
- Timestamp:
- Mar 19, 2010, 9:22:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/html.php
r684 r690 32 32 } 33 33 } 34 35 function Link($Path) 36 { 37 global $Config; 38 39 if(substr($Path, 0, 1) == '/') return($Config['Web']['BaseURL'].$Path); 40 return($Path); 41 } 34 42 35 43 private function CfgChck($value) … … 60 68 '<meta name="description" content="'.$Config['Web']['Description'].'" />'. 61 69 '<meta name="keywords" content="'.$Config['Web']['Keywords'].'" />'. 62 '<link rel="stylesheet" type="text/css" href=" styles/style.css" />'.63 '<link href=" inc/teamspeakdisplay/teamspeakdisplay.css" rel="stylesheet" type="text/css" />'.64 '<link rel="alternate" title="Články" href=" rss.php?category=articles" type="application/rss+xml" />'.65 '<link rel="alternate" title="Finanční přispěvky" href=" rss.php?category=finance" type="application/rss+xml" />'.66 '<script type="text/javascript" src=" styles/global.js"></script>'.67 '<!--[if IE]><link rel="stylesheet" type="text/css" href=" styles/ie.css" /><![endif]-->'.70 '<link rel="stylesheet" type="text/css" href="'.$this->Link('/styles/style.css.php').'" />'. 71 '<link href="'.$this->Link('/inc/teamspeakdisplay/teamspeakdisplay.css').'" rel="stylesheet" type="text/css" />'. 72 '<link rel="alternate" title="Články" href="'.$this->Link('/rss.php?category=articles').'" type="application/rss+xml" />'. 73 '<link rel="alternate" title="Finanční přispěvky" href="'.$this->Link('rss.php?category=finance').'" type="application/rss+xml" />'. 74 '<script type="text/javascript" src="'.$this->Link('/styles/global.js').'"></script>'. 75 '<!--[if IE]><link rel="stylesheet" type="text/css" href="'.$this->Link('styles/ie.css').'" /><![endif]-->'. 68 76 '</head>'. 69 77 '<body>'; … … 100 108 } 101 109 102 public function Pager($get, $dir_pages, $def)103 {104 $anti_ref = array105 (106 'server' => 5,107 'events' => 2,108 'aukce' => 2,109 'gmlog' => 300,110 'online' => 2,111 );112 $site_show = $dir_pages.'/'.$get.'.php';113 if(isset($anti_ref[$get]))114 {115 if(!$this->Antirefresh($anti_ref[$get], $get))116 {117 if(($site_show != '') and is_readable($site_show)) return($site_show);118 else return('./'.$dir_pages.'/'.$def.'.php');119 } else120 {121 $this->RefreshMsg($this->Antirefresh($anti_ref[$get], $get), $get);122 return($dir_pages.'/free.php');123 }124 } else125 {126 if(($site_show != '') and is_readable($site_show)) return($site_show);127 else return($dir_pages.'/'.$def.'.php');128 }129 }130 131 public function Antirefresh($value, $page)132 {133 $hash = md5($page);134 if(isset($_SESSION['rf'.$hash.'rsh']))135 {136 $refresh = $_SESSION['rf'.$hash.'rsh'] + $value;137 if(time() < $refresh)138 {139 $dif = $refresh - time();140 return($dif);141 }142 }143 $_SESSION['rf'.$hash.'rsh'] = time();144 }145 146 public function RefreshMsg($dif, $get)147 {148 if($dif != 0)149 {150 if($dif > 60)151 {152 $dif = round($dif / 60).' min';153 $refresh = 30;154 } else155 {156 $dif = $dif.' s';157 $refresh = 2;158 }159 echo('<center><h3>Refresh omezení</h3></center>160 Stránka nepovoluje tak krátký čas pro refresh (znovunačtení).<br />161 Další načtení stránky <b>?page='.$get.'</b> bude možné za <b>'.$dif.'</b>.<br />162 Pokud tento čas vyčkáte budete přesměrován automaticky !163 <meta http-equiv="refresh" content="'.$refresh.';url=">');164 }165 }166 167 110 public function PrgStart() 168 111 { 169 echo('<table align="center" width="346" height="417" border="0" style="background-image: url(imgs/web/prg.gif);"> 112 global $html; 113 114 echo('<table align="center" width="346" height="417" border="0" style="background-image: url('.$html->Link('/imgs/web/prg.gif').');"> 170 115 <tr height="80"> 171 116 <td width="20"></td> … … 262 207 function QuickNew() 263 208 { 264 global $server, $Config, $System ;209 global $server, $Config, $System, $html; 265 210 266 211 // Check servers online state. … … 280 225 '<tr>'. 281 226 '<td colspan="2">'. 282 '<strong>Server : </strong>'.$server->OnlineStateImage($OnlineState).'<b> (<a href=" ?page=realmlist">'.$server->OnlineCharactersCount().' hráčů celkem</a>) | Patch '.$Config['Mangos']['ClientVersion'].' | <a href="'.$Config['Web']['BaseURL'].'/pages/realmlist.wtf">Realmlist</a> | <a href="?page=server">Server info</a> | <a href="?page=realmlist">Seznam světů</a></b>'.227 '<strong>Server : </strong>'.$server->OnlineStateImage($OnlineState).'<b> (<a href="'.$html->Link('/realmlist/').'">'.$server->OnlineCharactersCount().' hráčů celkem</a>) | Patch '.$Config['Mangos']['ClientVersion'].' | <a href="'.$html->Link('/pages/realmlist.wtf').'">Realmlist</a> | <a href="'.$html->Link('/server/').'">Server info</a> | <a href="'.$html->Link('/realmlist/').'">Seznam světů</a></b>'. 283 228 '</td></tr></table><br />'); 284 229 } … … 294 239 { 295 240 $Item = explode('=', $Part); 296 $Result[$Item[0]] = $Item[1]; 241 if(count($Item) > 1) $Result[$Item[0]] = $Item[1]; 242 else $Result[$Item[0]] = ''; 297 243 } 298 244 }
Note:
See TracChangeset
for help on using the changeset viewer.