1 | <?php
|
---|
2 |
|
---|
3 | include_once('global.php');
|
---|
4 |
|
---|
5 | function SystemMessage($Title, $Text)
|
---|
6 | {
|
---|
7 | echo('<table align="center"><tr><td><div class="SystemMessage"><h3>'.$Title.'</h3><div>'.$Text.'</div></div</td></tr></table>');
|
---|
8 | //ShowFooter();
|
---|
9 | //die();
|
---|
10 | }
|
---|
11 |
|
---|
12 | define('VISIBLE', 'Viditelné');
|
---|
13 | define('INVISIBLE', 'Neviditelné');
|
---|
14 |
|
---|
15 | function ShowHeader($Title, $Path, $BodyParam = '')
|
---|
16 | {
|
---|
17 | global $Time_Start, $refresh, $Config, $User, $PathTree, $Database, $System;
|
---|
18 |
|
---|
19 | $Time_Start = GetMicrotime(); // Zjisti počáteční čas
|
---|
20 | $ScriptName = $_SERVER['SCRIPT_NAME'];
|
---|
21 | while(strpos($ScriptName, '//') !== false)
|
---|
22 | $ScriptName = str_replace('//', '/', $ScriptName);
|
---|
23 | $PathTree = array('Rozcestník',
|
---|
24 | 'index.php' => '',
|
---|
25 | 'missing.php' => '',
|
---|
26 | 'manualy.php' => 'Manuály',
|
---|
27 | 'is' => array('',
|
---|
28 | 'administration_page.php' => 'Administrace sítě',
|
---|
29 | 'topologie.php' => 'Topologie sítě',
|
---|
30 | 'restart.php' => 'Restart služeb',
|
---|
31 | 'tc' => 'Řízení internetového provozu',
|
---|
32 | ),
|
---|
33 | 'network' => array('Síť',
|
---|
34 | 'dostupnost.php' => 'Dostupnost zařízení',
|
---|
35 | ),
|
---|
36 | 'network.php' => 'Technické informace',
|
---|
37 | 'mapy' => array('',
|
---|
38 | 'mapa_nabidka.php' => 'Nabídky mapy',
|
---|
39 | 'mapa.php' => 'Mapa',
|
---|
40 | ),
|
---|
41 | 'map' => array('',
|
---|
42 | 'index.php' => 'Mapa',
|
---|
43 | ),
|
---|
44 | 'nabidky_pripojeni.php' => 'Nabídky připojení',
|
---|
45 | 'telseznam.php' => 'Telefonní seznam',
|
---|
46 | 'merak.php' => 'Měřič spotřeby',
|
---|
47 | 'tkr.php' => 'Kanály kabelové televize',
|
---|
48 | 'share' => array('Prohledat sdílení',
|
---|
49 | 'index.php' => '',
|
---|
50 | 'firefox.php' => 'Integrace do prohlížeče',
|
---|
51 | ),
|
---|
52 | 'hostlist.php' => 'Seznam počítačů',
|
---|
53 | 'userlist.php' => 'Seznam uživatelů',
|
---|
54 | 'farnost' => array('',
|
---|
55 | 'index.php' => 'Rozpis mší',
|
---|
56 | ),
|
---|
57 | 'finance' => array('Finance',
|
---|
58 | 'index.php' => '',
|
---|
59 | 'spotreba.php' => 'Spotřeba',
|
---|
60 | 'zivnost.php' => 'Daňová evidence',
|
---|
61 | 'prepocet.php' => 'Přepočet financí',
|
---|
62 | 'changes.php' => 'Změny',
|
---|
63 | 'tarify.php' => 'Tarify',
|
---|
64 | 'inventory.php' => 'Skladové zásoby',
|
---|
65 | 'clenove.php' => 'Seznam členů',
|
---|
66 | 'zarizeni.php' => 'Zařízení',
|
---|
67 | 'strom.php' => 'Strom zařízení',
|
---|
68 | 'srovnani.php' => 'Porovnání tarifů s konkurencí',
|
---|
69 | 'bills_manage.php' => 'Faktury',
|
---|
70 | 'monthly_overall.php' => 'Měsíční přehledy',
|
---|
71 | 'faktury' => array('',
|
---|
72 | 'index.php' => 'Faktury za internet',
|
---|
73 | ),
|
---|
74 | ),
|
---|
75 | 'statistic' => array('',
|
---|
76 | 'trafficview.php' => 'Vytížení internetu',
|
---|
77 | 'index.php' => 'Statistika',
|
---|
78 | 'trafficview2.php' => 'Statistika',
|
---|
79 | 'bandwidth.php' => 'Zatížení internetu',
|
---|
80 | 'bandwidth_full.php' => 'Zatížení internetu všech počítačů',
|
---|
81 | ),
|
---|
82 | 'fotbal.php' => 'Fotbal',
|
---|
83 | 'webcam' => array('',
|
---|
84 | 'index.php' => 'Web kamera',
|
---|
85 | ),
|
---|
86 | 'otevreno.php' => 'Otvírací doby',
|
---|
87 | 'aktuality' => array('',
|
---|
88 | 'index.php' => 'Aktuality',
|
---|
89 | 'subscription.php' => 'RSS aktuality',
|
---|
90 | ),
|
---|
91 | 'sluzby.php' => 'Služby',
|
---|
92 | 'sunrisechat' => array('',
|
---|
93 | 'history.php' => 'Historie SunriseChatu',
|
---|
94 | 'network.php' => 'Obsah testu sítě SunriseChatu 2.7+',
|
---|
95 | 'network_old.php' => 'Obsah testu sítě SunriseChatu 2.6',
|
---|
96 | 'webchat.php' => 'Okno SunriseChatu',
|
---|
97 | ),
|
---|
98 | 'docs' => array('',
|
---|
99 | 'zapisy' => array('',
|
---|
100 | 'zapisy.php' => 'Zápisy ze schůzí',
|
---|
101 | ),
|
---|
102 | ),
|
---|
103 | 'jidelna' => array('',
|
---|
104 | 'index.php' => 'Jídelníček',
|
---|
105 | 'menuedit.php' => 'Editace jídelníčku',
|
---|
106 | ),
|
---|
107 | 'backup' => array('',
|
---|
108 | 'index.php' => 'Nastavení zálohování',
|
---|
109 | ),
|
---|
110 | 'mapa.php' => 'Mapa webu',
|
---|
111 | );
|
---|
112 | $PathTreePath = '/';
|
---|
113 | $PathTreeItem = $PathTree;
|
---|
114 | $Navigation = '<a href="'.$Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> > ';
|
---|
115 | $ScriptName = substr($ScriptName, strlen($Config['Web']['RootFolder']));
|
---|
116 | $ScriptNameParts = explode('/', $ScriptName);
|
---|
117 | array_shift($ScriptNameParts);
|
---|
118 | foreach($ScriptNameParts as $ScriptNamePart)
|
---|
119 | {
|
---|
120 | if(is_array($PathTreeItem[$ScriptNamePart]))
|
---|
121 | {
|
---|
122 | $PathTreeItem = $PathTreeItem[$ScriptNamePart];
|
---|
123 | $PathTreePath .= $ScriptNamePart.'/';
|
---|
124 | if($PathTreeItem[0] != '')
|
---|
125 | $Navigation .= '<a href="'.$Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> > ';
|
---|
126 | } else
|
---|
127 | {
|
---|
128 | if($PathTreeItem[$ScriptNamePart] != '')
|
---|
129 | $Navigation .= '<a href="'.$Config['Web']['RootFolder'].$PathTreePath.$ScriptNamePart.'">'.$PathTreeItem[$ScriptNamePart].'</a> > ';
|
---|
130 | }
|
---|
131 | }
|
---|
132 | $Navigation = substr($Navigation, 0, -6);
|
---|
133 |
|
---|
134 | $Output = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?>'.
|
---|
135 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'.
|
---|
136 | '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs">'.
|
---|
137 | '<head><link rel="stylesheet" href="'.$Config['Web']['RootFolder'].'/style/'.$Config['Web']['Style'].'/style.css" type="text/css" media="all" />'.
|
---|
138 | '<meta http-equiv="content-type" content="text/html; charset='.$Config['Web']['Charset'].'" />'.
|
---|
139 | '<script type="text/javascript" src="'.$Config['Web']['RootFolder'].'/style/'.$Config['Web']['Style'].'/global.js"></script>'.
|
---|
140 | '<title>'.$Config['Web']['Title'].' - '.$Path.'</title>
|
---|
141 | </head><body'.$BodyParam.'>
|
---|
142 | <div id="Title">'.$Title.'</div>
|
---|
143 | <div class="Navigation"><span class="MenuItem"><strong>Navigace >></strong> '.$Navigation.'</span><div class="MenuItem2"> ';
|
---|
144 | //if($System->Models['User']->User['Id'] == $System->Models['User']->AnonymousUserId)
|
---|
145 | // $Output .= '<a href="'.$Config['Web']['RootFolder'].'?Action=LoginForm">Přihlášení</a> <a href="'.$Config['Web']['RootFolder'].'?Action=RegistrationForm">Registrace</a>';
|
---|
146 | // else $Output .= $System->Models['User']->User['Name'].' <a href="?Action=Logout">Odhlásit</a> <a href="?Action=UserOptions">Nastavení</a>';
|
---|
147 | $Output .= '</div></div>';
|
---|
148 | echo($Output);
|
---|
149 | }
|
---|
150 |
|
---|
151 | function ShowFooter()
|
---|
152 | {
|
---|
153 | global $Time_Start;
|
---|
154 |
|
---|
155 | $Time = floor((GetMicrotime() - $Time_Start) * 100) / 100;
|
---|
156 | echo('<div id="Footer">
|
---|
157 | <i>| Správa webu: Jiří Hajda | e-mail: robie@centrum.cz | Vygenerováno za '.$Time.' s | Verze: 1.1 | Úprava skriptu: '.date('j.n.Y',filemtime($_SERVER['SCRIPT_FILENAME'])).' |</i>
|
---|
158 | </div>');
|
---|
159 | //ShowArray($GLOBALS);
|
---|
160 | echo('</body></html>');
|
---|
161 | }
|
---|
162 |
|
---|
163 | ?>
|
---|