jablonka.czprosek.czf

czf4bfu.prosek.czf

Subversion Repositories:
[/] [old/] [index.php] - Blame information for rev 3

 

Line No. Rev Author Line
11simandl<?php
2if ($dir = @opendir(".")) {
3echo("<!--CZF4BFU ");
4 while (($file = readdir($dir)) !== false)
5 if (preg_match('/^(global|local)-.*.txt/',$file))
6 echo "$file ";
7echo("-->");
8closedir($dir);
9}
10?>
11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
12<html>
13 <head>
14<!--
15 
16#####################################################
17# #
18# This script built Unreal][ # http://www.jklir.net #
19# #
20#####################################################
21# #
22# Licence: GNU/GPL #
23# Some Icons are downloaded from internet and have #
24# copyrights. Please use it with GNU/GPL licence #
25# #
26#####################################################
27# #
28# (c) Jirka Klír 2007 for czfree.net ;-) #
29# #
30#####################################################
31 
32-->
33 <title>CZF4BFU</title>
34 <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
35 <meta http-equiv="Content-language" content="cz" />
36 <meta name="Author" content="Unreal][, http://www.jklir.net">
37 <link href="styl.css" rel="stylesheet" type="text/css">
38 </head>
39<body style="background: #D4D0C8">
40 
41<H1>Rozcestník CZFree.Net</H1>
42<?php
43$group = !$group;
44$text = ($group) ? 'seskupit' : 'neseskupovat';
45echo "<a class='group' href='?group=".$group."&id=".$_GET["id"]."&oblast=".$_GET["oblast"]."'>$text podle typu sluzeb</a>";
46?>
47<div class="tree">
48 <a class="nomargin title" href="?oblast="><strong>CZFree.net</strong><br>cela sit</a>
49 
50<?php
51 
52$jmena_cloudu = array("10.1.0.0/16" => "Connection.cz / AS Centrum network",
53"10.2.0.0/16" => "Praha - Connection.cz",
54"10.10.0.0/16" => "reserved",
55"10.11.0.0/16" => "Praha - Střešovice, Břevnov, Hradčany, Strahov",
56"10.12.0.0/16" => "Praha - Nusle, Michle, Ruská ul.",
57"10.13.0.0/16" => "Praha - Stodůlky, Nové Butovice, Luka, Lužiny, Řeporyje",
58"10.14.0.0/16" => "Praha 6",
59"10.15.0.0/16" => "Praha - Malvazinky, Kosíře, Motol",
60"10.16.0.0/16" => "Praha - Barrandov",
61"10.17.0.0/16" => "Praha - Záběhlice, Zahradní město",
62"10.18.0.0/16" => "Praha - Dejvice, Podbaba",
63"10.19.0.0/16" => "Praha - Suchdol",
64"10.21.0.0/16" => "Praha - Řepy, Zličín",
65"10.22.0.0/16" => "Praha - Holešovice",
66"10.23.0.0/16" => "Praha - Žižkov, Vinohrady",
67"10.24.0.0/16" => "Praha - Jarov, Strašnice, Malešice, Skalka",
68"10.25.0.0/16" => "Praha - Hlubočepy, Podolí, Braník",
69"10.26.0.0/16" => "Praha - Černošice, Zbraslav, Radotín",
70"10.27.0.0/16" => "Praha - Modřany, Velká Chuchle, Hodkovicky",
71"10.28.0.0/16" => "VYPAL (VYsočany, PAlmovka, Libeň)",
72"10.30.0.0/16" => "Praha - Hostivař, Horní Měcholupy, Dolní Měcholupy, Běchovice",
73"10.31.0.0/16" => "Praha - Bohnice, Cimice",
74"10.32.0.0/16" => "Praha - Dolní Chabry, Ďáblice, Kobylisy, Vychovatelna",
75"10.33.0.0/16" => "Praha - Prosek, Letnany, Čakovice",
76"10.34.0.0/16" => "Praha - Letná, Strossmajerak",
77"10.37.0.0/16" => "Praha - Radotín",
78"10.38.0.0/16" => "Praha - Chodov, Opatov, Háje, Kateřinky",
79"10.39.0.0/16" => "Praha - Šibřina, Újezd nad Lesy, Koloděje, Květnice",
80"10.40.0.0/16" => "Praha - Krč, sidl.Novodvorská, Kačerov, Spořilov, Roztyly",
81"10.41.0.0/16" => "HMNet",
82"10.42.0.0/16" => "Černošice, Všenory, Mokropsy a okolí",
83"10.43.0.0/16" => "Řepná pole, Vinoř",
84"10.50.0.0/16" => "Praha - Centrum Prahy",
85"10.51.0.0/16" => "Praha - Petřiny",
86"10.55.0.0/16" => "Connection.cz",
87"10.63.0.0/17" => "Rakovník a okolí",
88"10.66.0.0/16" => "Praha - Hostivice, Rudná u Prahy, Chyne, Ptice, Červený Újezd, Sobín, Úhonice",
89"10.69.0.0/17" => "Mělník a okolí",
90"10.69.128.0/17" => "Neratovice a okolí",
91"10.81.0.0/16" => "Jihlava",
92"10.88.0.0/16" => "Říčany, Mnichovice a okolí",
93"10.91.0.0/16" => "Velké Přílepy",
94"10.92.0.0/16" => "Libčice nad Vltavou",
95"10.93.0.0/16" => "Čelákovice",
96"10.95.0.0/16" => "Řevnice, Dobřichovice",
97"10.99.0.0/16" => "Třebestovice",
98"10.100.0.0/16" => "Říčany",
99"10.101.0.0/16" => "Liberec",
100"10.102.0.0/16" => "Kladno, Unhoš a okolí",
101"10.103.0.0/16" => "Karlovy Vary",
102"10.104.0.0/16" => "Jablonec",
103"10.105.0.0/16" => "Kolín",
104"10.106.0.0/16" => "Kutná Hora - okres",
105"10.107.0.0/16" => "Hradec Králové",
106"10.108.0.0/16" => "České Budějovice",
107"10.109.0.0/16" => "Plzeň",
108"10.110.0.0/16" => "Chrudim",
109"10.111.0.0/16" => "Plzeň - sever",
110"10.112.0.0/16" => "Lysá nad Labem",
111"10.114.0.0/16" => "Příbram",
112"10.128.0.0/16" => "Brno - město",
113"10.129.0.0/16" => "okolí Brna",
114"10.129.24.0/21" => "Tišnov",
115"10.130.0.0/16" => "Severní Morava",
116"10.131.0.0/16" => "Jižní Morava",
117"10.132.0.0/16" => "Morava - Olomouc",
118"10.133.0.0/16" => "Prostějov",
119"10.134.0.0/16" => "rezerva pro Moravu",
120"10.135.0.0/16" => "rezerva pro Moravu",
121"10.136.0.0/16" => "testovací sítě pro Moravu",
122"10.144.0.0/16" => "Zlín, Vsetín, Valašské Meziříčí - okresy",
123"10.152.0.0/16" => "Ostrava - okres",
124"10.153.0.0/16" => "Ostrava - okres",
125"10.154.0.0/16" => "Ostrava - okres",
126"10.155.0.0/16" => "Ostrava - okres",
127"10.160.0.0/16" => "Teplice a okolí",
128"10.253.0.0/16" => "NCX - Zápy",
129"10.254.0.0/16" => "NCX-BACKB-1");
130 
131function arfsort( $a, $fl ){
132 $GLOBALS['__ARFSORT_LIST__'] = $fl;
133 usort( $a, 'arfsort_func' );
134 return $a;
135}
136 
137function arfsort_func( $a, $b ){
138 foreach( $GLOBALS['__ARFSORT_LIST__'] as $f ) {
139 switch ($f[1]) { // switch on ascending or descending value
140 case "d":
141 $strc = strcmp( strtolower($b[$f[0]]), strtolower($a[$f[0]]) );
142 if ( $strc != 0 ){
143 return $strc;
144 }
145 break;
146 default:
147 $strc = strcmp( strtolower($a[$f[0]]), strtolower($b[$f[0]]) );
148 if ( $strc != 0 ){
149 return $strc;
150 }
151 break;
152 }
153 }
154 return 0;
155}
156 
157function show_small($test) {
158 foreach ($test as $key=>$row) {
159 
160 if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
161 $ikonka = $row['TYP'];
162 if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
163 print "<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>&nbsp;<a title='".$row['NAZEV']."' href='?id=".$row['ID']."&oblast=".$row['OBLAST']."#".$row['OBLAST']."'>".$row['NAZEV']."</a></div>";
164 }
165}
166 
167function show_big($test) {
168 foreach ($test as $key=>$row) {
169 
170 if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
171 $ikonka = $row['TYP'];
172 if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
173 
174 print "<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>";
175 }
176}
177 
178function show_groups($test) {
179 foreach ($test as $key=>$row) {
180 if ($row['TYP']==$pamatuj) {
181 
182 if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
183 $ikonka = $row['TYP'];
184 if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
185 
186 print "<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>";
187 } else {
188 echo "<div class='sizer'></div><a name='".$row['TYP']."' href='#".$row['TYP']."' class='title'>".$row['TYP']."</a>";
189 if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
190 $ikonka = $row['TYP'];
191 if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
192 
193 print "<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>";
194 }
195 $pamatuj = $row['TYP'];
196 }
197}
198 
199function show_details($test) {
200 foreach ($test as $key=>$row) {
201 
202 print "<strong>".$key."</strong>:&nbsp;".$test[$key]."<br>";
203 }
204}
205 
206 
207$i=0;
208if ($dir = @opendir(".")) {
209 while (($file = readdir($dir)) !== false)
210 if (preg_match('/^(global|local)-.*.txt/',$file)) {
211 $seznam[$i] = $file;
212 $i++;
213 }
214 
215$pocet_globalu = $i;
216$polozka=-1;
217for ($g=0; $g<$pocet_globalu; $g++) {
218 
219 $file = "./".$seznam[$g]; // $g
220 $fp = Fopen($file, "r");
221 $dat = Fread($fp, filesize($file));
222 $data = explode("\n", $dat);
223 $soucet = count($data);
224 
225 for ($j=0; $j<=$soucet; $j++) {
226 if ((($data[$j]!="") and ($data[$j]!=" ")) and ($data[$j][0]!=(chr(13)))) {
227 if (strtoupper(substr("$data[$j]", 0, 4))=="TYP:") { $polozka++; }
228 $item[$polozka]=$item[$polozka].$data[$j]."<br>";
229 }
230 $trans = array(" \\\\<br>" => "", " <br>" => "<br>", (chr(13)) => "", ": " => ":", "OBLAST:<br>" => "OBLAST:10.0.0.0/8<br>", (chr(9)) => "");
231 $item[$polozka]=strtr($item[$polozka], $trans);
232 }
233}
234 
235// ------- naladujem data do 3-rozmernyho pole -------
236 
237for ($k=0; $k<=$polozka; $k++) {
238 $ic = explode("<br>", $item[$k]);
239 for ($b=0; $b<=(count($ic)); $b++) {
240 if($b==(count($ic))) {
241 $items[$k]['ID']=$k;
242 } else {
243 if(($ic[$b])!="") {
244 $pole = strpos($ic[$b], ":");
245 if((((substr($ic[$b], 0, $pole))=="URL") or ((substr($ic[$b], 0, $pole))=="URLIP")) or ((substr($ic[$b], 0, $pole))=="URLINET")) {
246 $items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]="<a href='".(substr($ic[$b], $pole+1))."'>".(substr($ic[$b], $pole+1))."</a>";
247 } else {
248 $items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]=(substr($ic[$b], $pole+1));
249 }
250 }
251 }
252 }
253}
254 
255// ------- a pekne seradime, moc sikovny ;-) -------
256 
257$order_arr = array( array('TYP','a'), array('NAZEV','a') );
258$sorted = arfsort( $items, $order_arr);
259 
260 
261// -- zjisteni a serazeni oblasti
262 
263 
264for ($k=0; $k<=$polozka; $k++) {
265 if ((eregi("OBLAST:", $item[$k])) and (!eregi("OBLAST:<br>", $item[$k]))){
266 $vyskyt = strpos($item[$k], "OBLAST:");
267 $cloud = substr($item[$k], $vyskyt+7, 16);
268 $cloud = substr($cloud, 0, strpos($cloud, "/")+3);
269 if ($cloud[strlen($cloud)-1]=="<") {
270 $cloud = substr($cloud, 0, strpos($cloud, "/")+2);
271 }
272 if (!eregi($cloud, $cloudy)) {
273 $cloudy=$cloudy.$cloud.";";
274 }
275 }
276}
277$oblast = explode(";", $cloudy);
278$pocet_oblasti = count($oblast)-2;
279 
280for ($l=0; $l<=$pocet_oblasti; $l++) {
281 for ($m=0; $m<=$pocet_oblasti; $m++) {
282 if ((intval(substr($oblast[$m], 3, 3)))<(intval(substr($oblast[$m-1], 3, 3)))) {
283 $x=$oblast[$m];
284 $oblast[$m]=$oblast[$m-1];
285 $oblast[$m-1]=$x;
286 }
287 }
288}
289 
290//for ($l=0; $l<=$pocet_oblasti; $l++) {
291//echo $l.$oblast[$l]."<br>";
292//}
293 
294 
295// ------- zapiseme hodnoty do cloudovskych poli -------
296 
297for ($o=0; $o<=$pocet_oblasti; $o++) {
298foreach ($items as $key=>$row) {
299 if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
300 if($row['OBLAST']==$oblast[$o]) {
301 
302 $obl[$oblast[$o]][]=$row;
303 }
304 }
305}
306 
307 
308// ------- vypis ve sloupecku vlevo -------
309 
310for ($o=0; $o<=$pocet_oblasti; $o++) {
311echo "<a class='title' name='".$oblast[$o]."' href='?oblast=".$oblast[$o]."#".$oblast[$o]."'><span class='cloudip'>".$oblast[$o]."</span>";
312 if(strlen($jmena_cloudu[$oblast[$o]])>=1) {
313 echo "<br>".$jmena_cloudu[$oblast[$o]]."</a>";
314 } else {
315 echo "</a>";
316 }
317 
318$sorted2 = arfsort( $obl[$oblast[$o]], $order_arr);
319show_small($sorted2);
320 
321}
322 
323?>
324 
325</div>
326<div class="items">
327 
328<?php
329 
330//############# PODMINKY ZOBRAZENI ###############//
331 
332 
333// ------- pokud neni uvedena oblast ani id ani groupa -------
334 
335if ((($_GET["oblast"]=="") and ($_GET["id"]=="")) and ($_GET["group"]!="1")) {
336 
337 show_big($sorted);
338 
339 echo "<div class='sizer'></div></div>";
340}
341 
342// ------- pokud neni uvedena oblast ani id ale groupa ano -------
343 
344if ((($_GET["oblast"]=="") and ($_GET["id"]=="")) and ($_GET["group"]=="1")) {
345 
346 show_groups($sorted);
347 
348 echo "<div class='sizer'></div></div>";
349}
350 
351 
352// ------- pokud je uvedena oblast i id sluzby ale groupa ne -------
353 
354if ((($_GET["oblast"]!="") and ($_GET["id"]!="")) and ($_GET["group"]!="1")) {
355$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
356show_big($sorted3);
357 
358 echo "<div class='sizer'></div></div>";
359 echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>";
360 echo "<div class='contents'>";
361 if ($_GET["id"]<=$polozka) {
362 
363 show_details($items[$_GET["id"]]);
364 
365 } else {
366 echo "Položka neexistuje";
367 }
368 echo "</div></div>";
369 
370}
371 
372// ------- pokud je uvedena oblast i id sluzby i groupa -------
373 
374if ((($_GET["oblast"]!="") and ($_GET["id"]!="")) and ($_GET["group"]=="1")) {
375$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
376show_groups($sorted3);
377 
378 echo "<div class='sizer'></div></div>";
379 echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>";
380 echo "<div class='contents'>";
381 if ($_GET["id"]<=$polozka) {
382 
383 show_details($items[$_GET["id"]]);
384 
385 } else {
386 echo "Položka neexistuje";
387 }
388 echo "</div></div>";
389 
390}
391 
392 
393// ------- pokud neni uvedena oblast ale id a groupa ne -------
394 
395if ((($_GET["oblast"]=="") and ($_GET["id"]!="")) and ($_GET["group"]!="1")) {
396if ($_GET["id"]<=$polozka) {
397 if(($items[$_GET["id"]]["OBLAST"])=="") {
398 $sorted4 = arfsort( $obl["10.0.0.0/8"], $order_arr);
399 } else {
400 $sorted4 = arfsort( $obl[$items[$_GET["id"]]['OBLAST']], $order_arr);
401 }
402 
403 show_big($sorted4);
404 
405} else {
406 
407 show_big($sorted);
408 
409}
410 
411 
412 echo "<div class='sizer'></div></div>";
413 echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>";
414 echo "<div class='contents'>";
415 if ($_GET["id"]<=$polozka) {
416 
417 show_details($items[$_GET["id"]]);
418 
419 } else {
420 echo "Položka neexistuje";
421 }
422 echo "</div></div>";
423 
424}
425 
426// ------- pokud neni uvedena oblast ale id a groupa ano -------
427 
428if ((($_GET["oblast"]=="") and ($_GET["id"]!="")) and ($_GET["group"]=="1")) {
429if ($_GET["id"]<=$polozka) {
430 if(($items[$_GET["id"]]["OBLAST"])=="") {
431 $sorted4 = arfsort( $obl["10.0.0.0/8"], $order_arr);
432 } else {
433 $sorted4 = arfsort( $obl[$items[$_GET["id"]]['OBLAST']], $order_arr);
434 }
435 
436 show_groups($sorted4);
437 
438} else {
439 
440 show_groups($sorted);
441 
442}
443 
444 
445 echo "<div class='sizer'></div></div>";
446 echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>";
447 echo "<div class='contents'>";
448 if ($_GET["id"]<=$polozka) {
449 
450 show_details($items[$_GET["id"]]);
451 
452 } else {
453 echo "Položka neexistuje";
454 }
455 echo "</div></div>";
456 
457}
458 
459// ------- pokud je uvedena oblast ale ne id ani groupa -------
460 
461if ((($_GET["oblast"]!="") and ($_GET["id"]=="")) and ($_GET["group"]!="1")){
462 
463$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
464show_big($sorted3);
465 
466 echo "<div class='sizer'></div></div>";
467 
468}
469 
470// ------- pokud je uvedena oblast a groupa ale ne id -------
471 
472if ((($_GET["oblast"]!="") and ($_GET["id"]=="")) and ($_GET["group"]=="1")){
473 
474$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
475show_groups($sorted3);
476 
477 echo "<div class='sizer'></div></div>";
478 
479}
480 
481 
482} // end
483 
484?>
485 
486<div id="copy">czf4bfu v1.0 - made <a href="http://www.jklir.net">Unreal][</a>&nbsp;</div>
487</body>
488</html>

Powered by WebSVN 2.2.1