/************************************************************************/
/* KleinanzeigenMarkt fuer PHP-Nuke */
/* modifiziert und wesentlich erweitert: */
/* Copyright (c) 2003 by Mozi ( Sven 75 ) */
/* Haus & Hof Programmer */
/* Sachsen Anhalt, Germany */
/* http://www.MD-Party.de */
/* Anfragen bitte ins Diskussionsforum / Rubrik: Support PHP */
/* weitere PHP-Nuke Module sind bereits in Arbeit ! */
/* http://www.MD-Party.de */
/************************************************************************/
global $pagedescription, $pageauthor, $pagetitle, $pagetopic, $pagemeta, $pageheadline, $freigabe, $isvalidated, $bgcolor1;
if (!eregi("modules.php",$PHP_SELF)) {
die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
if (!isset($nrows)) $nrows=0;
if (!isset($min)) $min=0;
if (!isset($max)) $max=$min+$linksresults;
if(isset($orderby)) {
$orderby = convertorderbyin($orderby);
} else {
// $orderby = "title ASC";
$orderby = "datum DESC";
}
if ($show!="") {
$linksresults = $show;
} else {
$show=$linksresults;
}
if ( strlen($query) >= 3 ) {
$query = addslashes($query);
$navquery = $query ;
$query = str_replace('-', ' ', $query);
// $result = sql_query("select lid, cid, sid, title, price, headline, description, datum, hits, pic, contacter from ".$prefix."_add_adds where (title LIKE '%$query%' OR headline LIKE '%$query%' or description LIKE '%$query%') and isValidated = 'Yes' and isChanged = 'No' ORDER BY $orderby LIMIT $min,$linksresults", $dbi);
// $fullcountresult=sql_query("select lid, title, description, datum, hits, pic from ".$prefix."_add_adds where (title LIKE '%$query%' or headline LIKE '%$query%' or description LIKE '%$query%') and isValidated = 'Yes' and isChanged = 'No'", $dbi);
// $totalselectedlinks = sql_num_rows($fullcountresult, $dbi);
// $nrows = sql_num_rows($result, $dbi);
// $result = sql_query("select title,cdescription, parentid, adds from ".$prefix."_add_categories where cid=$cid", $dbi);
// list($title,$description,$parentid,$adds)=sql_fetch_row($result, $dbi);
$x=0;
$index=1;
$pagetitle = trim($query);
$metakey=getparentmeta($parentid, $topic);
if ($keywords){
$pagemeta = $metakey . ", " . $keywords;
} else {
$pagemeta = $metakey;
}
$pagemeta = str_replace('&', '&', $pagemeta);
$pagemeta = trim($pagemeta);
$topic = str_replace('&', '&', $topic);
$pagetopic = trim($topic);
$pagedescription = "Artikel mit dem Schlagwort $query";
$pagedescription .= trim(nl2br($description));
$pageheadline = trim(stripslashes($headline));
$pageauthor = $price . " - " . $contacter ;
$pageauthor = str_replace('&', '&', $pageauthor);
$pageauthor = trim($pageauthor);
}
include("header.php");
$the_query = stripslashes($navquery);
$the_query = str_replace("\'", "'", $the_query);
menu(1);
OpenTable();
if ($query != "") {
if ($nrows>=0) {
echo "
Schlagwort $the_query
";
echo "
"._CSF_USUBCATEGORIES."
";
echo "
\n";
/*
echo "
";
$result2 = sql_query("select cid, title from ".$prefix."_add_categories where title LIKE '%$query%' ORDER BY title DESC", $dbi);
while(list($cid, $stitle) = sql_fetch_row($result2, $dbi)) {
$res = sql_query("select * from ".$prefix."_add_adds where cid=$cid and isValidated = 'Yes' and isChanged = 'No'", $dbi);
$numrows = sql_num_rows($res, $dbi);
$result3 = sql_query("select cid,title,parentid from ".$prefix."_add_categories where cid=$cid", $dbi);
list($cid3,$title3,$parentid3) = sql_fetch_row($result3, $dbi);
if ($parentid3>0) $title3 = getparent($parentid3,$title3);
$title3 = ereg_replace($query, "$query", $title3);
echo "