jablonka.czprosek.czf

czf4bfu

Subversion Repositories:
[/] [index.php] - Diff between revs 16 and 17

Show entire file Ignore whitespace

Rev 16 Rev 17
Line 281... Line 281...
echo "<div class=\"icon_det\"><img alt=\"$ikonka_det\" src=\"$ikonka_url\"></div>"; echo "<div class=\"icon_det\"><img alt=\"$ikonka_det\" src=\"$ikonka_url\"></div>";
echo "<div class=\"info_det\">"; echo "<div class=\"info_det\">";
foreach ($test as $key=>$row) { foreach ($test as $key=>$row) {
if(!preg_match('%^(?:HESLOEDIT|SOURCE|BFUFILE|BFUICON|#)%',$key)) { if(!preg_match('%^(?:HESLOEDIT|SOURCE|BFUFILE|BFUICON|#)%',$key)) {
if (preg_match('%^URL(?:|IP|INET)%',$key)) { if (preg_match('%^URL(?:|IP|INET)%',$key)) {
$row = "<a href=\"".$row."\">".$row."</a>"; if (!preg_match('%\://%',$row)) {
  $row = "<a href=\"http://".$row."\">http://".$row."</a>";
  } else {
  $row = "<a href=\"".$row."\">".$row."</a>";
  }
} }
echo "<strong>".$key."</strong>:&nbsp;".$row."<br>"; echo "<strong>".$key."</strong>:&nbsp;".$row."<br>";
} }
} }
echo "</div><div class=\"info_cut\"></div></div>"; echo "</div><div class=\"info_cut\"></div></div>";
Line 296... Line 300...
$item = array(); $item = array();
$items = array(); $items = array();
$oblast = array(); $oblast = array();
   
$polozka=-1; $polozka=-1;
$patterns = array('%\:(?:\s|\t)+%', '%(?:\s|\t)+$%', '%(?:\s|\t)\\\\$%', '%OBLAST\:$%i'); $patterns = array('%\:(?:\s|\t)+%', '%\\\\([\r\n])+%', '%OBLAST\:([\r\n])+%i');
$replacements = array(":", "", "", "OBLAST:10.0.0.0/8"); $replacements = array(":", "\\", "OBLAST:10.0.0.0/8");
$trans = array((chr(13)) => "", (chr(9)) => "", "á" => "&#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;", "ž" => "&#382", "š" => "&#353"); $trans = array("\\" => "\\n", (chr(13)) => "", (chr(9)) => "", "á" => "&#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;", "ž" => "&#382", "š" => "&#353");
   
foreach($seznam as $fil) { foreach($seznam as $fil) {
$dat = file_get_contents($fil); $dat = file_get_contents($fil);
  $dat = preg_replace($patterns, $replacements, $dat);
  $dat = strtr($dat, $trans);
$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 (preg_match('%^TYP:%i',$data[$j])) { if (preg_match('%^TYP:%i',$data[$j])) {
$polozka++; $polozka++;
preg_match('/^(?:global|local)-(.*).txt$/i', $fil, $filen); preg_match('/^(?:global|local)-(.*).txt$/i', $fil, $filen);
$item[$polozka]=$item[$polozka]."BFUFILE:".$filen[1]."<br>"; $item[$polozka]=$item[$polozka]."BFUFILE:".$filen[1]."<br>";
} }
$data[$j] = preg_replace($patterns, $replacements, $data[$j]);  
$data[$j] = strtr($data[$j], $trans);  
$item[$polozka]=$item[$polozka].$data[$j]."<br>"; $item[$polozka]=$item[$polozka].$data[$j]."<br>";
} }
} }
} }
   
Line 340... Line 344...
if($b===$cnt_ic) { if($b===$cnt_ic) {
$items[$k]["BFUICON"]=get_icon($items[$k]["BFUFILE"], $items[$k]["ICON"], $items[$k]["TYP"]); $items[$k]["BFUICON"]=get_icon($items[$k]["BFUFILE"], $items[$k]["ICON"], $items[$k]["TYP"]);
$items[$k]["ID"]=$k; $items[$k]["ID"]=$k;
} else { } else {
if(($ic[$b])!="") { if(($ic[$b])!="") {
  $ic[$b] = strtr($ic[$b], array("\\n\\n" => "<br>", "\\n" => "<br>"));
$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));
} }
} }
} }

Powered by WebSVN 2.2.1