Der Output-Code sieht so aus, wie muss ich ihn ändern?:
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Volltextsuche
* Author : webmaster@zu-hause.biz
* Copyright :
* Created : 16-09-2002
* Modified : 04-07-2003
************************************************/
echo "
<center>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr><td class=\"textfieldtable\" align=center>
<table cellpadding=\"25\"><tr><td><p>Suchbegriff: <b>$suche</b>";
if (!isset ($suchen))
{
echo "<FORM action=\"" . $PHP_SELF . "?" . $QUERY_STRING . "\" method=\"post\"><INPUT id=suche name=suche>
<input name=\"suchen\" type=\"submit\" id=\"suchen\" value=\"Suchen\"></FORM>
</td></tr></table>";
}
else
{
echo "</td></tr></table>";
if($suche){
$suche = trim($suche);
$suchregexp = "(".str_replace(" ",")|(",$suche).")";
$s=ereg_replace("ü", "%FC",strtolower($suche));
$s=ereg_replace("ä", "%E4",$s);
$s=ereg_replace("ö", "%F6",$s);
$suchregexp .= "|$s";
$suchliste = explode(" ",strtolower($suche));
$sql = "SELECT A.title AS title,A.idart AS idart,A.summary AS comment,B.idcat AS idcat,C.parentid AS parentid,D.value AS content,A.idartlang AS sideid ";
$sql .= "FROM " . $cfg["tab"]["art_lang"] . " AS A, " . $cfg["tab"]["cat_art"] . " AS B, " . $cfg["tab"]["cat"] . " AS C, " . $cfg["tab"]["content"] . " AS D ";
$sql .= "WHERE A.idart=B.idart AND A.idartlang=D.idartlang AND B.idcat=C.idcat AND C.idclient='$client' AND idlang='$lang' AND online='1'";
$sql .= " AND (D.value REGEXP '$suchregexp' OR A.title REGEXP '$suchregexp' OR A.summary REGEXP '$suchregexp')";
$db->query($sql);
if ($db->num_rows() != 0){
for ($i=0; $i<$db->num_rows(); $i++) {
$db->next_record();
if ($auth->auth["uid"] == "nobody"){
$sql2 = "SELECT public FROM ".$cfg["tab"]["cat_lang"]." WHERE idcat='".$db->f("idcat")."'";
$db2 = new DB_Contenido; $db2->query($sql2); $db2->next_record();
if($db2->f("public") == 0)continue;
}
$num = 0 + $db->f("sideid");
$results[$num][link] = "front_content.php?client=$client&lang=$lang&parent=".$db->f("parentid")."&subid=".$db->f("parentid")."&idcat=".$db->f("idcat")."&idart=".$db->f("idart");
$results[$num][title] = $db->f("title");
switch ("CMS_VALUE[2]") {
case 0: $results[$num][text] = "";break;
case 1: $results[$num][text] = $db->f("comment");break;
case 2: $results[$num][text] .= substr(strip_tags(rawurldecode($db->f("content"))),0,100)."...";
}
for($x=0;$x<count($suchliste);$x++){
$hits[$num] += substr_count(strtolower($db->f("title")), $suchliste[$x]) +
substr_count(strtolower($db->f("comment")), $suchliste[$x]) +
substr_count(strtolower($db->f("content")), $suchliste[$x]);
}
}
if(count($hits) > 0){
$hits = array_values($hits);
$results = array_values($results);
array_multisort ($results, SORT_DESC, SORT_NUMERIC, $hits, SORT_DESC, SORT_NUMERIC);
for ($i=0; $i<count($hits); $i++){
echo "<tr><td> </td></tr>
<tr><td align=left><p><a href=\"".$results[$i][link]."\" class=\"fontCMS_VALUE[0]\"";
if("CMS_VALUE[3]"){echo "TARGET=\"CMS_VALUE[3]\" ";}
echo "><b>".$results[$i][title]."</b></a> <span class=\"fontCMS_VALUE[1]\">(".$hits[$i]." Fundstellen)";
echo "<i>".$results[$i][text]."</i></span></p></td></tr>";
}
} else { echo "<tr><td align=center><p>Keine Seiten gefunden</p></td></tr>"; }
} else { echo "<tr><td align=center><p>Keine Seiten gefunden</p></td></tr>"; }
}
echo "</table></center>";
}
?>
Danke im voraus!
Guido