czf4bfu |
Subversion Repositories: |
Rev 19 | Rev 21 | |
---|---|---|
Line 3... | Line 3... | |
// Nastavime, aby se nam zbytecne nelogovaly chyby |
// Nastavime, aby se nam zbytecne nelogovaly chyby | |
ini_set('log_errors',false); |
ini_set('log_errors',false); | |
// max_execution_time, pro fungovani je nutne vypnout Safe_mod |
// max_execution_time, pro fungovani je nutne vypnout Safe_mod | |
set_time_limit(0); |
set_time_limit(0); | |
|
| |
$seznam = array(); |
/*$starttime = microtime(); | |
echo "<!--CZF4BFU "; |
$startarray = explode(" ", $starttime); | |
if (function_exists('scandir')) { |
$starttime = $startarray[1] + $startarray[0];*/ | |
$scan = scandir("."); |
||
foreach($scan as $file) { |
||
if (preg_match('/^(?:global|local)-.*.txt$/',$file)) { |
||
echo $file." "; |
||
$seznam[] = $file; |
||
} |
||
} |
||
} else { |
||
if ($dir = opendir(".")) { |
||
while (($file = readdir($dir)) !== false) |
||
if (preg_match('/^(?:global|local)-.*.txt$/',$file)) { |
||
echo $file." "; |
||
$seznam[] = $file; |
||
} |
||
} |
||
} |
||
echo "-->\n"; |
||
?> |
||
|
| |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
header("Content-Type: text/html; charset=windows-1250"); | |
<html> |
setlocale(LC_ALL, 'cs_CZ', 'czech', 'cs_CZ.windows.1250'); | |
<head> |
$verze = "1.9"; | |
<!-- Unreal][ # http://www.jklir.net # Licence: GNU/GPL # v 1.8 (c) Jirka Klír 2011 for CZFree.net ;-) # --> |
||
<title>CZF4BFU<?php if($_GET["oblast"]!="") echo " | ".$_GET["oblast"]; ?><?php if($_GET["group"]=="2") echo " | Cloudy"; ?></title> |
||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> |
||
<meta http-equiv="Content-language" content="cs"> |
||
<meta name="author" content="Unreal][, http://www.jklir.net"> |
||
<link href="styl.css" rel="stylesheet" type="text/css"> |
||
<link rel="SHORTCUT ICON" href="favicon.ico"> |
||
</head> |
||
<body> |
||
|
| |
<h1>Rozcestník CZFree.Net</h1> |
||
|
||
<?php |
||
$group = $_GET["group"]; |
||
$czf_group = $_GET["group"]; |
||
$czf_oblast = $_GET["oblast"]; |
||
$czf_id = $_GET["id"]; |
||
|
||
if($group!=2) { |
||
if($czf_oblast!="") { $aname = "#".$czf_oblast; } else { $aname = ""; } |
||
$group = !$group; |
||
$text = (!empty($group)) ? "seskupit" : "neseskupovat"; |
||
echo "<a class=\"group\" href=\"?group=".$group."&id=".$czf_id."&oblast=".$czf_oblast.$aname."\">$text podle typu služeb</a>"; |
||
} else { |
||
echo "<a class=\"group\" href=\"#\"> </a>"; |
||
} |
||
?> |
||
<div class="sizer"></div> |
||
|
||
<div class="tree"> |
||
<a class="nomargin title" href="?oblast="><strong>CZFree.net</strong><br>celá síť</a> |
||
<div class="smallicon"><a title="seznam služeb" href="?oblast="><img class="dot" src="img/point.png"><span>seznam služeb</span></a></div> |
||
<div class="smallicon"><a title="seznam cloudů" href="?group=2"><img class="dot" src="img/point.png"><span>seznam cloudů</span></a></div> |
||
|
||
|
||
<?php |
||
$jmena_cloudu = array("10.1.0.0/16" => "Connection.cz / AS Centrum network", |
$jmena_cloudu = array("10.1.0.0/16" => "Connection.cz / AS Centrum network", | |
"10.2.0.0/16" => "Praha - Connection.cz", |
"10.2.0.0/16" => "Praha - Connection.cz", | |
"10.10.0.0/16" => "reserved", |
"10.10.0.0/16" => "reserved", | |
"10.11.0.0/16" => "Praha - Střeovice, Břevnov, Hradčany, Strahov", |
"10.11.0.0/16" => "Praha - Střeovice, Břevnov, Hradčany, Strahov", | |
"10.12.0.0/16" => "Praha - Nusle, Michle, Ruská ul.", |
"10.12.0.0/16" => "Praha - Nusle, Michle, Vrovice, Vinohrady", | |
"10.13.0.0/16" => "Praha - Stodůlky, Nové Butovice, Luka, Luiny, Řeporyje", |
"10.13.0.0/16" => "Praha - Stodůlky, Nové Butovice, Luka, Luiny, Řeporyje, Jinonice", | |
"10.15.0.0/16" => "Praha - Malvazinky, Koíře, Motol", |
"10.15.0.0/16" => "Praha - Malvazinky, Koíře, Motol", | |
"10.16.0.0/16" => "Praha - Barrandov", |
"10.16.0.0/16" => "Praha - Barrandov", | |
"10.17.0.0/16" => "Praha - Záběhlice, Zahradní město", |
"10.17.0.0/16" => "Praha - Záběhlice, Zahradní město", | |
"10.18.0.0/16" => "Praha - Dejvice, Podbaba", |
"10.18.0.0/16" => "Praha - Dejvice, Podbaba", | |
"10.19.0.0/16" => "Praha - Suchdol, Lysolaje, Hanspaulka, Horoměřice", |
"10.19.0.0/16" => "Praha - Suchdol, Lysolaje, Hanspaulka, Horoměřice", | |
"10.20.0.0/16" => "Praha - P6 - Dědina, Liboc, Ruzyně", |
"10.20.0.0/16" => "Praha - P6 - Dědina, Liboc, Ruzyně", | |
"10.21.0.0/16" => "Praha - Řepy, Zličín", |
"10.21.0.0/16" => "Praha - Řepy, Zličín", | |
"10.22.0.0/16" => "Praha - Holeovice", |
"10.22.0.0/16" => "Praha - Holeovice", | |
"10.23.0.0/16" => "Praha - Vinohrady, Vrovice, ikov", |
"10.23.0.0/16" => "Praha - Vinohrady, Vrovice, Michle, Nusle, ikov", | |
"10.24.0.0/16" => "Praha - Jarov, Stranice, Maleice, Skalka", |
"10.24.0.0/16" => "Praha - Jarov, Stranice, Maleice, Skalka", | |
"10.25.0.0/16" => "Praha - Hlubočepy, Podolí, Braník", |
"10.25.0.0/16" => "Praha - Hlubočepy, Podolí, Braník", | |
"10.26.0.0/16" => "Praha - Lipence, Zbraslav, Radotín", |
"10.26.0.0/16" => "Praha - Radotín, Zbraslav, Lipence", | |
"10.27.0.0/16" => "Praha - Modřany, Velká Chuchle, Hodkovičky", |
"10.27.0.0/16" => "Praha - Modřany, Velká Chuchle, Hodkovičky", | |
"10.28.0.0/16" => "Praha - VYPAL (VYsočany, PAlmovka, Libeň)", |
"10.28.0.0/16" => "Praha - VYPAL (VYsočany, PAlmovka, Libeň)", | |
"10.30.0.0/16" => "Praha - Hostivař, Horní Měcholupy, Dolní Měcholupy, Běchovice", |
"10.30.0.0/16" => "Praha - Jarov, Stranice, Maleice, Skalka, Hostivař", | |
"10.31.0.0/16" => "Praha - Bohnice, Čimice", |
"10.31.0.0/16" => "Praha - Bohnice, Čimice", | |
"10.32.0.0/16" => "Praha - Dolní Chabry, Ďáblice, Kobylisy, Vychovatelna", |
"10.32.0.0/16" => "Praha - Dolní Chabry, Ďáblice, Kobylisy, Vychovatelna", | |
"10.33.0.0/16" => "Praha - Prosek, Letňany, Čakovice", |
"10.33.0.0/16" => "Praha - Prosek, Letňany, Čakovice", | |
"10.34.0.0/16" => "Praha - Letná, trossmajerák", |
"10.34.0.0/16" => "Praha - Letná, trossmajerák", | |
"10.37.0.0/16" => "Praha - Radotín", |
"10.37.0.0/16" => "Praha - Radotín", | |
"10.38.0.0/16" => "Praha - Chodov, Opatov, Háje, Kateřinky", |
"10.38.0.0/16" => "Praha - Chodov, Opatov, Háje, Kateřinky", | |
"10.39.0.0/16" => "Praha - ibřina, Újezd nad Lesy, Koloděje, Květnice", |
"10.39.0.0/16" => "Praha - ibřina, Újezd nad Lesy, Koloděje, Květnice", | |
"10.40.0.0/16" => "Praha - Krč, sidl.Novodvorská, Kačerov, Spořilov, Roztyly", |
"10.40.0.0/16" => "Praha - Krč, sidl.Novodvorská, Kačerov, Spořilov, Roztyly", | |
"10.41.0.0/16" => "HMNet - Horní Měcholupy", |
"10.41.0.0/16" => "HMNet - Horní Měcholupy, Horní Počernice, Kyje, Dubeč", | |
"10.43.0.0/16" => "Řepná pole, Vinoř", |
"10.43.0.0/16" => "Řepná pole, Vinoř", | |
"10.44.0.0/16" => "Praha - Podolí", |
"10.44.0.0/16" => "Praha - Podolí", | |
"10.48.0.0/16" => "Praha 2, 4, 10", |
||
"10.49.0.0/16" => "Praha 1, 3", |
||
"10.50.0.0/16" => "Praha - Centrum Prahy", |
||
"10.51.0.0/16" => "Praha - Petřiny", |
"10.51.0.0/16" => "Praha - Petřiny", | |
"10.52.0.0/16" => "Praha - Vrovice", |
"10.55.0.0/16" => "Praha - Centrum", | |
"10.55.0.0/16" => "Connection.cz", |
"10.58.0.0/16" => "Praha 1", | |
"10.63.0.0/17" => "Rakovník a okolí", |
"10.63.0.0/17" => "Rakovník a okolí", | |
"10.64.0.0/17" => "Křivoklátsko a okolí", |
"10.64.0.0/17" => "Křivoklátsko a okolí", | |
"10.66.0.0/16" => "Hostivice, Chýně, Ptice, Červený Újezd, Sobín", |
"10.66.0.0/16" => "Hostivice, Chýně, Ptice, Červený Újezd, Sobín", | |
"10.67.0.0/16" => "Rudná u Prahy, Ptice, Úhonice, Drahelčice", |
"10.67.0.0/16" => "Rudná u Prahy, Ptice, Úhonice, Drahelčice", | |
"10.69.0.0/17" => "Mělník a okolí", |
"10.69.0.0/17" => "Mělník a okolí", | |
"10.69.128.0/17" => "Neratovice a okolí", |
"10.69.128.0/17" => "Neratovice a okolí", | |
"10.70.0.0/16" => "Beroun a okolí", |
"10.70.0.0/16" => "Beroun a okolí", | |
"10.76.0.0/16" => "Plzeň - PilsFree 1", |
"10.76.0.0/16" => "Plzeň - PilsFree", | |
"10.78.0.0/16" => "Plzeň - PilsFree 2", |
"10.80.0.0/16" => "České Budějovice", | |
"10.88.0.0/16" => "Říčany a okolí", |
"10.88.0.0/16" => "Říčany a okolí", | |
"10.89.0.0/16" => "Mnichovice", |
"10.89.0.0/16" => "Mnichovice", | |
"10.91.0.0/19" => "Velké Přílepy", |
||
"10.92.0.0/19" => "Libčice nad Vltavou", |
"10.92.0.0/19" => "Libčice nad Vltavou", | |
"10.93.0.0/16" => "Čelákovice", |
"10.93.0.0/16" => "Čelákovice", | |
"10.94.0.0/17" => "Mladá Boleslav a okolí", |
"10.94.0.0/17" => "Mladá Boleslav a okolí", | |
"10.95.0.0/17" => "Řevnice, Dobřichovice", |
||
"10.96.0.0/16" => "Venory, Karlík, Dobřichovice, Lety, Řevnice, Třebáň", |
||
"10.98.0.0/16" => "Unho, Chýně, Červený Újezd, Ptice, Nouzov, Kysice, Brakov, Horní Bezděkov a dalí", |
"10.98.0.0/16" => "Unho, Chýně, Červený Újezd, Ptice, Nouzov, Kysice, Brakov, Horní Bezděkov a dalí", | |
"10.99.0.0/18" => "Třebestovice", |
||
"10.100.0.0/16" => "Říčany", |
||
"10.101.0.0/16" => "Liberec", |
"10.101.0.0/16" => "Liberec", | |
"10.102.0.0/16" => "Kladno, Unho a okolí", |
"10.102.0.0/16" => "Klfree.net - Kladno, Unho a okolí", | |
"10.103.0.0/16" => "Karlovy Vary", |
"10.103.0.0/16" => "Karlovy Vary", | |
"10.104.0.0/17" => "Jablonec", |
||
"10.105.0.0/17" => "Kolín", |
"10.105.0.0/17" => "Kolín", | |
"10.106.0.0/16" => "Kutná Hora - okres", |
"10.106.0.0/16" => "KHnet - Kutná Hora", | |
"10.107.0.0/16" => "Hradec Králové", |
"10.107.0.0/16" => "Hradec Králové", | |
"10.108.0.0/16" => "České Budějovice", |
"10.108.0.0/16" => "České Budějovice", | |
"10.109.0.0/16" => "Plzeň", |
"10.109.0.0/16" => "Plzeň", | |
"10.110.0.0/17" => "Chrudim, Pradubice a okolí", |
"10.110.0.0/17" => "Chrudim, Pardubice, Křiánovice a okolí", | |
"10.110.128.0/17" => "Starý Plzenec", |
"10.110.128.0/17" => "PlzenecNET o.s. - Starý Plzenec", | |
"10.111.0.0/16" => "Třemoná a okolí, Plzeň - sever", |
"10.111.0.0/20" => "ihle", | |
"10.112.0.0/16" => "Lysá nad Labem", |
"10.111.64.0/18" => "Toukov.NET", | |
"10.111.128.0/17" => "Tremnet - Třemoná a okolí", | ||
"10.113.0.0/16" => "Louny, atec, Pobořany", |
"10.113.0.0/16" => "Louny, atec, Pobořany", | |
"10.114.0.0/16" => "Příbram", |
"10.114.0.0/16" => "Příbram", | |
"10.115.0.0/16" => "Nové Straecí a okolí", |
"10.115.0.0/16" => "Bubakov.czf - Nové Straecí a okolí", | |
"10.117.0.0/16" => "Turnov a okolí", |
"10.117.0.0/16" => "Turnov a okolí", | |
"10.120.0.0/18" => "MH2Net - Mnichovo Hraditě směr Turnov", |
"10.120.0.0/18" => "MH2Net - Mnichovo Hraditě směr Turnov", | |
"10.121.0.0/18" => "Steadynet - Nové Město na Moravě a okolí", | ||
"10.128.0.0/15" => "Brno - město", |
"10.128.0.0/15" => "Brno - město", | |
"10.128.0.0/16" => "Brno - město", |
"10.128.0.0/16" => "Brno - město", | |
"10.129.0.0/16" => "okolí Brna", |
"10.129.0.0/16" => "okolí Brna", | |
"10.129.24.0/21" => "Tinov", |
"10.129.24.0/21" => "Tinov", | |
"10.130.0.0/16" => "Severní Morava", |
"10.130.0.0/16" => "Severní Morava", | |
"10.131.0.0/16" => "Uherské Hraditě", |
"10.131.0.0/16" => "Uherské Hraditě", | |
"10.132.0.0/16" => "Střední Morava - Olomouc", |
"10.132.0.0/16" => "Střední Morava - Olomouc", | |
"10.133.0.0/16" => "Prostějov", |
"10.133.0.0/16" => "PVfree.net - Prostějov", | |
"10.134.0.0/16" => "Přerovsko", |
"10.134.0.0/16" => "Přerovsko", | |
"10.135.0.0/16" => "BrNet - Brno", |
"10.135.0.0/16" => "BrNet - Brno", | |
"10.136.0.0/16" => "testovací sítě pro Moravu", |
"10.136.0.0/16" => "testovací sítě pro Moravu", | |
"10.144.0.0/16" => "Zlín, Vsetín, Valaské Meziříčí - okresy", |
"10.143.0.0/16" => "UnArt Slavičín", | |
"10.145.0.0/16" => "Nový Jičín, Kopřivnice, Frýdek Místek - okresy", |
"10.145.0.0/16" => "Vsetín a okolí", | |
"10.152.0.0/14" => "Ostrava - okres", | ||
"10.152.0.0/16" => "Ostrava - okres", |
"10.152.0.0/16" => "Ostrava - okres", | |
"10.153.0.0/16" => "Ostrava - okres", |
"10.153.0.0/16" => "Ostrava - okres", | |
"10.154.0.0/16" => "Ostrava - okres", |
"10.154.0.0/16" => "Ostrava - okres", | |
"10.155.0.0/16" => "Ostrava - okres", |
"10.155.0.0/16" => "Ostrava - okres", | |
"10.161.0.0/16" => "Evkanet - Ostrava", |
"10.161.0.0/16" => "Evkanet - Ostrava", | |
"10.193.64.0/18" => "Varnsdorf a okolí", |
"10.193.64.0/18" => "Varnsdorf a okolí", | |
"10.225.0.0/16" => "CZFree-ol - Olomouc", |
"10.225.0.0/16" => "CZFree-ol - Olomouc", | |
"10.253.0.0/16" => "NCX - Zápy", |
"10.253.0.0/16" => "NFX z.s.p.o.", | |
"10.254.0.0/16" => "NCX Labyrint"); |
"10.254.0.0/16" => "NCX Labyrint"); | |
|
| |
$sort_cz = 0; |
function arfsort($a) { | |
|
||
function arfsort($a,$yes=0) { |
||
global $sort_cz; |
||
$sort_cz = $yes; |
||
usort($a,'arfsort_func'); |
usort($a,'arfsort_func'); | |
return $a; |
return $a; | |
} |
} | |
|
| |
function arfsort_func($a,$b){ |
function arfsort_func($a, $b) { | |
global $sort_cz; |
||
$arr = array("Á" => "azzz", "É" => "ezzz", "Í" => "izzz", "Ó" => "ozzz", "Ú" => "uzzz", "Ý" => "yzzz", "Ž" => "zzzz", "Š" => "szzz", "Č" => "czzz", "Ř" => "rzzz"); |
||
$order[0][0] = "TYP"; |
$order[0][0] = "TYP"; | |
$order[1][0] = "NAZEV"; |
$order[1][0] = "NAZEV"; | |
foreach($order as $f) { |
foreach($order as $f) { | |
if($sort_cz=="1") { |
||
$a[$f[0]]=strtr($a[$f[0]], $arr); |
||
$b[$f[0]]=strtr($b[$f[0]], $arr); |
||
} |
||
$strc = strcasecmp($a[$f[0]],$b[$f[0]]); |
$strc = strcasecmp($a[$f[0]],$b[$f[0]]); | |
if ($strc!=0) { |
if ($strc!=0) { | |
return $strc; |
return $strc; | |
} |
} | |
} |
} | |
Line 216... | Line 147... | |
} |
} | |
return $ikonka; |
return $ikonka; | |
} |
} | |
|
| |
function show_small($test) { |
function show_small($test) { | |
$string = ""; | ||
foreach ($test as $key=>$row) { |
foreach ($test as $key=>$row) { | |
$oblastx = $row["OBLAST"]; |
$oblastx = $row["OBLAST"]; | |
$typ = $row["TYP"]; |
$typ = $row["TYP"]; | |
$nazev = $row["NAZEV"]; |
$nazev = $row["NAZEV"]; | |
$id = $row["ID"]; |
$id = $row["ID"]; | |
$ikonka = $row["BFUICON"]; |
$ikonka = $row["BFUICON"]; | |
echo "<div class=\"smallicon\"><a title=\"$nazev\" href=\"?id=$id&oblast=$oblastx#$oblastx\"><img title=\"$nazev\" src=\"$ikonka\"><span>$nazev</span></a></div>\n"; |
| |
$string .= "<div class=\"smallicon\"><a title=\"$nazev\" href=\"?id=$id&oblast=$oblastx#$oblastx\"><img title=\"$nazev\" src=\"$ikonka\"><span>$nazev</span></a></div>\n"; | ||
} |
} | |
return $string; | ||
} |
} | |
|
| |
function show_big($test) { |
function show_big($test) { | |
$string = ""; | ||
foreach ($test as $row) { |
foreach ($test as $row) { | |
$oblastx = $row["OBLAST"]; |
$oblastx = $row["OBLAST"]; | |
$typ = $row["TYP"]; |
$typ = $row["TYP"]; | |
$nazev = $row["NAZEV"]; |
$nazev = $row["NAZEV"]; | |
$popis = $row["POPIS"]; |
$popis = $row["POPIS"]; | |
$id = $row["ID"]; |
$id = $row["ID"]; | |
$ikonka = $row["BFUICON"]; |
$ikonka = $row["BFUICON"]; | |
echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; |
| |
$string .= "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; | ||
} |
} | |
return $string; | ||
} |
} | |
|
| |
function show_groups($test) { |
function show_groups($test) { | |
$pamatuj = ""; |
$pamatuj = ""; | |
$x = 0; |
$string = ""; | |
foreach ($test as $row) { |
$x = 0; | |
$oblastx = $row["OBLAST"]; |
foreach ($test as $row) { | |
$typ = $row["TYP"]; |
$oblastx = $row["OBLAST"]; | |
$nazev = $row["NAZEV"]; |
$typ = $row["TYP"]; | |
$popis = $row["POPIS"]; |
$nazev = $row["NAZEV"]; | |
$id = $row["ID"]; |
$popis = $row["POPIS"]; | |
$ikonka = $row["BFUICON"]; |
$id = $row["ID"]; | |
$ikonka = $row["BFUICON"]; | ||
|
| |
if ($typ===$pamatuj) { |
if ($typ===$pamatuj) { | |
echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; |
$string .= "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; | |
} else { |
} else { | |
if($x==0) { $nomargin = "nomargin "; $x==1; } else { $nomargin = ""; } |
if($x==0) { $nomargin = "nomargin "; $x==1; } else { $nomargin = ""; } | |
echo "<div class=\"sizer\"></div><a name=\"".$typ."\" href=\"#".$typ."\" class=\"".$nomargin."title\">".$typ."</a>\n"; |
$string .= "<div class=\"sizer\"></div><a name=\"".$typ."\" href=\"#".$typ."\" class=\"".$nomargin."title\">".$typ."</a>\n"; | |
echo "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; |
$string .= "<div class=\"icon\"><a title=\"".$popis."\" href=\"?id=".$id."&oblast=".$oblastx."#".$oblastx."\"><img title=\"".$popis."\" src=\"$ikonka\"><br>".$nazev."</a></div>\n"; | |
} |
} | |
$pamatuj = $typ; |
$pamatuj = $typ; | |
} |
} | |
return $string; | ||
} |
} | |
|
| |
function show_clouds($test) { |
function show_clouds($test, $jmena_cloudu) { | |
global $jmena_cloudu; |
$string = ""; | |
foreach ($test as $row) { |
foreach ($test as $row) { | |
if($row!="") { |
if($row!="") { | |
$cl_popis = $jmena_cloudu["$row"]; |
$cl_popis = $jmena_cloudu["$row"]; | |
$cl_naz = $row; |
$cl_naz = $row; | |
$cl_nazev = $row."<br>".$cl_popis; |
$cl_nazev = $row."<br>".$cl_popis; | |
|
| |
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"; |
$string .= "<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"; | |
} |
} | |
} |
} | |
return $string; | ||
} |
} | |
|
| |
function show_details($test) { |
function show_details($test) { | |
$ikonka_det = $test["TYP"]; |
$ikonka_det = $test["TYP"]; | |
$ikonka_url = $test["BFUICON"]; |
$ikonka_url = $test["BFUICON"]; | |
echo "<div class=\"det\">"; |
$string = "<div class=\"det\"><div class=\"icon_det\"><img alt=\"$ikonka_det\" src=\"$ikonka_url\"></div><div class=\"info_det\">"; | |
echo "<div class=\"icon_det\"><img alt=\"$ikonka_det\" src=\"$ikonka_url\"></div>"; |
foreach ($test as $key => $row) { | |
echo "<div class=\"info_det\">"; |
if(!preg_match('%^(?:HESLOEDIT|SOURCE|BFUFILE|BFUICON|ID|#)%',$key)) { | |
foreach ($test as $key=>$row) { |
||
if(!preg_match('%^(?:HESLOEDIT|SOURCE|BFUFILE|BFUICON|#)%',$key)) { |
||
if (preg_match('%^URL(?:|IP|INET)%',$key)) { |
if (preg_match('%^URL(?:|IP|INET)%',$key)) { | |
if (!preg_match('%\://%',$row)) { |
if (!preg_match('%\://%',$row)) { | |
$row = "<a href=\"http://".$row."\">http://".$row."</a>"; |
$row = "<a href=\"http://".$row."\">http://".$row."</a>"; | |
} else { |
} else { | |
$row = "<a href=\"".$row."\">".$row."</a>"; |
$row = "<a href=\"".$row."\">".$row."</a>"; | |
} |
} | |
} |
} | |
echo "<strong>".$key."</strong>: ".$row."<br>"; |
if($key!="") { | |
$string .= "<strong>".$key."</strong>: ".$row."<br>"; | ||
} | ||
} |
} | |
} |
} | |
echo "</div><div class=\"info_cut\"></div></div>"; |
return $string."</div><div class=\"info_cut\"></div></div>"; | |
} |
} | |
| ||
| ||
$seznam = array(); | ||
echo "<!--CZF4BFU "; | ||
if (function_exists('scandir')) { | ||
$scan = scandir("."); | ||
foreach($scan as $file) { | ||
if (preg_match('/^(?:global|local)-.*.txt$/',$file)) { | ||
echo $file." "; | ||
$seznam[] = $file; | ||
} | ||
} | ||
} else { | ||
if ($dir = opendir(".")) { | ||
while (($file = readdir($dir)) !== false) | ||
if (preg_match('/^(?:global|local)-.*.txt$/',$file)) { | ||
echo $file." "; | ||
$seznam[] = $file; | ||
} | ||
} | ||
} | ||
echo "-->\n"; | ||
| ||
$group = $_GET["group"]; | ||
$czf_group = $group; | ||
$czf_oblast = $_GET["oblast"]; | ||
$czf_id = $_GET["id"]; | ||
|
| |
if(!empty($seznam)) { |
if(!empty($seznam)) { | |
|
| |
$item = array(); |
$item = array(); | |
$items = array(); |
$items = array(); | |
$oblast = array(); |
$oblast = array(); | |
|
| |
$polozka=-1; |
$polozka=-1; | |
$patterns = array('%OBLAST\:([\s\t]+)?([\r\v\n]+)%i', '%ICON\:([\s\t]+)?([\r\v\n]+)%i', '%\:(?:\s|\t)+%', '%\\\\([\r\v\n])+%'); |
$patterns = array('%OBLAST\:([\s\t]+)?([\r\v\n]+)%i', '%ICON\:([\s\t]+)?([\r\v\n]+)%i', '%\:(?:\s|\t)+%', '%\\\\([\r\v\n])+%'); | |
$replacements = array("OBLAST:10.0.0.0/8\n", "", ":", "\\"); |
$replacements = array("OBLAST:10.0.0.0/8\n", "", ":", "\\"); | |
$trans = array("\\" => "\\n", (chr(13)) => "", (chr(9)) => "", "á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň", "ž" => "ž", "š" => "š"); |
$trans = array("\\" => "\\n", (chr(13)) => "", (chr(9)) => "", "ž" => "ž", "š" => "š"); | |
|
| |
foreach($seznam as $fil) { |
foreach($seznam as $fil) { | |
$dat = file_get_contents($fil); |
$dat = file_get_contents($fil); | |
$dat = strtr(preg_replace($patterns, $replacements, $dat), $trans); |
$dat = strtr(preg_replace($patterns, $replacements, $dat), $trans); | |
$data = explode("\n", $dat); |
$data = explode("\n", $dat); | |
Line 330... | Line 297... | |
for ($k=0; $k<=$polozka; ++$k) { |
for ($k=0; $k<=$polozka; ++$k) { | |
if(preg_match('%OBLAST:%i', $item[$k])) { |
if(preg_match('%OBLAST:%i', $item[$k])) { | |
preg_match('%OBLAST:(.*?)(<br)%i', $item[$k], $cloud); |
preg_match('%OBLAST:(.*?)(<br)%i', $item[$k], $cloud); | |
if (!isset($obl["$cloud[1]"])) { |
if (!isset($obl["$cloud[1]"])) { | |
$oblast[] = $cloud[1]; |
$oblast[] = $cloud[1]; | |
$jmena_cloudu["$cloud[1]"]=strtr($jmena_cloudu["$cloud[1]"], array("á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň")); |
||
} |
} | |
} else { |
} else { | |
$cloud[1] = "10.0.0.0/8"; |
$cloud[1] = "10.0.0.0/8"; | |
} |
} | |
|
| |
Line 350... | Line 316... | |
$pole = strpos($ic[$b], ":"); |
$pole = strpos($ic[$b], ":"); | |
$items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]=(substr($ic[$b], $pole+1)); |
$items[$k][(strtoupper(substr($ic[$b], 0, $pole)))]=(substr($ic[$b], $pole+1)); | |
} |
} | |
} |
} | |
} |
} | |
$obl["$cloud[1]"][] = $items[$k]; |
$obl[$cloud[1]][] = $items[$k]; | |
} |
} | |
|
| |
unset($item); |
unset($item); | |
unset($trans); |
unset($trans); | |
$pocet_oblasti = count($oblast)-1; |
$pocet_oblasti = count($oblast)-1; | |
|
| |
// -- seradime oblasti (bublinkovy razeni je silene pomaly) |
// -- seradime oblasti (bublinkovy razeni je silene pomaly) | |
usort($oblast,'natsort_func'); |
usort($oblast,'natsort_func'); | |
|
| |
} //end seznam | ||
|
| |
$title = "CZF4BFU"; | ||
| ||
if($czf_oblast!="") { | ||
if(isset($jmena_cloudu[$czf_oblast])) { | ||
$title .= " | ".$jmena_cloudu[$czf_oblast]; | ||
} else { | ||
$title .= " | ".$czf_oblast; | ||
} | ||
} | ||
if($czf_id!="") { | ||
$title .= " | ".$items[$czf_id]["NAZEV"]; | ||
} | ||
if($czf_group=="2") { | ||
$title .= " | Cloudy"; | ||
} | ||
| ||
?> | ||
| ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||
<html> | ||
<head> | ||
<!-- Unreal][ # http://www.jklir.net # Licence: GNU/GPL # v <?php echo $verze ?> (c) Jirka Klír 2013 for CZFree.net ;-) # --> | ||
<title><?php echo $title; ?></title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> | ||
<meta http-equiv="Content-language" content="cs"> | ||
<meta name="author" content="Unreal][, http://www.jklir.net"> | ||
<link href="styl.css" rel="stylesheet" type="text/css"> | ||
<link rel="SHORTCUT ICON" href="favicon.ico"> | ||
</head> | ||
<body> | ||
| ||
<h1>Rozcestník CZFree.Net</h1> | ||
| ||
<?php | ||
if($group!=2) { | ||
if($czf_oblast!="") { $aname = "#".$czf_oblast; } else { $aname = ""; } | ||
$group = !$group; | ||
$text = (!empty($group)) ? "seskupit" : "neseskupovat"; | ||
echo "<a class=\"group\" href=\"?group=".$group."&id=".$czf_id."&oblast=".$czf_oblast.$aname."\">$text podle typu služeb</a>"; | ||
} else { | ||
echo "<a class=\"group\" href=\"#\"> </a>"; | ||
} | ||
?> | ||
<div class="sizer"></div> | ||
| ||
<div class="tree"> | ||
<a class="nomargin title" href="?oblast="><strong>CZFree.net</strong><br>celá sí</a> | ||
<div class="smallicon"><a title="seznam slueb" href="?oblast="><img class="dot" src="img/point.png"><span>seznam slueb</span></a></div> | ||
<div class="smallicon"><a title="seznam cloudů" href="?group=2"><img class="dot" src="img/point.png"><span>seznam cloudů</span></a></div> | ||
| ||
| ||
<?php | ||
if(!empty($seznam)) { | ||
// ------- vypis ve sloupecku vlevo ------- |
// ------- vypis ve sloupecku vlevo ------- | |
|
| |
for ($o=0; $o<=$pocet_oblasti; $o++) { |
for ($o=0; $o<=$pocet_oblasti; $o++) { | |
echo "<a class=\"title\" name=\"".$oblast[$o]."\" href=\"?oblast=".$oblast[$o]."#".$oblast[$o]."\"><span class=\"cloudip\">".$oblast[$o]."</span>\n"; |
echo "<a class=\"title\" name=\"".$oblast[$o]."\" href=\"?oblast=".$oblast[$o]."#".$oblast[$o]."\"><span class=\"cloudip\">".$oblast[$o]."</span>\n"; | |
if(isset($jmena_cloudu["$oblast[$o]"])) { |
if(isset($jmena_cloudu[$oblast[$o]])) { | |
echo "<br>".$jmena_cloudu["$oblast[$o]"]."</a>"; |
echo "<br>".$jmena_cloudu[$oblast[$o]]."</a>"; | |
} else { |
} else { | |
echo "</a>"; |
echo "</a>"; | |
} |
} | |
$sorted["$oblast[$o]"] = arfsort($obl["$oblast[$o]"]); |
$sorted[$oblast[$o]] = arfsort($obl[$oblast[$o]]); | |
show_small($sorted["$oblast[$o]"]); |
echo show_small($sorted[$oblast[$o]]); | |
} |
} | |
unset($obl); |
unset($obl); | |
?> |
?> | |
|
| |
</div> |
</div> | |
Line 388... | Line 408... | |
if(($czf_group!="1") and ($czf_group!="2")) { $czf_group = ""; } |
if(($czf_group!="1") and ($czf_group!="2")) { $czf_group = ""; } | |
|
| |
// ------- pokud neni uvedena oblast ani id ani groupa ------- |
// ------- pokud neni uvedena oblast ani id ani groupa ------- | |
|
| |
if ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="")) { |
if ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="")) { | |
$sorted0 = arfsort($items, 1); |
$sorted0 = arfsort($items); | |
show_big($sorted0); |
echo show_big($sorted0)."<div class=\"sizer\"></div></div>"; | |
echo "<div class=\"sizer\"></div></div>"; |
||
} |
} | |
|
| |
// ------- pokud neni uvedena oblast ani id ale groupa ano ------- |
// ------- pokud neni uvedena oblast ani id ale groupa ano ------- | |
|
| |
elseif ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="1")) { |
elseif ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="1")) { | |
$sorted0 = arfsort($items, 1); |
$sorted0 = arfsort($items); | |
show_groups($sorted0); |
echo show_groups($sorted0)."<div class=\"sizer\"></div></div>"; | |
echo "<div class=\"sizer\"></div></div>"; |
||
} |
} | |
|
| |
// ------- pokud neni uvedena oblast ani id ale groupa je 2 ------- |
// ------- pokud neni uvedena oblast ani id ale groupa je 2 ------- | |
|
| |
elseif ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="2")) { |
elseif ((($czf_oblast=="") and ($czf_id=="")) and ($czf_group=="2")) { | |
show_clouds($oblast); |
echo show_clouds($oblast, $jmena_cloudu)."<div class=\"sizer\"></div></div>"; | |
echo "<div class=\"sizer\"></div></div>"; |
||
} |
} | |
|
||
|
| |
// ------- pokud je uvedena oblast i id sluzby ale groupa ne ------- |
// ------- pokud je uvedena oblast i id sluzby ale groupa ne ------- | |
|
| |
elseif ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="")) { |
elseif ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="")) { | |
show_big($sorted["$czf_oblast"]); |
echo show_big($sorted[$czf_oblast])."<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; | |
echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
||
if ($czf_id<=$polozka) { |
if ($czf_id<=$polozka) { | |
show_details($items[$czf_id]); |
echo show_details($items[$czf_id]); | |
} else { |
} else { | |
echo "<br>Položka neexistuje<br>"; |
echo "<br>Poloka neexistuje<br>"; | |
} |
} | |
echo "</div></div>\n"; |
echo "</div></div>\n"; | |
} |
} | |
|
| |
// ------- pokud je uvedena oblast i id sluzby i groupa ------- |
// ------- pokud je uvedena oblast i id sluzby i groupa ------- | |
|
| |
elseif ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="1")) { |
elseif ((($czf_oblast!="") and ($czf_id!="")) and ($czf_group=="1")) { | |
show_groups($sorted["$czf_oblast"]); |
echo show_groups($sorted[$czf_oblast])."<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; | |
echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
||
if ($czf_id<=$polozka) { |
if ($czf_id<=$polozka) { | |
show_details($items[$czf_id]); |
echo show_details($items[$czf_id]); | |
} else { |
} else { | |
echo "<br>Položka neexistuje<br>"; |
echo "<br>Poloka neexistuje<br>"; | |
} |
} | |
echo "</div></div>\n"; |
echo "</div></div>\n"; | |
} |
} | |
|
| |
|
| |
Line 445... | Line 459... | |
if(($items[$czf_id]["OBLAST"])=="") { |
if(($items[$czf_id]["OBLAST"])=="") { | |
$sorted4 = $sorted["10.0.0.0/8"]; |
$sorted4 = $sorted["10.0.0.0/8"]; | |
} else { |
} else { | |
$sorted4 = $sorted[$items[$czf_id]['OBLAST']]; |
$sorted4 = $sorted[$items[$czf_id]['OBLAST']]; | |
} |
} | |
show_big($sorted4); |
echo show_big($sorted4); | |
} else { |
} else { | |
$sorted0 = arfsort($items, 1); |
$sorted0 = arfsort($items); | |
show_big($sorted0); |
echo show_big($sorted0); | |
} |
} | |
|
| |
echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; | |
if ($czf_id<=$polozka) { |
if ($czf_id<=$polozka) { | |
show_details($items[$czf_id]); |
echo show_details($items[$czf_id]); | |
} else { |
} else { | |
echo "<br>Položka neexistuje<br>"; |
echo "<br>Poloka neexistuje<br>"; | |
} |
} | |
echo "</div></div>\n"; |
echo "</div></div>\n"; | |
} |
} | |
|
| |
// ------- pokud neni uvedena oblast ale id a groupa ano ------- |
// ------- pokud neni uvedena oblast ale id a groupa ano ------- | |
Line 469... | Line 483... | |
if(($items[$czf_id]["OBLAST"])=="") { |
if(($items[$czf_id]["OBLAST"])=="") { | |
$sorted4 = $sorted["10.0.0.0/8"]; |
$sorted4 = $sorted["10.0.0.0/8"]; | |
} else { |
} else { | |
$sorted4 = $sorted[$items[$czf_id]['OBLAST']]; |
$sorted4 = $sorted[$items[$czf_id]['OBLAST']]; | |
} |
} | |
show_groups($sorted4); |
echo show_groups($sorted4); | |
} else { |
} else { | |
$sorted0 = arfsort($items, 1); |
$sorted0 = arfsort($items); | |
show_groups($sorted0); |
echo show_groups($sorted0); | |
} |
} | |
|
| |
echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; |
echo "<div class=\"sizer\"></div></div>\n<div class=\"detail\"><div class=\"nomargin title\"><strong>Detaily:</strong></div><div class=\"contents\">\n"; | |
if ($czf_id<=$polozka) { |
if ($czf_id<=$polozka) { | |
show_details($items[$czf_id]); |
echo show_details($items[$czf_id]); | |
} else { |
} else { | |
echo "<br>Položka neexistuje<br>"; |
echo "<br>Poloka neexistuje<br>"; | |
} |
} | |
echo "</div></div>\n"; |
echo "</div></div>\n"; | |
} |
} | |
|
| |
// ------- pokud je uvedena oblast ale ne id ani groupa ------- |
// ------- pokud je uvedena oblast ale ne id ani groupa ------- | |
|
| |
elseif ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="")){ |
elseif ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="")){ | |
show_big($sorted["$czf_oblast"]); |
echo show_big($sorted[$czf_oblast])."<div class=\"sizer\"></div></div>\n"; | |
echo "<div class=\"sizer\"></div></div>\n"; |
||
} |
} | |
|
| |
// ------- pokud je uvedena oblast a groupa ale ne id ------- |
// ------- pokud je uvedena oblast a groupa ale ne id ------- | |
|
| |
elseif ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="1")){ |
elseif ((($czf_oblast!="") and ($czf_id=="")) and ($czf_group=="1")){ | |
show_groups($sorted["$czf_oblast"]); |
echo show_groups($sorted[$czf_oblast])."<div class=\"sizer\"></div></div>\n"; | |
echo "<div class=\"sizer\"></div></div>\n"; |
||
} else { break; } |
} else { break; } | |
|
| |
unset($items); |
unset($items); | |
unset($oblast); |
unset($oblast); | |
} // end seznam |
} // end seznam | |
| ||
/*$endtime = microtime(); | ||
$endarray = explode(" ", $endtime); | ||
$endtime = $endarray[1] + $endarray[0]; | ||
$totaltime = $endtime - $starttime; | ||
$totaltime = round($totaltime,5); | ||
echo "<br>Skript to vsechno stihnul v rekordnim case $totaltime sekund :-).";*/ | ||
|
| |
?> |
?> | |
|
| |
<div id="copy">czf4bfu v1.8 - made <a href="http://www.jklir.net/">Unreal][</a> </div> |
<div id="copy">czf4bfu v<?php echo $verze ?> - made <a href="http://www.jklir.net/">Unreal][</a> </div> | |
</body> |
</body> | |
</html> |
</html> |