} else {
$unix = 1;
}
}
}
if (!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text") {
echo $head;
if (!empty($_POST['s_mask']) && !empty($_POST['m'])) {
$sr = new SearchResult($_POST['s_dir'], $_POST['s_text'], $_POST['s_mask']);
} else {
$sr = new SearchResult($_POST['s_dir'], $_POST['s_text']);
}
$sr->SearchText(0, 0);
$res = $sr->GetResultFiles();
$found = $sr->GetMatchesCount();
$titles = $sr->GetTitles();
$r = "";
if ($found > 0) {
$r .= "<TABLE width=100%>";
foreach ($res as $file => $v) {
$r .= "<TR>";
$r .= "<TD colspan=2><font face=Verdana size=-2><b>" . ws(3);
$r .= $windows ? str_replace("/", "\\", $file) : $file;
$r .= "</b></font></ TD>";
$r .= "</TR>";
foreach ($v as $a => $b) {
$r .= "<TR>";
$r .= "<TD align=center><B><font face=Verdana size=-2>" . $a . "</font></B></TD>";
$r .= "<TD><font face=Verdana size=-2>" . ws(2) . $b . "</font></TD>";
$r .= "</TR>\n";
}