Changeset 47 for global.php


Ignore:
Timestamp:
Aug 19, 2007, 4:58:14 PM (17 years ago)
Author:
george
Message:

Listování stránek u aktualit.
Zjednodušení generování hlavního menu do funkcí.
Doplnění položek konfigurace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.php

    r27 r47  
    88$Database->Prefix = $Config['Database']['Prefix'];
    99$Database->charset($Config['Database']['Charset']);
     10
     11$Menu = array(
     12  array('index.php', 'Home', 'home'),
     13  array('server.php', 'Server', 'server'),
     14  array('finance/', 'Finance', 'donate'),
     15  array('download_soubory/', 'Stahování', 'download'),
     16  array('jak_zacit.php', 'Jak zaèít', 'how'),
     17  array('link.php', 'Odkazy', 'link'),
     18  array('mapa.php', 'Mapa', 'mapa'),
     19  array('guild.php', 'Seznam guild', 'guilds'),
     20  array('forum/', 'Diskusní fórum', 'forum'),
     21  array('minimanager/register.php', 'Registrace', 'registrace'),
     22  array('online_player.php', 'Online hráèi', 'online_player'),
     23  array('honor.php', 'Tabulka cti', 'honor'),
     24  array('Death%20Dealers%20Hratelne%20Rasy.php', 'Rasy', 'rasy'),
     25  array('Death%20Dealers%20Povolani.php', 'Povolání', 'povolani'),
     26  array('Death%20Dealers%20Profese.php', 'Profese', 'profese'),
     27);
    1028
    1129function HumanDate($DateTime)
     
    91109}
    92110
     111function GenerateMenu()
     112{
     113  global $Config, $Menu;
     114  $Result = '';
     115  foreach($Menu as $Index => $MenuItem)
     116  {
     117    $Result .= '<a href="'.$Config['Web']['BaseURL'].$MenuItem[0].'" onMouseOver="swtch(&quot;'.($Index*2+2).'&quot;,&quot;'.$MenuItem[2].'&quot;)" onMouseOut="swtch(&quot;'.($Index*2+1).'&quot;,&quot;'.$MenuItem[2].'&quot;)"><IMG SRC="'.$Config['Web']['BaseURL'].'images/'.$MenuItem[2].'.jpg" name="'.$MenuItem[2].'" alt="'.$MenuItem[1].'" border="0"></A>';
     118  }
     119  return($Result);
     120}
     121
    93122function ShowHeader()
    94123{
    95   global $Charset, $BaseUrl;
     124  global $Config;
    96125  echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    97126<HTML>
    98127<HEAD>
    99128  <META http-equiv="Content-Language" content="cs">
    100   <META http-equiv="Content-Type" content="text/html; charset='.$Charset.'">
     129  <META http-equiv="Content-Type" content="text/html; charset='.$Config['Web']['Charset'].'">
    101130  <META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
    102131  <link rel="SHORTCUT ICON" href="images/favicon.ico">
     132  <link rel="alternate" title="RSS aktuality" href="rss.php" type="application/rss+xml">
    103133  <TITLE>WoW server Heroes of Fantasy</TITLE>
    104   <style type="text/css" media="screen">@import url('.$BaseUrl.'css/style.css);</style>
    105   <script language="JavaScript" type="text/javascript" src="'.$BaseUrl.'css/global_js.php"></script>
     134  <style type="text/css" media="screen">@import url('.$Config['Web']['BaseURL'].'css/style.css);</style>
     135  <script language="JavaScript" type="text/javascript" src="'.$Config['Web']['BaseURL'].'css/global_js.php"></script>
    106136</HEAD> 
    107137<BODY text="#cccccc">
     
    117147  ShowOnlinePlayerCount();
    118148 
    119 echo('</div>
    120 <a href="'.$BaseUrl.'index.php" onMouseOver="swtch(&quot;2&quot;,&quot;home&quot;)" onMouseOut="swtch(&quot;1&quot;,&quot;home&quot;)"><IMG SRC="'.$BaseUrl.'images/home.jpg" name="home" alt="Home" border="0"></A>
    121 <a href="'.$BaseUrl.'server.php" onMouseOver="swtch(&quot;30&quot;,&quot;Server&quot;)" onMouseOut="swtch(&quot;29&quot;,&quot;Server&quot;)"><IMG SRC="'.$BaseUrl.'images/server.jpg" name="Server" alt="Server" border="0"></A>
    122 <a href="'.$BaseUrl.'finance/" onMouseOver="swtch(&quot;4&quot;,&quot;donate&quot;)" onMouseOut="swtch(&quot;3&quot;,&quot;donate&quot;)"><IMG SRC="'.$BaseUrl.'images/donate.jpg" alt="donate" name="donate" border="0"></A>
    123 <a href="'.$BaseUrl.'download_soubory/" onMouseOver="swtch(&quot;6&quot;,&quot;download&quot;)" onMouseOut="swtch(&quot;5&quot;,&quot;download&quot;)"><IMG SRC="'.$BaseUrl.'images/download.jpg" alt="download" name="download" border="0"></A>
    124 <a href="'.$BaseUrl.'jak_zacit.php" onMouseOver="swtch(&quot;14&quot;,&quot;how&quot;)" onMouseOut="swtch(&quot;13&quot;,&quot;how&quot;)"><IMG SRC="'.$BaseUrl.'images/how.jpg" alt="how" name="how" border="0"></A>
    125 <a href="'.$BaseUrl.'link.php" onMouseOver="swtch(&quot;16&quot;,&quot;link&quot;)" onMouseOut="swtch(&quot;15&quot;,&quot;link&quot;)"><IMG SRC="'.$BaseUrl.'images/link.jpg" alt="link" name="link" border="0"></A>
    126 <a href="'.$BaseUrl.'mapa.php" onMouseOver="swtch(&quot;18&quot;,&quot;mapa&quot;)" onMouseOut="swtch(&quot;17&quot;,&quot;mapa&quot;)"><IMG SRC="'.$BaseUrl.'images/mapa.jpg" alt="mapa" name="mapa" border="0"></A>
    127 <a href="'.$BaseUrl.'guildy.php" onMouseOver="swtch(&quot;10&quot;,&quot;guildy&quot;)" onMouseOut="swtch(&quot;9&quot;,&quot;guildy&quot;)"><IMG SRC="'.$BaseUrl.'images/guilds.jpg" alt="guildy" name="guildy" border="0"></A>
    128 <a href="'.$BaseUrl.'forum/" onMouseOver="swtch(&quot;8&quot;,&quot;Forum&quot;)" onMouseOut="swtch(&quot;7&quot;,&quot;Forum&quot;)"><IMG SRC="'.$BaseUrl.'images/forum.jpg" alt="Forum" name="Forum" border="0"></A>
    129 <a href="'.$BaseUrl.'minimanager/register.php" onMouseOver="swtch(&quot;28&quot;,&quot;registrace&quot;)" onMouseOut="swtch(&quot;27&quot;,&quot;registrace&quot;)"><IMG SRC="'.$BaseUrl.'images/registrace.jpg" alt="registrace" name="registrace" border="0"></A>
    130 <a href="'.$BaseUrl.'online_player.php" onMouseOver="swtch(&quot;20&quot;,&quot;online_player&quot;)" onMouseOut="swtch(&quot;19&quot;,&quot;online_player&quot;)"><IMG SRC="'.$BaseUrl.'images/online_player.jpg" alt="online player" name="online_player" border="0"></A>
    131 <a href="'.$BaseUrl.'honor.php" onMouseOver="swtch(&quot;12&quot;,&quot;honor&quot;)" onMouseOut="swtch(&quot;11&quot;,&quot;honor&quot;)"><IMG SRC="'.$BaseUrl.'images/honor.jpg" alt="honor" name="honor" border="0"></A>
    132 <a href="'.$BaseUrl.'Death%20Dealers%20Hratelne%20Rasy.php" onMouseOver="swtch(&quot;26&quot;,&quot;Rasy&quot;)" onMouseOut="swtch(&quot;25&quot;,&quot;Rasy&quot;)"><IMG SRC="'.$BaseUrl.'images/rasy.jpg" alt="Rasy" name="Rasy" border="0"></A>
    133 <a href="'.$BaseUrl.'Death%20Dealers%20Povolani.php" onMouseOver="swtch(&quot;22&quot;,&quot;Povolani&quot;)" onMouseOut="swtch(&quot;21&quot;,&quot;Povolani&quot;)"><IMG SRC="'.$BaseUrl.'images/povolani.jpg" alt="Povolani" name="Povolani" border="0"></A>
    134 <a href="'.$BaseUrl.'Death%20Dealers%20Profese.php" onMouseOver="swtch(&quot;24&quot;,&quot;profese&quot;)" onMouseOut="swtch(&quot;23&quot;,&quot;profese&quot;)"><IMG SRC="'.$BaseUrl.'images/profese.jpg" alt="profese" name="profese" border="0"></A>');
    135 
    136 
    137 /*
    138 echo('<TABLE width="220" border="1" align="center">
    139 <TR><TD width="15%" valign="top">
    140 <P class="pAktuality">
    141 <A class="aAktuality" href="/VsechnyA.php"><i>Aktuality:</i></a>
    142 ');
    143 
    144 include('aktuality.php');
    145 */
     149
     150echo('</div>');
     151
     152echo(GenerateMenu());
    146153
    147154echo('<A HREF="http://www.toplist.cz/" target="_blank"><IMG alt="pocitadlo"
     
    156163function ShowFooter()
    157164{
    158   global $BaseUrl;
     165  global $Config;
    159166  echo('</div>
    160167    </td>
     
    165172       <I class="Paticka">
    166173   <A href="administrace/" class="Paticka">#</A>
    167       | Správce serveru: Chronos | Email: wow@zdechov.net | Poèet pøístupù: <A HREF="http://counter.cnw.cz/" TARGET=_parent>
     174      | Správce serveru: '.$Config['Web']['Admin'].' | Email: '.$Config['Web']['AdminEmail'].' | Poèet pøístupù: <A HREF="http://counter.cnw.cz/" TARGET=_parent>
    168175      <IMG SRC="http://counter.cnw.cz/monika.cgi?wowzdechov&amp;5&amp;000000&amp;FFFFFF&amp;on" BORDER=0 ALT="CNW:Counter"></A><SCRIPT type="JavaScript">
    169176      <!--
Note: See TracChangeset for help on using the changeset viewer.