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