1 | <?php
|
---|
2 | include_once('global.php');
|
---|
3 |
|
---|
4 | function ShowHeader($Title, $Path, $BodyParam = '')
|
---|
5 | {
|
---|
6 | global $Time_Start, $refresh, $Config;
|
---|
7 |
|
---|
8 | $Time_Start = GetMicrotime(); // Zjisti počáteční čas
|
---|
9 | $ScriptName = $_SERVER['SCRIPT_NAME'];
|
---|
10 | while(strpos($ScriptName, '//') !== false)
|
---|
11 | $ScriptName = str_replace('//', '/', $ScriptName);
|
---|
12 | $PathTree = array('Rozcestník',
|
---|
13 | 'index.php' => '',
|
---|
14 | 'missing.php' => '',
|
---|
15 | 'manualy.php' => 'Manuály',
|
---|
16 | 'is' => array('',
|
---|
17 | 'administration_page.php' => 'Administrace sítě',
|
---|
18 | 'topologie.php' => 'Topologie sítě',
|
---|
19 | 'dostupnost.php' => 'Dostupnost zařízení',
|
---|
20 | 'restart.php' => 'Restart služeb',
|
---|
21 | ),
|
---|
22 | 'network.php' => 'Technické informace',
|
---|
23 | 'mapy' => array('',
|
---|
24 | 'mapa_nabidka.php' => 'Nabídky mapy',
|
---|
25 | 'mapa.php' => 'Mapa',
|
---|
26 | ),
|
---|
27 | 'map' => array('',
|
---|
28 | 'index.php' => 'Mapa',
|
---|
29 | ),
|
---|
30 | 'nabidky_pripojeni.php' => 'Nabídky připojení',
|
---|
31 | 'telseznam.php' => 'Telefonní seznam',
|
---|
32 | 'merak.php' => 'Měřič spotřeby',
|
---|
33 | 'tkr.php' => 'Kanály kabelové televize',
|
---|
34 | 'share' => array('Prohledat sdílení',
|
---|
35 | 'index.php' => '',
|
---|
36 | 'firefox.php' => 'Integrace do prohlížeče',
|
---|
37 | ),
|
---|
38 | 'hostlist.php' => 'Seznam počítačů',
|
---|
39 | 'userlist.php' => 'Seznam uživatelů',
|
---|
40 | 'farnost' => array('',
|
---|
41 | 'index.php' => 'Rozpis mší',
|
---|
42 | ),
|
---|
43 | 'finance' => array('Finance',
|
---|
44 | 'index.php' => '',
|
---|
45 | 'spotreba.php' => 'Spotřeba',
|
---|
46 | 'prepocet.php' => 'Přepočet financí',
|
---|
47 | 'changes.php' => 'Změny',
|
---|
48 | 'tarify.php' => 'Tarify',
|
---|
49 | 'inventory.php' => 'Skladové zásoby',
|
---|
50 | 'clenove.php' => 'Seznam členů',
|
---|
51 | 'zarizeni.php' => 'Zařízení',
|
---|
52 | 'strom.php' => 'Strom zařízení',
|
---|
53 | 'srovnani.php' => 'Porovnání tarifů s konkurencí',
|
---|
54 | 'bills.php' => 'Faktury',
|
---|
55 | 'faktury' => array('',
|
---|
56 | 'index.php' => 'Faktury za internet',
|
---|
57 | ),
|
---|
58 | ),
|
---|
59 | 'statistic' => array('',
|
---|
60 | 'trafficview.php' => 'Vytížení internetu',
|
---|
61 | 'index.php' => 'Statistika',
|
---|
62 | 'trafficview2.php' => 'Statistika',
|
---|
63 | 'bandwidth.php' => 'Zatížení internetu',
|
---|
64 | 'bandwidth_full.php' => 'Zatížení internetu všech počítačů',
|
---|
65 | ),
|
---|
66 | 'fotbal.php' => 'Fotbal',
|
---|
67 | 'webcam' => array('',
|
---|
68 | 'index.php' => 'Web kamera',
|
---|
69 | ),
|
---|
70 | 'navody.php' => 'Návody',
|
---|
71 | 'ukoly.php' => 'Plány do budoucna',
|
---|
72 | 'otevreno.php' => 'Otvírací doby',
|
---|
73 | 'aktuality' => array('',
|
---|
74 | 'index.php' => 'Aktuality',
|
---|
75 | 'subscription.php' => 'RSS aktuality',
|
---|
76 | ),
|
---|
77 | 'sluzby.php' => 'Služby<',
|
---|
78 | 'history.php' => 'Historie',
|
---|
79 | 'sunrisechat' => array('',
|
---|
80 | 'history.php' => 'Historie SunriseChatu',
|
---|
81 | 'network.php' => 'Obsah testu sítě SunriseChatu 2.7+',
|
---|
82 | 'network_old.php' => 'Obsah testu sítě SunriseChatu 2.6',
|
---|
83 | 'webchat.php' => 'Okno SunriseChatu',
|
---|
84 | ),
|
---|
85 | 'docs' => array('',
|
---|
86 | 'zapisy' => array('',
|
---|
87 | 'zapisy.php' => 'Zápisy ze schůzí',
|
---|
88 | ),
|
---|
89 | ),
|
---|
90 | 'jidelna' => array('',
|
---|
91 | 'index.php' => 'Jídelníček',
|
---|
92 | 'menuedit.php' => 'Editace jídelníčku',
|
---|
93 | ),
|
---|
94 | 'backup' => array('',
|
---|
95 | 'index.php' => 'Nastavení zálohování',
|
---|
96 | ),
|
---|
97 | );
|
---|
98 | $PathTreePath = '/';
|
---|
99 | $PathTreeItem = $PathTree;
|
---|
100 | $Navigation = '<a href="'.$Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> > ';
|
---|
101 | $ScriptName = substr($ScriptName, strlen($Config['Web']['RootFolder']));
|
---|
102 | $ScriptNameParts = explode('/', $ScriptName);
|
---|
103 | array_shift($ScriptNameParts);
|
---|
104 | foreach($ScriptNameParts as $ScriptNamePart)
|
---|
105 | {
|
---|
106 | //echo($ScriptNamePart.'<br>');
|
---|
107 | if(is_array($PathTreeItem[$ScriptNamePart]))
|
---|
108 | {
|
---|
109 | $PathTreeItem = $PathTreeItem[$ScriptNamePart];
|
---|
110 | $PathTreePath .= $ScriptNamePart.'/';
|
---|
111 | if($PathTreeItem[0] != '')
|
---|
112 | $Navigation .= '<a href="'.$Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> > ';
|
---|
113 | } else
|
---|
114 | {
|
---|
115 | if($PathTreeItem[$ScriptNamePart] != '')
|
---|
116 | $Navigation .= '<a href="'.$Config['Web']['RootFolder'].$PathTreePath.$ScriptNamePart.'">'.$PathTreeItem[$ScriptNamePart].'</a> > ';
|
---|
117 | }
|
---|
118 | }
|
---|
119 | $Navigation = substr($Navigation, 0, -6);
|
---|
120 |
|
---|
121 | echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
122 | <html><head>
|
---|
123 | <meta http-equiv="Content-Language" content="cs">
|
---|
124 | <meta http-equiv="Content-Type" content="text/html; charset='.$Config['Web']['Charset'].'">');
|
---|
125 | if (isset($refresh)) echo('<meta http-equiv="Refresh" content="'.$refresh."\">\n");
|
---|
126 | // <link href="style.css" rel="stylesheet" type="text/css">
|
---|
127 | echo("\n".' <title>Centrála - '.$Path.'</title>
|
---|
128 | </head><body style="font-family: sans-serif;" '.$BodyParam.'>
|
---|
129 | <div style="padding: 3px; font-size: 20px; border-style: solid; border-color: blue; border-width: 1; background-color: #F0F0FF; margin-bottom: 4px;">'.$Title.'</div>
|
---|
130 | <div style="border-style: solid; border-bottom-color: gray; border-width: 0 0 1 0; margin-bottom: 3px; padding-bottom: 2px;"><strong>Navigace >></strong> '.$Navigation.'</div>');
|
---|
131 | }
|
---|
132 |
|
---|
133 | function ShowFooter()
|
---|
134 | {
|
---|
135 | global $Time_Start;
|
---|
136 | $Time = floor((GetMicrotime() - $Time_Start)*100)/100;
|
---|
137 | echo('<div style="border-style: solid; border-top-color: gray; border-width: 1 0 0 0; margin-top: 7px; padding-top: 2px;" align="center">
|
---|
138 | <i style="font-size: 10;">| Web mistr: Jiří Hajda | e-mail: robie@centrum.cz | ICQ: 277158770 | Vygenerováno za '.$Time.' s | Verze: 1.0 | Naposledy aktualizováno: '.date('j.n.Y',filemtime($_SERVER['SCRIPT_FILENAME'])).' |</i>
|
---|
139 | </div>');
|
---|
140 | //ShowArray($GLOBALS);
|
---|
141 | echo('</body></html>');
|
---|
142 | }
|
---|
143 |
|
---|
144 | ?>
|
---|