1 | 1 | unreal | <?php |
2 | 5 | unreal | error_reporting(0); |
3 | 3 | unreal | // Nastavime, aby se nam zbytecne nelogovaly chyby |
4 | 4 | unreal | ini_set('log_errors',false); |
5 | 3 | unreal | |
6 | 5 | unreal | $i=0; |
7 | | | $seznam = array(); |
8 | | | $oblast = array(); |
9 | | | $item = array(); |
10 | | | $items = array(); |
11 | | | echo "<!--CZF4BFU "; |
12 | 1 | unreal | if ($dir = @opendir(".")) { |
13 | | | while (($file = readdir($dir)) !== false) |
14 | 5 | unreal | if (preg_match('/^(global|local)-.*.txt/',$file)) { |
15 | | | echo $file." "; |
16 | | | $seznam[$i] = $file; |
17 | | | ++$i; |
18 | | | } |
19 | 1 | unreal | } |
20 | 5 | unreal | echo "-->\n"; |
21 | 1 | unreal | ?> |
22 | | | |
23 | | | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
24 | | | <html> |
25 | 5 | unreal | <head> |
26 | | | <!-- Unreal][ # http://www.jklir.net # Licence: GNU/GPL # v 1.3 (c) Jirka Klír 2008 for CZFree.net ;-) # --> |
27 | | | <title>CZF4BFU</title> |
28 | | | <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" /> |
29 | | | <meta http-equiv="Content-language" content="cz" /> |
30 | | | <meta name="author" content="Unreal][, http://www.jklir.net"> |
31 | | | <link href="styl.css" rel="stylesheet" type="text/css"> |
32 | | | </head> |
33 | 1 | unreal | <body style="background: #D4D0C8"> |
34 | | | |
35 | 5 | unreal | <h1>Rozcestník CZFree.Net</h1> |
36 | 1 | unreal | |
37 | | | <?php |
38 | | | $group = $_GET["group"]; |
39 | 5 | unreal | $czf_group = $_GET["group"]; |
40 | | | $czf_oblast = $_GET["oblast"]; |
41 | | | $czf_id = $_GET["id"]; |
42 | | | |
43 | 1 | unreal | if($group!=2) { |
44 | 5 | unreal | if($czf_oblast!="") { $aname = "#".$czf_oblast; } else { $aname = ""; } |
45 | 1 | unreal | $group = !$group; |
46 | 5 | unreal | $text = (!empty($group)) ? "seskupit" : "neseskupovat"; |
47 | | | echo "<a class=\"group\" href=\"?group=".$group."&id=".$czf_id."&oblast=".$czf_oblast.$aname."\">$text podle typu služeb</a>"; |
48 | 1 | unreal | } else { |
49 | | | echo "<a class=\"group\" href=\"#\"> </a>"; |
50 | | | } |
51 | | | ?> |
52 | | | |
53 | | | <div class="tree"> |
54 | | | <a class="nomargin title" href="?oblast="><strong>CZFree.net</strong><br>celá síť</a> |
55 | | | <div class="smallicon"><a title="seznam služeb" href="?oblast="><img width="10" border="0" src="img/point.png"></a> <a title="seznam služeb" href="?oblast=">seznam služeb</a></div> |
56 | | | <div class="smallicon"><a title="seznam cloudů" href="?group=2"><img width="10" border="0" src="img/point.png"></a> <a title="seznam cloudů" href="?group=2">seznam cloudů</a></div> |
57 | | | |
58 | | | |
59 | | | <?php |
60 | | | $jmena_cloudu = array("10.1.0.0/16" => "Connection.cz / AS Centrum network", |
61 | | | "10.2.0.0/16" => "Praha - Connection.cz", |
62 | | | "10.10.0.0/16" => "reserved", |
63 | | | "10.11.0.0/16" => "Praha - Střeovice, Břevnov, Hradčany, Strahov", |
64 | | | "10.12.0.0/16" => "Praha - Nusle, Michle, Ruská ul.", |
65 | | | "10.13.0.0/16" => "Praha - Stodůlky, Nové Butovice, Luka, Luiny, Řeporyje", |
66 | | | "10.15.0.0/16" => "Praha - Malvazinky, Koíře, Motol", |
67 | | | "10.16.0.0/16" => "Praha - Barrandov", |
68 | | | "10.17.0.0/16" => "Praha - Záběhlice, Zahradní město", |
69 | | | "10.18.0.0/16" => "Praha - Dejvice, Podbaba", |
70 | | | "10.19.0.0/16" => "Praha - Suchdol, Lysolaje, Hanspaulka, Horoměřice", |
71 | | | "10.20.0.0/16" => "Praha - P6 - Dědina, Liboc, Ruzyně", |
72 | | | "10.21.0.0/16" => "Praha - Řepy, Zličín", |
73 | | | "10.22.0.0/16" => "Praha - Holeovice", |
74 | | | "10.23.0.0/16" => "Praha - Vinohrady, Vrovice, ikov", |
75 | | | "10.24.0.0/16" => "Praha - Jarov, Stranice, Maleice, Skalka", |
76 | | | "10.25.0.0/16" => "Praha - Hlubočepy, Podolí, Braník", |
77 | | | "10.26.0.0/16" => "Praha - Lipence, Zbraslav, Radotín", |
78 | | | "10.27.0.0/16" => "Praha - Modřany, Velká Chuchle, Hodkovičky", |
79 | | | "10.28.0.0/16" => "Praha - VYPAL (VYsočany, PAlmovka, Libeň)", |
80 | | | "10.30.0.0/16" => "Praha - Hostivař, Horní Měcholupy, Dolní Měcholupy, Běchovice", |
81 | | | "10.31.0.0/16" => "Praha - Bohnice, Čimice", |
82 | | | "10.32.0.0/16" => "Praha - Dolní Chabry, Ďáblice, Kobylisy, Vychovatelna", |
83 | | | "10.33.0.0/16" => "Praha - Prosek, Letňany, Čakovice", |
84 | | | "10.34.0.0/16" => "Praha - Letná, trossmajerák", |
85 | | | "10.37.0.0/16" => "Praha - Radotín", |
86 | | | "10.38.0.0/16" => "Praha - Chodov, Opatov, Háje, Kateřinky", |
87 | | | "10.39.0.0/16" => "Praha - ibřina, Újezd nad Lesy, Koloděje, Květnice", |
88 | | | "10.40.0.0/16" => "Praha - Krč, sidl.Novodvorská, Kačerov, Spořilov, Roztyly", |
89 | | | "10.41.0.0/16" => "HMNet - Horní Měcholupy", |
90 | | | "10.43.0.0/16" => "Řepná pole, Vinoř", |
91 | | | "10.44.0.0/16" => "Praha - Podolí", |
92 | | | "10.48.0.0/16" => "Praha 2, 4, 10", |
93 | | | "10.49.0.0/16" => "Praha 1, 3", |
94 | | | "10.50.0.0/16" => "Praha - Centrum Prahy", |
95 | | | "10.51.0.0/16" => "Praha - Petřiny", |
96 | | | "10.52.0.0/16" => "Praha - Vrovice", |
97 | | | "10.55.0.0/16" => "Connection.cz", |
98 | | | "10.63.0.0/17" => "Rakovník a okolí", |
99 | | | "10.66.0.0/16" => "Hostivice, Chýně, Ptice, Červený Újezd, Sobín", |
100 | | | "10.67.0.0/16" => "Rudná u Prahy, Ptice, Úhonice, Drahelčice", |
101 | | | "10.69.0.0/17" => "Mělník a okolí", |
102 | | | "10.69.128.0/17" => "Neratovice a okolí", |
103 | | | "10.70.0.0/16" => "Beroun a okolí", |
104 | | | "10.76.0.0/16" => "Plzeň - PilsFree 1", |
105 | | | "10.78.0.0/16" => "Plzeň - PilsFree 2", |
106 | | | "10.88.0.0/16" => "Říčany a okolí", |
107 | | | "10.89.0.0/16" => "Mnichovice", |
108 | | | "10.91.0.0/19" => "Velké Přílepy", |
109 | | | "10.92.0.0/19" => "Libčice nad Vltavou", |
110 | | | "10.93.0.0/16" => "Čelákovice", |
111 | | | "10.94.0.0/17" => "Mladá Boleslav a okolí", |
112 | | | "10.95.0.0/17" => "Řevnice, Dobřichovice", |
113 | | | "10.96.0.0/16" => "Venory, Karlík, Dobřichovice, Lety, Řevnice, Třebáň", |
114 | | | "10.98.0.0/16" => "Unho, Chýně, Červený Újezd, Ptice, Nouzov, Kysice, Brakov, Horní Bezděkov a dalí", |
115 | | | "10.99.0.0/18" => "Třebestovice", |
116 | | | "10.100.0.0/16" => "Říčany", |
117 | | | "10.101.0.0/16" => "Liberec", |
118 | | | "10.102.0.0/16" => "Kladno, Unho a okolí", |
119 | | | "10.103.0.0/16" => "Karlovy Vary", |
120 | | | "10.104.0.0/17" => "Jablonec", |
121 | | | "10.105.0.0/17" => "Kolín", |
122 | | | "10.106.0.0/16" => "Kutná Hora - okres", |
123 | | | "10.107.0.0/16" => "Hradec Králové", |
124 | | | "10.108.0.0/16" => "České Budějovice", |
125 | | | "10.109.0.0/16" => "Plzeň", |
126 | | | "10.110.0.0/17" => "Chrudim", |
127 | | | "10.111.0.0/16" => "Plzeň - sever", |
128 | | | "10.112.0.0/16" => "Lysá nad Labem", |
129 | | | "10.113.0.0/16" => "Louny, atec, Pobořany", |
130 | | | "10.114.0.0/16" => "Příbram", |
131 | | | "10.117.0.0/16" => "Turnov a okolí", |
132 | | | "10.120.0.0/18" => "MH2Net - Mnichovo Hraditě směr Turnov", |
133 | | | "10.128.0.0/15" => "Brno - město", |
134 | | | "10.128.0.0/16" => "Brno - město", |
135 | | | "10.129.0.0/16" => "okolí Brna", |
136 | | | "10.129.24.0/21" => "Tinov", |
137 | | | "10.130.0.0/16" => "Severní Morava", |
138 | | | "10.131.0.0/16" => "Uherské Hraditě", |
139 | | | "10.132.0.0/16" => "Střední Morava - Olomouc", |
140 | | | "10.133.0.0/16" => "Prostějov", |
141 | | | "10.134.0.0/16" => "Přerovsko", |
142 | | | "10.135.0.0/16" => "rezerva pro Moravu", |
143 | | | "10.136.0.0/16" => "testovací sítě pro Moravu", |
144 | | | "10.144.0.0/16" => "Zlín, Vsetín, Valaské Meziříčí - okresy", |
145 | | | "10.145.0.0/16" => "Nový Jičín, Kopřivnice, Frýdek Místek - okresy", |
146 | | | "10.152.0.0/16" => "Ostrava - okres", |
147 | | | "10.153.0.0/16" => "Ostrava - okres", |
148 | | | "10.154.0.0/16" => "Ostrava - okres", |
149 | | | "10.155.0.0/16" => "Ostrava - okres", |
150 | | | "10.161.0.0/16" => "Evkanet - Ostrava", |
151 | | | "10.253.0.0/16" => "NCX - Zápy", |
152 | | | "10.254.0.0/16" => "NCX Labyrint"); |
153 | | | |
154 | 4 | unreal | $order[0][0] = "TYP"; |
155 | | | $order[1][0] = "NAZEV"; |
156 | | | $sort_cz = 0; |
157 | 1 | unreal | |
158 | 4 | unreal | function arfsort( $a, $yes ) { |
159 | | | global $sort_cz; |
160 | | | $sort_cz = $yes; |
161 | 1 | unreal | usort( $a, 'arfsort_func' ); |
162 | | | return $a; |
163 | | | } |
164 | | | |
165 | | | function arfsort_func( $a, $b ){ |
166 | 5 | unreal | global $order,$sort_cz; |
167 | 2 | unreal | foreach($order as $f) { |
168 | 4 | unreal | if($sort_cz=="1") { |
169 | 5 | unreal | $a[$f[0]]=strtr($a[$f[0]], array("Á" => "azzz", "É" => "ezzz", "Í" => "izzz", "Ó" => "ozzz", "Ú" => "uzzz", "Ý" => "yzzz", "Ž" => "zzzz", "Š" => "szzz", "Č" => "czzz", "Ř" => "rzzz")); |
170 | | | $b[$f[0]]=strtr($b[$f[0]], array("Á" => "azzz", "É" => "ezzz", "Í" => "izzz", "Ó" => "ozzz", "Ú" => "uzzz", "Ý" => "yzzz", "Ž" => "zzzz", "Š" => "szzz", "Č" => "czzz", "Ř" => "rzzz")); |
171 | 1 | unreal | } |
172 | 5 | unreal | $strc = strcasecmp( $a[$f[0]], $b[$f[0]] ); |
173 | | | if ( $strc != 0 ) { |
174 | | | return $strc; |
175 | | | } |
176 | 1 | unreal | } |
177 | 2 | unreal | return 0; |
178 | 1 | unreal | } |
179 | | | |
180 | 5 | unreal | function natsort_func( $a, $b ){ |
181 | | | $strc = strnatcmp( $a,$b ); |
182 | | | if ( $strc != 0 ) { |
183 | | | return $strc; |
184 | | | } |
185 | | | return 0; |
186 | | | } |
187 | | | |
188 | 1 | unreal | function show_small($test) { |
189 | | | foreach ($test as $key=>$row) { |
190 | 5 | unreal | $oblast = $row["OBLAST"]; |
191 | | | $typ = $row["TYP"]; |
192 | | | $nazev = $row["NAZEV"]; |
193 | | | $id = $row["ID"]; |
194 | | | if($oblast==="") { $oblast="10.0.0.0/8"; } |
195 | | | $ikonka = $typ; |
196 | 1 | unreal | if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; } |
197 | 5 | unreal | // echo "<div class=\"smallicon\"><a title=\"".$nazev."\" href=\"?id=".$id."&oblast=".$oblast."#".$oblast."\"><img width=\"16\" title=\"".$nazev."\" border=\"0\" src=\"ikony/$ikonka.png\"></a> <a title=\"".$nazev."\" href=\"?id=".$id."&oblast=".$oblast."#".$oblast."\">".$nazev."</a></div>\n"; |
198 | | | echo "<div class=\"smallicon\"><a title=\"$nazev\" href=\"?id=$id&oblast=$oblast#$oblast\"><img width=\"16\" title=\"$nazev\" border=\"0\" src=\"ikony/$ikonka.png\"></a> <a title=\"$nazev\" href=\"?id=$id&oblast=$oblast#$oblast\">$nazev</a></div>\n"; |
199 | 1 | unreal | } |
200 | | | } |
201 | | | |
202 | | | function show_big($test) { |
203 | 4 | unreal | foreach ($test as $row) { |
204 | 5 | unreal | $oblast = $row["OBLAST"]; |
205 | | | $typ = $row["TYP"]; |
206 | | | $nazev = $row["NAZEV"]; |
207 | | | $popis = $row["POPIS"]; |
208 | | | $id = $row["ID"]; |
209 | | | if($oblast==="") { $oblast="10.0.0.0/8"; } |
210 | | | $ikonka = $typ; |
211 | 1 | unreal | if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; } |
212 | | | |
213 | 5 | unreal | echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblast."#".$oblast."\"><img title=\"".$popis."\" border=\"0\" width=\"32\" src=\"ikony/$ikonka.png\"><br>".$nazev."</a></div>\n"; |
214 | 1 | unreal | } |
215 | | | } |
216 | | | |
217 | | | function show_groups($test) { |
218 | 3 | unreal | $pamatuj = ""; |
219 | 4 | unreal | foreach ($test as $row) { |
220 | 5 | unreal | $oblast = $row["OBLAST"]; |
221 | | | $typ = $row["TYP"]; |
222 | | | $nazev = $row["NAZEV"]; |
223 | | | $popis = $row["POPIS"]; |
224 | | | $id = $row["ID"]; |
225 | | | if($oblast==="") { $oblast="10.0.0.0/8"; } |
226 | | | $ikonka = $typ; |
227 | | | if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; } |
228 | 1 | unreal | |
229 | 5 | unreal | if ($typ===$pamatuj) { |
230 | | | echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblast."#".$oblast."\"><img title=\"".$popis."\" border=\"0\" width=\"32\" src=\"ikony/$ikonka.png\"><br>".$nazev."</a></div>\n"; |
231 | | | } else { |
232 | | | echo "<div class=\"sizer\"></div><a name=\"".$typ."\" href=\"#".$typ."\" class=\"title\">".$typ."</a>\n"; |
233 | | | echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblast."#".$oblast."\"><img title=\"".$popis."\" border=\"0\" width=\"32\" src=\"ikony/$ikonka.png\"><br>".$nazev."</a></div>\n"; |
234 | | | } |
235 | | | $pamatuj = $typ; |
236 | 1 | unreal | } |
237 | | | } |
238 | | | |
239 | | | function show_clouds($test) { |
240 | | | global $jmena_cloudu; |
241 | 4 | unreal | foreach ($test as $row) { |
242 | 1 | unreal | if($row!="") { |
243 | 4 | unreal | $cl_popis = $jmena_cloudu["$row"]; |
244 | 1 | unreal | $cl_naz = $row; |
245 | | | $cl_nazev = $row."<br>".$cl_popis; |
246 | | | |
247 | | | echo "<div class=\"icon2\"><a title=\"".$cl_popis."\" href=\"?oblast=".$cl_naz."#".$cl_naz."\"><img title=\"".$cl_popis."\" border=\"0\" width=\"50\" src=\"img/cloud.png\"><br>".$cl_nazev."</a></div>\n"; |
248 | | | } |
249 | | | } |
250 | | | } |
251 | | | |
252 | | | function show_details($test) { |
253 | 4 | unreal | $ikonka_det = $test["TYP"]; |
254 | 1 | unreal | if(!file_exists("ikony/".$ikonka_det.".png")) { $ikonka_det = "none"; } |
255 | | | echo "<div class=\"det\">"; |
256 | | | echo "<div class=\"icon_det\"><img alt=\"$ikonka_det\" src=\"ikony/$ikonka_det.png\"></div>"; |
257 | | | echo "<div class=\"info_det\">"; |
258 | | | foreach ($test as $key=>$row) { |
259 | | | if($key!="HESLOEDIT") { |
260 | 4 | unreal | echo "<strong>".$key."</strong>: ".$test["$key"]."<br>"; |
261 | 1 | unreal | } |
262 | | | } |
263 | | | echo "</div><div class=\"info_cut\"></div></div>"; |
264 | | | } |
265 | | | |
266 | | | |
267 | 5 | unreal | if(!empty($seznam)) { |
268 | | | |
269 | 1 | unreal | $pocet_globalu = $i; |
270 | | | $polozka=-1; |
271 | 5 | unreal | for ($g=0; $g<$pocet_globalu; ++$g) { |
272 | 1 | unreal | |
273 | 5 | unreal | $file = "./".$seznam[$g]; |
274 | | | // $fp = fopen($file, "r"); |
275 | | | // $dat = fread($fp, filesize($file)); |
276 | | | // fclose($fp); |
277 | | | $dat = file_get_contents($file); |
278 | 1 | unreal | $data = explode("\n", $dat); |
279 | | | $soucet = count($data); |
280 | | | |
281 | 5 | unreal | for ($j=0; $j<=$soucet; ++$j) { |
282 | 1 | unreal | if ((($data[$j]!="") and ($data[$j]!=" ")) and ($data[$j][0]!=(chr(13)))) { |
283 | 5 | unreal | if (strtoupper(substr($data[$j], 0, 4))=="TYP:") { ++$polozka; } |
284 | 1 | unreal | $item[$polozka]=$item[$polozka].$data[$j]."<br>"; |
285 | | | } |
286 | | | $trans = array(" \\\\<br>" => "", " <br>" => "<br>", (chr(13)) => "", ": " => ":", "OBLAST:<br>" => "OBLAST:10.0.0.0/8<br>", (chr(9)) => ""); |
287 | | | $item[$polozka]=strtr($item[$polozka], $trans); |
288 | | | |
289 | | | $trans_code = array("á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň", "ž" => "ž", "š" => "š"); |
290 | | | $item[$polozka]=strtr($item[$polozka], $trans_code); |
291 | | | } |
292 | | | } |
293 | | | |
294 | | | // ------- naladujem data do 3-rozmernyho pole ------- |
295 | | | |
296 | 5 | unreal | for ($k=0; $k<=$polozka; ++$k) { |
297 | 1 | unreal | $ic = explode("<br>", $item[$k]); |
298 | | | $cnt_ic = (count($ic)); |
299 | 5 | unreal | for ($b=0; $b<=$cnt_ic; ++$b) { |
300 | 1 | unreal | if($b==$cnt_ic) { |
301 | | | $items[$k]['ID']=$k; |
302 | | | } else { |
303 | | | if(($ic[$b])!="") { |
304 | | | $pole = strpos($ic[$b], ":"); |
305 | | | if((((substr($ic[$b], 0, $pole))=="URL") or ((substr($ic[$b], 0, $pole))=="URLIP")) or ((substr($ic[$b], 0, $pole))=="URLINET")) { |
306 | | | $items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]="<a href=\"".(substr($ic[$b], $pole+1))."\">".(substr($ic[$b], $pole+1))."</a>"; |
307 | | | } else { |
308 | | | $items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]=(substr($ic[$b], $pole+1)); |
309 | | | } |
310 | | | } |
311 | | | } |
312 | | | } |
313 | | | } |
314 | | | |
315 | | | // -- zjisteni a serazeni oblasti |
316 | 4 | unreal | $cloudy = ""; |
317 | 1 | unreal | |
318 | 5 | unreal | for ($k=0; $k<=$polozka; ++$k) { |
319 | | | if ((preg_match("/OBLAST:/i", $item[$k])) and (!preg_match("/OBLAST:<br>/i", $item[$k]))) { |
320 | 4 | unreal | preg_match('%OBLAST:(.*?)(<br)%s', $item[$k], $cloud); |
321 | | | if (!eregi($cloud[1], $cloudy)) { |
322 | | | $cloudy .= $cloud[1].";"; |
323 | 1 | unreal | } |
324 | | | } |
325 | | | } |
326 | 5 | unreal | $cloudy = substr($cloudy, 0, -1); |
327 | 1 | unreal | $oblast = explode(";", $cloudy); |
328 | 5 | unreal | $pocet_oblasti = count($oblast)-1; |
329 | 1 | unreal | |
330 | 5 | unreal | // -- seradime oblasti (bublinkovy razeni je silene pomaly) |
331 | | | usort( $oblast, 'natsort_func' ); |
332 | 1 | unreal | |
333 | | | |
334 | | | // ------- zapiseme hodnoty do cloudovskych poli ------- |
335 | | | |
336 | 5 | unreal | for ($o=0; $o<=$pocet_oblasti; ++$o) { |
337 | 4 | unreal | foreach ($items as $row) { |
338 | | | if($row["OBLAST"]=="") { $row["OBLAST"]="10.0.0.0/8"; } |
339 | | | if($row["OBLAST"]==$oblast[$o]) { |
340 | | | $obl["$oblast[$o]"][]=$row; |
341 | 3 | unreal | } |
342 | 1 | unreal | } |
343 | | | } |
344 | | | |
345 | | | // ------- prekodujem nazvy cloudu, aby nam nedelaly bordel pri spatnym kodovani ------- |
346 | | | |
347 | | | for ($o=0; $o<=$pocet_oblasti; $o++) { |
348 | | | $trans_code = array("á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň"); |
349 | | | $jmena_cloudu["$oblast[$o]"]=strtr($jmena_cloudu["$oblast[$o]"], $trans_code); |
350 | | | } |
351 | | | |
352 | | | // ------- vypis ve sloupecku vlevo ------- |
353 | | | |
354 | | | for ($o=0; $o<=$pocet_oblasti; $o++) { |
355 | | | echo "<a class=\"title\" name=\"".$oblast[$o]."\" href=\"?oblast=".$oblast[$o]."#".$oblast[$o]."\"><span class=\"cloudip\">".$oblast[$o]."</span>\n"; |
356 | 4 | unreal | if(strlen($jmena_cloudu["$oblast[$o]"])>=1) { |
357 | | | echo "<br>".$jmena_cloudu["$oblast[$o]"]."</a>"; |
358 | 1 | unreal | } else { |
359 | | | echo "</a>"; |
360 | | | } |
361 | | | |
362 | 2 | unreal | $sorted["$oblast[$o]"] = arfsort( $obl["$oblast[$o]"], 0); |
363 | 1 | unreal | show_small($sorted["$oblast[$o]"]); |
364 | | | |
365 | | | } |
366 | | | |
367 | | | ?> |
368 | | | |
369 | | | </div> |
370 | | | <div class="items"> |
371 | | | |
372 | | | <?php |
373 | | | |
374 | | | //############# PODMINKY ZOBRAZENI ###############// |
375 | | | |
376 | 6 | unreal | if(($czf_group!="1") and ($czf_group!="2")) { $czf_group = ""; } |
377 | 1 | unreal | |
378 | | | |
379 | | | // ------- pokud neni uvedena oblast ani id ani groupa ------- |
380 | | | |
381 | 5 | unreal | if ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="")) { |
382 | 2 | unreal | $sorted0 = arfsort( $items, 1); |
383 | 1 | unreal | show_big($sorted0); |
384 | | | |
385 | | | echo "<div class=\"sizer\"></div></div>"; |
386 | | | } |
387 | | | |
388 | | | // ------- pokud neni uvedena oblast ani id ale groupa ano ------- |
389 | | | |
390 | 5 | unreal | if ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="1")) { |
391 | 2 | unreal | $sorted0 = arfsort( $items, 1); |
392 | 1 | unreal | show_groups($sorted0); |
393 | | | |
394 | | | echo "<div class=\"sizer\"></div></div>"; |
395 | | | } |
396 | | | |
397 | | | // ------- pokud neni uvedena oblast ani id ale groupa je 2 ------- |
398 | | | |
399 | 5 | unreal | if ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="2")) { |
400 | 1 | unreal | |
401 | | | show_clouds($oblast); |
402 | | | |
403 | | | echo "<div class=\"sizer\"></div></div>"; |
404 | | | } |
405 | | | |
406 | | | |
407 | | | // ------- pokud je uvedena oblast i id sluzby ale groupa ne ------- |
408 | | | |
409 | 5 | unreal | if ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="")) { |
410 | 1 | unreal | |
411 | 5 | unreal | show_big($sorted[$czf_oblast]); |
412 | 1 | unreal | |
413 | | | echo "<div class=\"sizer\"></div></div>\n"; |
414 | | | echo "<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div>"; |
415 | | | echo "<div class=\"contents\">\n"; |
416 | 5 | unreal | if ($czf_id<=$polozka) { |
417 | 1 | unreal | |
418 | 5 | unreal | show_details($items[$czf_id]); |
419 | 1 | unreal | |
420 | | | } else { |
421 | | | echo "<br>Položka neexistuje<br>"; |
422 | | | } |
423 | | | echo "</div></div>\n"; |
424 | | | |
425 | | | } |
426 | | | |
427 | | | // ------- pokud je uvedena oblast i id sluzby i groupa ------- |
428 | | | |
429 | 5 | unreal | if ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="1")) { |
430 | 1 | unreal | |
431 | 5 | unreal | show_groups($sorted[$czf_oblast]); |
432 | 1 | unreal | |
433 | | | echo "<div class=\"sizer\"></div></div>\n"; |
434 | | | echo "<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div>"; |
435 | | | echo "<div class=\"contents\">\n"; |
436 | 5 | unreal | if ($czf_id<=$polozka) { |
437 | 1 | unreal | |
438 | 5 | unreal | show_details($items[$czf_id]); |
439 | 1 | unreal | |
440 | | | } else { |
441 | | | echo "<br>Položka neexistuje<br>"; |
442 | | | } |
443 | | | echo "</div></div>\n"; |
444 | | | |
445 | | | } |
446 | | | |
447 | | | |
448 | | | // ------- pokud neni uvedena oblast ale id a groupa ne ------- |
449 | | | |
450 | 5 | unreal | if ((($czf_oblast=="") and ($czf_id!="")) and ($czf_group=="")) { |
451 | | | if ($czf_id<=$polozka) { |
452 | 1 | unreal | |
453 | 5 | unreal | if(($items[$czf_id]["OBLAST"])=="") { |
454 | 1 | unreal | $sorted4 = $sorted["10.0.0.0/8"]; |
455 | | | } else { |
456 | 5 | unreal | $sorted4 = $sorted[$items[$czf_id]['OBLAST']]; |
457 | 1 | unreal | } |
458 | | | |
459 | | | show_big($sorted4); |
460 | | | |
461 | | | } else { |
462 | | | |
463 | 2 | unreal | $sorted0 = arfsort( $items, 1); |
464 | 1 | unreal | show_big($sorted0); |
465 | | | |
466 | | | } |
467 | | | |
468 | | | |
469 | | | echo "<div class=\"sizer\"></div></div>\n"; |
470 | | | echo "<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div>"; |
471 | | | echo "<div class=\"contents\">\n"; |
472 | 5 | unreal | if ($czf_id<=$polozka) { |
473 | 1 | unreal | |
474 | 5 | unreal | show_details($items[$czf_id]); |
475 | 1 | unreal | |
476 | | | } else { |
477 | | | echo "<br>Položka neexistuje<br>"; |
478 | | | } |
479 | | | echo "</div></div>\n"; |
480 | | | |
481 | | | } |
482 | | | |
483 | | | // ------- pokud neni uvedena oblast ale id a groupa ano ------- |
484 | | | |
485 | 5 | unreal | if ((($czf_oblast=="") and ($czf_id!="")) and ($czf_group=="1")) { |
486 | | | if ($czf_id<=$polozka) { |
487 | 1 | unreal | |
488 | 5 | unreal | if(($items[$czf_id]["OBLAST"])=="") { |
489 | 1 | unreal | $sorted4 = $sorted["10.0.0.0/8"]; |
490 | | | } else { |
491 | 5 | unreal | $sorted4 = $sorted[$items[$czf_id]['OBLAST']]; |
492 | 1 | unreal | } |
493 | | | |
494 | | | show_groups($sorted4); |
495 | | | |
496 | | | } else { |
497 | | | |
498 | 2 | unreal | $sorted0 = arfsort( $items, 1); |
499 | 1 | unreal | show_groups($sorted0); |
500 | | | |
501 | | | } |
502 | | | |
503 | | | |
504 | | | echo "<div class=\"sizer\"></div></div>\n"; |
505 | | | echo "<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div>"; |
506 | | | echo "<div class=\"contents\">\n"; |
507 | 5 | unreal | if ($czf_id<=$polozka) { |
508 | 1 | unreal | |
509 | 5 | unreal | show_details($items[$czf_id]); |
510 | 1 | unreal | |
511 | | | } else { |
512 | | | echo "<br>Položka neexistuje<br>"; |
513 | | | } |
514 | | | echo "</div></div>\n"; |
515 | | | |
516 | | | } |
517 | | | |
518 | | | // ------- pokud je uvedena oblast ale ne id ani groupa ------- |
519 | | | |
520 | 5 | unreal | if ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="")){ |
521 | 1 | unreal | |
522 | 5 | unreal | show_big($sorted[$czf_oblast]); |
523 | 1 | unreal | |
524 | | | echo "<div class=\"sizer\"></div></div>\n"; |
525 | | | |
526 | | | } |
527 | | | |
528 | | | // ------- pokud je uvedena oblast a groupa ale ne id ------- |
529 | | | |
530 | 5 | unreal | if ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="1")){ |
531 | 1 | unreal | |
532 | 5 | unreal | show_groups($sorted[$czf_oblast]); |
533 | 1 | unreal | |
534 | | | echo "<div class=\"sizer\"></div></div>\n"; |
535 | | | |
536 | | | } |
537 | | | |
538 | 5 | unreal | unset($oblast); |
539 | | | unset($item); |
540 | | | unset($items); |
541 | 1 | unreal | |
542 | | | } // end |
543 | | | |
544 | 5 | unreal | unset($seznam); |
545 | | | |
546 | 1 | unreal | ?> |
547 | | | |
548 | | | <div id="copy">czf4bfu v1.3 - made <a href="http://www.jklir.net">Unreal][</a> </div> |
549 | | | </body> |
550 | | | </html> |