Курсовая работа: Разработка сайта. Система поиска по сайту
ParseTemplate ($term_paper ['templates'] ['top']);
if (empty ($query))
$term_paper ['other'] ['error'] =$term_paper ['error'] ['EmptyQuery'];
else
$term_paper ['other'] ['error'] =$term_paper ['error'] ['EmptyQueryAfterStrip'];
ParseTemplate ($term_paper ['templates'] ['error']);
ParseTemplate ($term_paper ['templates'] ['bottom']);
exit;
}
elseif ($QueryCount==1)
$query=$QueryArray [0] [0];
else
{
$query=" (";
for ($i=0; $i<$QueryCount; $i++)
if ($i! =$QueryCount-1)
$query. =$QueryArray [0] [$i]. "|";
else
$query. =$QueryArray [0] [$i];
$query. =")";
}
if (! empty ($query))
{
ParseTemplate ($term_paper ['templates'] ['top']);
$OpenDataFile=fopen ($term_paper ['file'] ['data'],'r');
flock ($OpenDataFile,1);
flock ($OpenDataFile,2);
while (! feof ($OpenDataFile))
if (preg_match ("/". $query. "/i",$string=fgets ($OpenDataFile)))