czf4bfu |
Subversion Repositories: |
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>: ".$row."<br>"; |
echo "<strong>".$key."</strong>: ".$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)) => "", "á" => "á", "é" => "é", "ě" => "ě", "í" => "í", "ó" => "ó", "ú" => "ú", "ů" => "ů", "ý" => "ý", "" => "ž", "" => "š", "č" => "č", "ř" => "ř", "ď" => "ď", "" => "ť", "ň" => "ň", "Á" => "Á", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "" => "Ž", "" => "Š", "Č" => "Č", "Ř" => "Ř", "Ď" => "Ď", "" => "Ť", "Ň" => "Ň", "ž" => "ž", "š" => "š"); |
$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 = 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)); | |
} |
} | |
} |
} | |
} |
} |