jablonka.czprosek.czf

czf4bfu.prosek.czf

Subversion Repositories:
[/] [index.php] - Diff between revs 1 and 5

Show entire file Ignore whitespace

Rev 1 Rev 5
Line 39... Line 39...
<body style="background: #D4D0C8"> <body style="background: #D4D0C8">
   
<H1>Rozcestn&#237;k CZFree.Net</H1> <H1>Rozcestn&#237;k CZFree.Net</H1>
<?php <?php
   
$group = !$group; $group = !@$group;
$text = ($group) ? 'seskupit' : 'neseskupovat'; $text = ($group) ? 'seskupit' : 'neseskupovat';
echo "<a class='group' href='?group=".$group."&id=".$_GET["id"]."&oblast=".$_GET["oblast"]."'>$text podle typu slu&#382;eb</a>"; echo "<a class='group' href='?group=".$group."&id=".@$_GET["id"]."&oblast=".@$_GET["oblast"]."'>$text podle typu slu&#382;eb</a>";
?> ?>
<div class="tree"> <div class="tree">
<a class="nomargin title" href="?oblast="><strong>CZFree.net</strong><br>cel&#225; s&#237;&#357;</a> <a class="nomargin title" href="?oblast="><strong>CZFree.net</strong><br>cel&#225; s&#237;&#357;</a>
   
<?php <?php
Line 167... Line 167...
} }
   
function show_big($test) { function show_big($test) {
foreach ($test as $key=>$row) { foreach ($test as $key=>$row) {
   
if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; } if(@$row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
$ikonka = $row['TYP']; $ikonka = $row['TYP'];
if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; } if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
   
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>"; 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>";
} }
} }
   
function show_groups($test) { function show_groups($test) {
foreach ($test as $key=>$row) { foreach ($test as $key=>$row) {
   
if ($row['TYP']==$pamatuj) { if ($row['TYP']==@$pamatuj) {
   
if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; } if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
$ikonka = $row['TYP']; $ikonka = $row['TYP'];
if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; } if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
   
Line 191... Line 191...
echo "<div class='sizer'></div><a name='".$row['TYP']."' href='#".$row['TYP']."' class='title'>".$row['TYP']."</a>"; echo "<div class='sizer'></div><a name='".$row['TYP']."' href='#".$row['TYP']."' class='title'>".$row['TYP']."</a>";
if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; } if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
$ikonka = $row['TYP']; $ikonka = $row['TYP'];
if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; } if(!file_exists("ikony/".$ikonka.".png")) { $ikonka = "none"; }
   
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>"; 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>";
} }
$pamatuj = $row['TYP']; $pamatuj = $row['TYP'];
} }
} }
   
Line 224... Line 224...
$dat = Fread($fp, filesize($file)); $dat = Fread($fp, filesize($file));
$data = explode("\n", $dat); $data = explode("\n", $dat);
$soucet = count($data); $soucet = count($data);
   
for ($j=0; $j<=$soucet; $j++) { for ($j=0; $j<=$soucet; $j++) {
if ((($data[$j]!="") and ($data[$j]!=" ")) and ($data[$j][0]!=(chr(13)))) { if (((@$data[$j]!="") and (@$data[$j]!=" ")) and (@$data[$j][0]!=(chr(13)))) {
if (strtoupper(substr("$data[$j]", 0, 4))=="TYP:") { $polozka++; } if (strtoupper(substr("$data[$j]", 0, 4))=="TYP:") { $polozka++; }
$item[$polozka]=$item[$polozka].$data[$j]."<br>"; $item[$polozka]=@$item[$polozka].@$data[$j]."<br>";
} }
$trans = array(" \\\\<br>" => "", " <br>" => "<br>", (chr(13)) => "", ": " => ":", "OBLAST:<br>" => "OBLAST:10.0.0.0/8<br>", (chr(9)) => ""); $trans = array(" \\\\<br>" => "", " <br>" => "<br>", (chr(13)) => "", ": " => ":", "OBLAST:<br>" => "OBLAST:10.0.0.0/8<br>", (chr(9)) => "");
$item[$polozka]=strtr($item[$polozka], $trans); $item[$polozka]=strtr($item[$polozka], $trans);
   
$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;"); $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;");
Line 273... Line 273...
$cloud = substr($item[$k], $vyskyt+7, 16); $cloud = substr($item[$k], $vyskyt+7, 16);
$cloud = substr($cloud, 0, strpos($cloud, "/")+3); $cloud = substr($cloud, 0, strpos($cloud, "/")+3);
if ($cloud[strlen($cloud)-1]=="<") { if ($cloud[strlen($cloud)-1]=="<") {
$cloud = substr($cloud, 0, strpos($cloud, "/")+2); $cloud = substr($cloud, 0, strpos($cloud, "/")+2);
} }
if (!eregi($cloud, $cloudy)) { if (!eregi($cloud, @$cloudy)) {
$cloudy=$cloudy.$cloud.";"; $cloudy=@$cloudy.$cloud.";";
} }
} }
} }
$oblast = explode(";", $cloudy); $oblast = explode(";", $cloudy);
$pocet_oblasti = count($oblast)-2; $pocet_oblasti = count($oblast)-2;
   
