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