define somme vars $queshtml = ''; $faqlist = ''; $sql = "select * from $faqcats order by id"; $result = db_query($sql); $numrows = db_num_rows($result); for($x=0;$x<$numrows;$x++){ $resrow = db_fetch_row($result); $catid = $resrow[0]; $cat = $resrow[1]; $faqcathtml .= "$cat
"; } if (has_right(-9, 'faqsys')) $faqcathtml .= "
Hinzufügen/bearbeiten der Kategorien"; $faqcathtml = "
$faq_title > Kategorien

$faqcathtml


"; if ($menu->getA(1) === 'C'){ $cid = $menu->getE(1); $sql = "select cat from $faqcats where id='$cid'"; $result = db_query($sql); $resrow = db_fetch_row($result); $cattext = $resrow[0]; $sql = "select * from $table where catid='$cid'"; $result = db_query($sql); $numrows = db_num_rows($result); $faq_title .= " > $cattext"; for($x=0;$x<$numrows;$x++){ $resrow = db_fetch_row($result); $faqid = $resrow[0]; $catid = $resrow[1]; $question = $resrow[2]; $answer = $resrow[3]; $added = $resrow[4]; $question = bbcode(stripslashes($question)); $answer = bbcode(stripslashes($answer)); $dta = explode(" ", $added); $added = $dta[0]; $queslist .= "$question
"; if (has_right(-9, 'faqsys')) $adminlinks = "(bearbeiten) (löschen)"; $faqlist .= "
$question $adminlinks($added)

$answer


"; } if (has_right(-9, 'faqsys')) $adminlinks = "(Füge neuen Eintrag hinzu)"; $queshtml = "
$faq_title $adminlinks

$queslist



"; } if (isset($_POST['search'])){ $search = escape($_POST['search'],'string'); $sql = "select * from $table where question rlike '$search' or answer rlike '$search'"; $result = db_query($sql); $numrows = db_num_rows($result); for($x=0;$x<$numrows;$x++){ $resrow = db_fetch_row($result); $faqid = $resrow[0]; $catid = $resrow[1]; $question = $resrow[2]; $answer = $resrow[3]; $added = $resrow[4]; $question = stripslashes($question); $answer = stripslashes($answer); $dta = explode(" ", $added); $added = $dta[0]; $queslist .= "$question
"; if (has_right(-9, 'faqsys')) $adminlinks = "(beabreiten) (Löschen)"; $faqlist .= "
$question $adminlinks($added)

$answer


"; } $queshtml = "
$faq_title Suche Resultate

$queslist



"; } $pagetitle = $faq_title; //Ilch modify $title = $allgAr['title'].' :: FAQ'; $hmenu = 'FAQ'; $design = new design ( $title , $hmenu ); $design->header(); print "
Suche in der FAQ:
"; print $faqcathtml; print $queshtml; print $faqlist; print "
"; //Ilch modify $design->footer(); ?>