jablonka.czprosek.czf

czf4bfu.prosek.czf

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

 

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

Powered by WebSVN 2.2.1