for ($l=0; $l<=$pocet_oblasti; $l++) { for ($l=0; $l<=$pocet_oblasti; $l++) {
for ($m=0; $m<=$pocet_oblasti; $m++) { for ($m=0; $m<=$pocet_oblasti; $m++) {
if ((intval(substr($oblast[$m], 3, 3)))<(intval(substr($oblast[$m-1], 3, 3)))) { if ((intval(substr($oblast[$m], 3, 3)))<(intval(substr(@$oblast[$m-1], 3, 3)))) {
$x=$oblast[$m]; $x=$oblast[$m];
$oblast[$m]=$oblast[$m-1]; $oblast[$m]=$oblast[$m-1];
$oblast[$m-1]=$x; $oblast[$m-1]=$x;
} }
} }
Line 300... Line 300...
   
// ------- zapiseme hodnoty do cloudovskych poli ------- // ------- zapiseme hodnoty do cloudovskych poli -------
   
for ($o=0; $o<=$pocet_oblasti; $o++) { for ($o=0; $o<=$pocet_oblasti; $o++) {
foreach ($items as $key=>$row) { foreach ($items as $key=>$row) {
if($row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; } if(@$row['OBLAST']=="") { $row['OBLAST']="10.0.0.0/8"; }
if($row['OBLAST']==$oblast[$o]) { if($row['OBLAST']==$oblast[$o]) {
   
$obl[$oblast[$o]][]=$row; $obl[$oblast[$o]][]=$row;
} }
} }
Line 313... Line 313...
   
// ------- prekodujem nazvy cloudu, aby nam nedelaly bordel pri spatnym kodovani ------- // ------- prekodujem nazvy cloudu, aby nam nedelaly bordel pri spatnym kodovani -------
   
for ($o=0; $o<=$pocet_oblasti; $o++) { for ($o=0; $o<=$pocet_oblasti; $o++) {
$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;"); $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;");
$jmena_cloudu[$oblast[$o]]=strtr($jmena_cloudu[$oblast[$o]], $trans_code); $jmena_cloudu[$oblast[$o]]=strtr(@$jmena_cloudu[@$oblast[@$o]], $trans_code);
} }
   
   
// ------- vypis ve sloupecku vlevo ------- // ------- vypis ve sloupecku vlevo -------
   
Line 363... Line 363...
} }
   
   
// ------- pokud je uvedena oblast i id sluzby ale groupa ne ------- // ------- pokud je uvedena oblast i id sluzby ale groupa ne -------
   
if ((($_GET["oblast"]!="") and ($_GET["id"]!="")) and ($_GET["group"]!="1")) { if ((($_GET["oblast"]!="") and (@$_GET["id"]!="")) and ($_GET["group"]!="1")) {
$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr); $sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
show_big($sorted3); show_big($sorted3);
   
echo "<div class='sizer'></div></div>"; echo "<div class='sizer'></div></div>";
echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>"; echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>";
Line 383... Line 383...
   
} }
   
// ------- pokud je uvedena oblast i id sluzby i groupa ------- // ------- pokud je uvedena oblast i id sluzby i groupa -------
   
if ((($_GET["oblast"]!="") and ($_GET["id"]!="")) and ($_GET["group"]=="1")) { if ((($_GET["oblast"]!="") and (@$_GET["id"]!="")) and ($_GET["group"]=="1")) {
$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr); $sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
show_groups($sorted3); show_groups($sorted3);
   
echo "<div class='sizer'></div></div>"; echo "<div class='sizer'></div></div>";
echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>"; echo "<div class='detail'><div class='nomargin title'><strong>Detaily:</strong></div>";
Line 470... Line 470...
   
} }
   
// ------- pokud je uvedena oblast ale ne id ani groupa ------- // ------- pokud je uvedena oblast ale ne id ani groupa -------
   
if ((($_GET["oblast"]!="") and ($_GET["id"]=="")) and ($_GET["group"]!="1")){ if ((($_GET["oblast"]!="") and (@$_GET["id"]=="")) and (@$_GET["group"]!="1")){
   
$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr); $sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
show_big($sorted3); show_big($sorted3);
   
echo "<div class='sizer'></div></div>"; echo "<div class='sizer'></div></div>";
   
} }
   
// ------- pokud je uvedena oblast a groupa ale ne id ------- // ------- pokud je uvedena oblast a groupa ale ne id -------
   
if ((($_GET["oblast"]!="") and ($_GET["id"]=="")) and ($_GET["group"]=="1")){ if ((($_GET["oblast"]!="") and (@$_GET["id"]=="")) and (@$_GET["group"]=="1")){
   
$sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr); $sorted3 = arfsort( $obl[$_GET["oblast"]], $order_arr);
show_groups($sorted3); show_groups($sorted3);
   
echo "<div class='sizer'></div></div>"; echo "<div class='sizer'></div></div>";

Powered by WebSVN 2.2.1