"; else echo ""; echo str_replace("%1", $filenumber, $interface_all); echo "$dirname "; echo filesize($f)." $lang_bytes, ".date("d M Y", filectime($f)).". "; if (IsAllowed($dirname)==2) { $fc=file($f); $filet=join("", $fc); if (preg_match("/(.*)<\/title.*>/isU", $filet, $match)) { // display the title // показать заголовок echo trim($match[1]); } // display the content matches // показать содержимое $s=implode($fc, $explodestring); $s=strip_tags($s); $fc=explode($explodestring, $s); $q=explode(" ",$query); $occurrence=0; echo "
$desc_header"; for ($i=0; $i$q[$j]", $s); $occ=1; } else { $key=htmlentities($q[$j]); if (stristr($s, $key)) { $s=str_replace($key, "$key", $s); $occ=1; } } } if ($occ) { $occ=0; echo "...$s..."; ++$occurrence; if ($occurrence > $maxoccurrences) break; } } echo $desc_footer; } echo "\n"; } // Display navigation bar // Вывести панель навигации function DisplayNavbar($all) { global $PHP_SELF; global $color0, $pages, $query, $m, $search_separator; echo ""; for ($k=1; $k<=$all; $k+=$pages) { if ($k!=1) echo $search_separator; echo "$k-"; if ($k+$pages>$all) echo $all; else echo ($k-1+$pages); echo ""; } echo "\n"; } // ****************************> MAIN CODE <********************************* if (!isset($from)) $from=1; if (!isset($query)) $query=""; $query=strtolower(trim(strip_tags($query))); place_header(); if ($query!="") { $rootdir=$DOCUMENT_ROOT; unset($filesearch); countdirs($start_search); $time=explode(' ', microtime()); $seconds=($time[1]+$time[0]-$start_time); $all=count($filesearch); if ($all>0) { echo "
".str_replace("%2", sprintf("%01.3f", $seconds), str_replace("%1", $all, $lang_wasfound))."
\n"; echo "\n"; $showed=0; DisplayNavbar($all); for($i=$from;$i < $from+$pages;++$i) { if ($i >= $all+1) break; Render($filesearch[$i-1], $i); } DisplayNavbar($all); echo "
\n"; } else { echo "
".str_replace("%1", sprintf("%01.3f", $seconds), $lang_nofiles)."
"; } } $time=explode(' ',microtime()); $seconds=($time[1]+$time[0]-$start_time); echo "

".str_replace("%1", sprintf("%01.3f", $seconds), $lang_generated)."

"; place_footer(); ?>