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 | 16 | unreal | <!-- Unreal][ # http://www.jklir.net # Licence: GNU/GPL # v 1.6 (c) Jirka Klír 2010 for CZFree.net ;-) # --> |
34 | | | <title>CZF4BFU<?php if($_GET["oblast"]!="") echo " | ".$_GET["oblast"]; ?><?php if($_GET["group"]=="2") echo " | Cloudy"; ?></title> |
35 | 5 | unreal | <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" /> |
36 | 12 | unreal | <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 | | | $order[0][0] = "TYP"; |
180 | | | $order[1][0] = "NAZEV"; |
181 | 2 | unreal | foreach($order as $f) { |
182 | 4 | unreal | if($sort_cz=="1") { |
183 | 5 | unreal | $a[$f[0]]=strtr($a[$f[0]], array("Á" => "azzz", "É" => "ezzz", "Í" => "izzz", "Ó" => "ozzz", "Ú" => "uzzz", "Ý" => "yzzz", "Ž" => "zzzz", "Š" => "szzz", "Č" => "czzz", "Ř" => "rzzz")); |
184 | | | $b[$f[0]]=strtr($b[$f[0]], array("Á" => "azzz", "É" => "ezzz", "Í" => "izzz", "Ó" => "ozzz", "Ú" => "uzzz", "Ý" => "yzzz", "Ž" => "zzzz", "Š" => "szzz", "Č" => "czzz", "Ř" => "rzzz")); |
185 | 1 | unreal | } |
186 | 12 | unreal | $strc = strcasecmp($a[$f[0]],$b[$f[0]]); |
187 | | | if ($strc!=0) { |
188 | 5 | unreal | return $strc; |
189 | | | } |
190 | 1 | unreal | } |
191 | 2 | unreal | return 0; |
192 | 1 | unreal | } |
193 | | | |
194 | 12 | unreal | function natsort_func($a,$b){ |
195 | | | $strc = strnatcmp($a,$b); |
196 | | | if ($strc!=0) { |
197 | 5 | unreal | return $strc; |
198 | | | } |
199 | | | return 0; |
200 | | | } |
201 | | | |
202 | 16 | unreal | function get_icon($bfufile, $icon, $typ) { |
203 | | | if(isset($icon)) { |
204 | | | preg_match('/^(.*)\/([^\/]+)$/i', $icon, $iconname); |
205 | | | $ikonka = "cache/".$bfufile."_".$iconname[2]; |
206 | | | if(!file_exists($ikonka)) { |
207 | | | $ikonka = "ikony/".$typ.".png"; |
208 | | | if(!file_exists($ikonka)) { |
209 | | | $ikonka = "ikony/none.png"; |
210 | | | } |
211 | | | } |
212 | | | } else { |
213 | | | $ikonka = "ikony/".$typ.".png"; |
214 | | | if(!file_exists($ikonka)) { $ikonka = "ikony/none.png"; } |
215 | | | } |
216 | | | return $ikonka; |
217 | | | } |
218 | | | |
219 | 1 | unreal | function show_small($test) { |
220 | | | foreach ($test as $key=>$row) { |
221 | 7 | unreal | $oblastx = $row["OBLAST"]; |
222 | 5 | unreal | $typ = $row["TYP"]; |
223 | | | $nazev = $row["NAZEV"]; |
224 | | | $id = $row["ID"]; |
225 | 16 | unreal | $ikonka = $row["BFUICON"]; |
226 | | | echo "<div class=\"smallicon\"><a title=\"$nazev\" href=\"?id=$id&oblast=$oblastx#$oblastx\"><img title=\"$nazev\" src=\"$ikonka\"><span>$nazev</span></a></div>\n"; |
227 | 1 | unreal | } |
228 | | | } |
229 | | | |
230 | | | function show_big($test) { |
231 | 4 | unreal | foreach ($test as $row) { |
232 | 7 | unreal | $oblastx = $row["OBLAST"]; |
233 | 5 | unreal | $typ = $row["TYP"]; |
234 | | | $nazev = $row["NAZEV"]; |
235 | | | $popis = $row["POPIS"]; |
236 | | | $id = $row["ID"]; |
237 | 16 | unreal | $ikonka = $row["BFUICON"]; |
238 | | | echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; |
239 | 1 | unreal | } |
240 | | | } |
241 | | | |
242 | | | function show_groups($test) { |
243 | 3 | unreal | $pamatuj = ""; |
244 | 12 | unreal | $x = 0; |
245 | 4 | unreal | foreach ($test as $row) { |
246 | 7 | unreal | $oblastx = $row["OBLAST"]; |
247 | 5 | unreal | $typ = $row["TYP"]; |
248 | | | $nazev = $row["NAZEV"]; |
249 | | | $popis = $row["POPIS"]; |
250 | | | $id = $row["ID"]; |
251 | 16 | unreal | $ikonka = $row["BFUICON"]; |
252 | 1 | unreal | |
253 | 5 | unreal | if ($typ===$pamatuj) { |
254 | 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"; |
255 | 5 | unreal | } else { |
256 | 12 | unreal | if($x==0) { $nomargin = "nomargin "; $x==1; } else { $nomargin = ""; } |
257 | | | echo "<div class=\"sizer\"></div><a name=\"".$typ."\" href=\"#".$typ."\" class=\"".$nomargin."title\">".$typ."</a>\n"; |
258 | 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"; |
259 | 5 | unreal | } |
260 | | | $pamatuj = $typ; |
261 | 1 | unreal | } |
262 | | | } |
263 | | | |
264 | | | function show_clouds($test) { |
265 | | | global $jmena_cloudu; |
266 | 4 | unreal | foreach ($test as $row) { |
267 | 1 | unreal | if($row!="") { |
268 | 4 | unreal | $cl_popis = $jmena_cloudu["$row"]; |
269 | 1 | unreal | $cl_naz = $row; |
270 | | | $cl_nazev = $row."<br>".$cl_popis; |
271 | | | |
272 | 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"; |
273 | 1 | unreal | } |
274 | | | } |
275 | | | } |
276 | | | |
277 | | | function show_details($test) { |
278 | 4 | unreal | $ikonka_det = $test["TYP"]; |
279 | 16 | unreal | $ikonka_url = $test["BFUICON"]; |
280 | 1 | unreal | echo "<div class=\"det\">"; |
281 | 16 | unreal | echo "<div class=\"icon_det\"><img alt=\"$ikonka_det\" src=\"$ikonka_url\"></div>"; |
282 | 1 | unreal | echo "<div class=\"info_det\">"; |
283 | | | foreach ($test as $key=>$row) { |
284 | 16 | unreal | if(!preg_match('%^(?:HESLOEDIT|SOURCE|BFUFILE|BFUICON|#)%',$key)) { |
285 | 14 | unreal | if (preg_match('%^URL(?:|IP|INET)%',$key)) { |
286 | | | $row = "<a href=\"".$row."\">".$row."</a>"; |
287 | | | } |
288 | | | echo "<strong>".$key."</strong>: ".$row."<br>"; |
289 | 1 | unreal | } |
290 | | | } |
291 | | | echo "</div><div class=\"info_cut\"></div></div>"; |
292 | | | } |
293 | | | |
294 | 5 | unreal | if(!empty($seznam)) { |
295 | | | |
296 | 11 | unreal | $item = array(); |
297 | | | $items = array(); |
298 | | | $oblast = array(); |
299 | | | |
300 | 1 | unreal | $polozka=-1; |
301 | 16 | unreal | $patterns = array('%\:(?:\s|\t)+%', '%(?:\s|\t)+$%', '%(?:\s|\t)\\\\$%', '%OBLAST\:$%i'); |
302 | | | $replacements = array(":", "", "", "OBLAST:10.0.0.0/8"); |
303 | | | $trans = array((chr(13)) => "", (chr(9)) => "", "á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň", "ž" => "ž", "š" => "š"); |
304 | 1 | unreal | |
305 | 12 | unreal | foreach($seznam as $fil) { |
306 | | | $dat = file_get_contents($fil); |
307 | 1 | unreal | $data = explode("\n", $dat); |
308 | | | $soucet = count($data); |
309 | | | |
310 | 5 | unreal | for ($j=0; $j<=$soucet; ++$j) { |
311 | 1 | unreal | if ((($data[$j]!="") and ($data[$j]!=" ")) and ($data[$j][0]!=(chr(13)))) { |
312 | 16 | unreal | if (preg_match('%^TYP:%i',$data[$j])) { |
313 | | | $polozka++; |
314 | | | preg_match('/^(?:global|local)-(.*).txt$/i', $fil, $filen); |
315 | | | $item[$polozka]=$item[$polozka]."BFUFILE:".$filen[1]."<br>"; |
316 | | | } |
317 | | | $data[$j] = preg_replace($patterns, $replacements, $data[$j]); |
318 | | | $data[$j] = strtr($data[$j], $trans); |
319 | 1 | unreal | $item[$polozka]=$item[$polozka].$data[$j]."<br>"; |
320 | | | } |
321 | | | } |
322 | | | } |
323 | | | |
324 | | | // ------- naladujem data do 3-rozmernyho pole ------- |
325 | | | |
326 | 5 | unreal | for ($k=0; $k<=$polozka; ++$k) { |
327 | 12 | unreal | if(preg_match('%OBLAST:%i', $item[$k])) { |
328 | | | preg_match('%OBLAST:(.*?)(<br)%i', $item[$k], $cloud); |
329 | 11 | unreal | if (!isset($obl["$cloud[1]"])) { |
330 | 9 | unreal | $oblast[] = $cloud[1]; |
331 | | | $jmena_cloudu["$cloud[1]"]=strtr($jmena_cloudu["$cloud[1]"], array("á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň")); |
332 | | | } |
333 | | | } else { |
334 | | | $cloud[1] = "10.0.0.0/8"; |
335 | | | } |
336 | 12 | unreal | |
337 | 1 | unreal | $ic = explode("<br>", $item[$k]); |
338 | | | $cnt_ic = (count($ic)); |
339 | 5 | unreal | for ($b=0; $b<=$cnt_ic; ++$b) { |
340 | 9 | unreal | if($b===$cnt_ic) { |
341 | 16 | unreal | $items[$k]["BFUICON"]=get_icon($items[$k]["BFUFILE"], $items[$k]["ICON"], $items[$k]["TYP"]); |
342 | 12 | unreal | $items[$k]["ID"]=$k; |
343 | 1 | unreal | } else { |
344 | | | if(($ic[$b])!="") { |
345 | | | $pole = strpos($ic[$b], ":"); |
346 | 14 | unreal | $items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]=(substr($ic[$b], $pole+1)); |
347 | 1 | unreal | } |
348 | | | } |
349 | | | } |
350 | 11 | unreal | $obl["$cloud[1]"][] = $items[$k]; |
351 | 1 | unreal | } |
352 | | | |
353 | 9 | unreal | unset($item); |
354 | 12 | unreal | unset($trans); |
355 | 5 | unreal | $pocet_oblasti = count($oblast)-1; |
356 | 1 | unreal | |
357 | 5 | unreal | // -- seradime oblasti (bublinkovy razeni je silene pomaly) |
358 | 12 | unreal | usort($oblast,'natsort_func'); |
359 | 1 | unreal | |
360 | | | |
361 | | | // ------- vypis ve sloupecku vlevo ------- |
362 | | | |
363 | | | for ($o=0; $o<=$pocet_oblasti; $o++) { |
364 | | | echo "<a class=\"title\" name=\"".$oblast[$o]."\" href=\"?oblast=".$oblast[$o]."#".$oblast[$o]."\"><span class=\"cloudip\">".$oblast[$o]."</span>\n"; |
365 | 12 | unreal | if(isset($jmena_cloudu["$oblast[$o]"])) { |
366 | | | echo "<br>".$jmena_cloudu["$oblast[$o]"]."</a>"; |
367 | | | } else { |
368 | | | echo "</a>"; |
369 | | | } |
370 | | | $sorted["$oblast[$o]"] = arfsort($obl["$oblast[$o]"]); |
371 | | | show_small($sorted["$oblast[$o]"]); |
372 | 1 | unreal | } |
373 | 12 | unreal | unset($obl); |
374 | 1 | unreal | ?> |
375 | | | |
376 | | | </div> |
377 | | | <div class="items"> |
378 | | | |
379 | | | <?php |
380 | | | |
381 | | | //############# PODMINKY ZOBRAZENI ###############// |
382 | | | |
383 | 6 | unreal | if(($czf_group!="1") and ($czf_group!="2")) { $czf_group = ""; } |
384 | 1 | unreal | |
385 | | | // ------- pokud neni uvedena oblast ani id ani groupa ------- |
386 | | | |
387 | 5 | unreal | if ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="")) { |
388 | 12 | unreal | $sorted0 = arfsort($items, 1); |
389 | | | show_big($sorted0); |
390 | | | echo "<div class=\"sizer\"></div></div>"; |
391 | 1 | unreal | } |
392 | | | |
393 | | | // ------- pokud neni uvedena oblast ani id ale groupa ano ------- |
394 | | | |
395 | 12 | unreal | elseif ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="1")) { |
396 | | | $sorted0 = arfsort($items, 1); |
397 | | | show_groups($sorted0); |
398 | | | echo "<div class=\"sizer\"></div></div>"; |
399 | 1 | unreal | } |
400 | | | |
401 | | | // ------- pokud neni uvedena oblast ani id ale groupa je 2 ------- |
402 | | | |
403 | 12 | unreal | elseif ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="2")) { |
404 | | | show_clouds($oblast); |
405 | | | echo "<div class=\"sizer\"></div></div>"; |
406 | 1 | unreal | } |
407 | | | |
408 | | | |
409 | | | // ------- pokud je uvedena oblast i id sluzby ale groupa ne ------- |
410 | | | |
411 | 12 | unreal | elseif ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="")) { |
412 | | | show_big($sorted["$czf_oblast"]); |
413 | | | echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
414 | | | if ($czf_id<=$polozka) { |
415 | | | show_details($items[$czf_id]); |
416 | | | } else { |
417 | | | echo "<br>Položka neexistuje<br>"; |
418 | | | } |
419 | | | echo "</div></div>\n"; |
420 | 1 | unreal | } |
421 | | | |
422 | | | // ------- pokud je uvedena oblast i id sluzby i groupa ------- |
423 | | | |
424 | 12 | unreal | elseif ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="1")) { |
425 | | | show_groups($sorted["$czf_oblast"]); |
426 | | | echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
427 | | | if ($czf_id<=$polozka) { |
428 | | | show_details($items[$czf_id]); |
429 | | | } else { |
430 | | | echo "<br>Položka neexistuje<br>"; |
431 | | | } |
432 | | | echo "</div></div>\n"; |
433 | 1 | unreal | } |
434 | | | |
435 | | | |
436 | | | // ------- pokud neni uvedena oblast ale id a groupa ne ------- |
437 | | | |
438 | 12 | unreal | elseif ((($czf_oblast=="") and ($czf_id!="")) and ($czf_group=="")) { |
439 | | | if ($czf_id<=$polozka) { |
440 | | | if(($items[$czf_id]["OBLAST"])=="") { |
441 | | | $sorted4 = $sorted["10.0.0.0/8"]; |
442 | | | } else { |
443 | | | $sorted4 = $sorted[$items[$czf_id]['OBLAST']]; |
444 | | | } |
445 | | | show_big($sorted4); |
446 | | | } else { |
447 | | | $sorted0 = arfsort($items, 1); |
448 | | | show_big($sorted0); |
449 | | | } |
450 | 1 | unreal | |
451 | 12 | unreal | echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
452 | | | if ($czf_id<=$polozka) { |
453 | | | show_details($items[$czf_id]); |
454 | | | } else { |
455 | | | echo "<br>Položka neexistuje<br>"; |
456 | | | } |
457 | | | echo "</div></div>\n"; |
458 | 1 | unreal | } |
459 | | | |
460 | | | // ------- pokud neni uvedena oblast ale id a groupa ano ------- |
461 | | | |
462 | 12 | unreal | elseif ((($czf_oblast=="") and ($czf_id!="")) and ($czf_group=="1")) { |
463 | | | if ($czf_id<=$polozka) { |
464 | | | if(($items[$czf_id]["OBLAST"])=="") { |
465 | | | $sorted4 = $sorted["10.0.0.0/8"]; |
466 | | | } else { |
467 | | | $sorted4 = $sorted[$items[$czf_id]['OBLAST']]; |
468 | | | } |
469 | | | show_groups($sorted4); |
470 | | | } else { |
471 | | | $sorted0 = arfsort($items, 1); |
472 | | | show_groups($sorted0); |
473 | | | } |
474 | 1 | unreal | |
475 | 12 | unreal | echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
476 | | | if ($czf_id<=$polozka) { |
477 | | | show_details($items[$czf_id]); |
478 | | | } else { |
479 | | | echo "<br>Položka neexistuje<br>"; |
480 | | | } |
481 | | | echo "</div></div>\n"; |
482 | 1 | unreal | } |
483 | | | |
484 | | | // ------- pokud je uvedena oblast ale ne id ani groupa ------- |
485 | | | |
486 | 12 | unreal | elseif ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="")){ |
487 | | | show_big($sorted["$czf_oblast"]); |
488 | | | echo "<div class=\"sizer\"></div></div>\n"; |
489 | 1 | unreal | } |
490 | | | |
491 | | | // ------- pokud je uvedena oblast a groupa ale ne id ------- |
492 | | | |
493 | 12 | unreal | elseif ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="1")){ |
494 | | | show_groups($sorted["$czf_oblast"]); |
495 | | | echo "<div class=\"sizer\"></div></div>\n"; |
496 | | | } else { break; } |
497 | 1 | unreal | |
498 | 11 | unreal | unset($items); |
499 | 12 | unreal | unset($oblast); |
500 | | | } // end seznam |
501 | 11 | unreal | |
502 | 1 | unreal | ?> |
503 | | | |
504 | 16 | unreal | <div id="copy">czf4bfu v1.6 - made <a href="http://www.jklir.net/">Unreal][</a> </div> |
505 | 1 | unreal | </body> |
506 | | | </html> |