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