Keresés

location.href='$www_root/search/index.php?q=".$_POST[search_string]."&menu_id=".$menu_id."'"; } if($_GET[q]) $search_string=$_GET[q]; else $search_string=$_SESSION[keres2]; if($search_string) { //keresés tartalmi oldalaban $talalat==0; //KERESÉS - article $search_string2= $search_string; $sql_script="SELECT * FROM article, menu WHERE article_allapot=1 AND ( (article_cim_hu LIKE '%$search_string2%' ) OR (article_head1_hu LIKE '%$search_string2%') OR (article_body_hu LIKE '%$search_string2%') OR (article_cimke_hu LIKE '%$search_string2%') ) AND article_category_id=menu_id ORDER by article_category_id, article_date DESC"; $req_news=mysql_query("$sql_script LIMIT 0, 200"); while ($inner1 = mysql_fetch_assoc($req_news)) { $fn="../data/article/".$inner1[article_id]."_th.jpg"; $fn2="../data/article/".$inner1[article_id]."_th.jpg"; $fn3="$server/data/article/".$inner1[article_id]."_th.jpg"; if($inner1[article_category_id]==6) $ide=1; elseif($inner1[article_category_id]==10) $ide=10; else $ide=0; ?>

"); foreach ($req as $inner) { $content_id = $inner[content_id]; if ($content_id != 0) { $res .= ""; $i = 0; $tmp = ""; $cmd = "free"; $text = html_eltavolitas($inner[$content_body]); $es=strlen($text); $er=300; $eq=0; while ( ($i<$er || $eq==0) && $i<$es) { if($text[$i]!=" ") $eq=0; else $eq=1; if($text[$i] == "<") { $cmd = "lock"; } elseif ( $text[$i] == ">" && $cmd == "lock") { $cmd = "free"; } if ($cmd == "free" && $text[$i] != ">") $tmp .= $text[$i]; $i++; } $req2 = getrec("SELECT * FROM menu WHERE menu_id=$inner[content_menu_id]"); $res .= "
$req2[menu_name_hu]"; $res .= "

"; $res .= $tmp; $res .= '

'; } $talalat++; } echo($res); if($talalat==0) echo $NINCS."
"; } else { $_SESSION['keres2']=""; $_SESSION['type2']=""; } ?>