Ads Search

id]) { selectCategories($row->id, $children, $return); } else { $return[] = array($row->id, $row->name); } } } return $return; } /****************************************************/ $catid = intval( mosGetParam( $_GET, 'catid', 0 )); $text_search = mosGetParam($_GET,'text_search','..keyword search'); $itemid = intval($params->get( 'default_itemid', mosGetParam( $_GET, 'Itemid', 0 ) )) ; $parentid = 0; if (isset($_REQUEST['parentid'])) { $parentid = intval($_REQUEST['parentid']); } //Each element is array ("Text on HTML output", lowerbound, upperbound); $ads_price_array = array( array("-- Price --", ""), array("< S$100", "CAST(ad_price AS UNSIGNED) > 0 AND CAST(ad_price AS UNSIGNED) < 100"), array("S$100 - S$500", "CAST(ad_price AS UNSIGNED) >= 100 AND CAST(ad_price AS UNSIGNED) <= 500"), array("S$501 - S$1000", "CAST(ad_price AS UNSIGNED) > 500 AND CAST(ad_price AS UNSIGNED) <= 1000"), array("> S$1000", "CAST(ad_price AS UNSIGNED) > 1000") ); $database->setQuery( "SELECT c.* FROM #__adsmanager_categories as c ". "WHERE c.published = 1 ORDER BY c.parent,c.ordering"); $rows = $database->loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } // establish the hierarchy of the menu $children = array(); // first pass - collect children foreach ($rows as $v ) { $pt = $v->parent; $list = @$children[$pt] ? $children[$pt] : array(); array_push( $list, $v ); $children[$pt] = $list; } $tmp = array(); $newpart = selectCategories(1, $children, $tmp); $tmp = array(); $preowned = selectCategories(2, $children, $tmp); if (file_exists($mosConfig_absolute_path .'/components/com_adsmanager/lang/lang_' . $mosConfig_lang . '.php')) include_once( $mosConfig_absolute_path .'/components/com_adsmanager/lang/lang_' . $mosConfig_lang . '.php' ); else include_once( $mosConfig_absolute_path .'/components/com_adsmanager/lang/lang_english.php' ); $url = "index.php"; ?>

eNewsletter Sign-up

Sign up with our eNewsletter to receive the latest ads posting and news!
Name:
Email:


See all listing

Latest Ads

id; getChildrenCategories($tree, $cat_list, $c[$n]->id); } } } function displayVerticalLatestAds($ads,$image,$itemid,$nb_images, $isNewPart) { global $mosConfig_absolute_path,$mosConfig_live_site; $scale = 1.25; $thumb_w = 100 * $scale; $thumb_h = 75 * $scale; $found = false; if ($image == 1) { echo "
"; foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); $ok = 0;$i=1; while(!$ok) { if ($i < $nb_images + 1) { $ext_name = chr(ord('a')+$i-1); $pic = $mosConfig_absolute_path."/images/com_adsmanager/car_parts_info/".$row->id.$ext_name."_t.jpg"; if (file_exists( $pic)) { echo "
"; $ok = 1; $found = true; } } else { $ok = 1; } $i++; } if (!$found) continue; $heading = stripslashes($row->ad_headline); if (strlen($heading) > 40) { $heading = substr($heading, 0, 40) . "..."; } $veh_type = stripslashes($row->ad_vehiclemake); if (strlen($veh_type) > 25) { $veh_type = substr($veh_type, 0, 25) . "..."; } echo "
$heading"; //vehicle model/type echo "
VEHICLE TYPE:
" . $veh_type; //price echo "

ONLY S$" . $row->ad_price . ""; echo "
Contact " . ($isNewPart == 1 ? "Dealer" : "Seller") . "
"; echo "
"; break; } echo "
"; } else { foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); echo "".stripslashes($row->ad_headline).""; break; } } } } $adid = intval($params->get( 'adid', -1 )) ; $catid = intval($params->get( 'category_id', 0 )) ; $image = intval($params->get( 'image', 1 )) ; $itemid = intval($params->get( 'default_itemid', mosGetParam( $_GET, 'Itemid', 0 ) )) ; $random = intval($params->get( 'random',0)); $isNewPart = $catid == 1 ? true : false; $database->setQuery( "SELECT c.id, c.name, c.parent FROM #__adsmanager_categories as c ". "WHERE c.published = 1 ORDER BY c.parent,c.ordering"); $list = $database->loadObjectList(); // establish the hierarchy of the menu $tree = array(); // first pass - collect children foreach ($list as $v ) { $pt = $v->parent; $list_temp = @$tree[$pt] ? $tree[$pt] : array(); array_push( $list_temp, $v ); $tree[$pt] = $list_temp; } if ($adid != -1) { $order_sql = " AND a.id = $adid "; } else if ($catid > 0) { $cat_list = "$catid"; getChildrenCategories($tree, $cat_list, $catid); $order_sql = " AND a.category IN ($cat_list) "; } if ($random == 1) { $order_sql .= "ORDER BY RAND() "; } else { $order_sql .= "ORDER BY a.published_date DESC, a.id "; } $sqlquery = "SELECT a.id, a.name, a.ad_headline, a.category, a.date_created,c.name as cat, a.ad_price, a.ad_vehiclemake " . "FROM #__adsmanager_ads as a, #__adsmanager_categories as c " . "WHERE c.published = 1 and a.published = 1 and a.category = c.id and a.ad_availability = 1 $order_sql DESC"; $database->setQuery($sqlquery); $ads = $database->loadObjectList(); // get configuration $database->setQuery( "SELECT * FROM #__adsmanager_config"); $confs = $database->loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } //echo "

$sqlquery

"; displayVerticalLatestAds($ads,$image,$itemid,$confs[0]->nb_images, $isNewPart); ?>

Popular Ads

id; getChildrenCategories($tree, $cat_list, $c[$n]->id); } } } function displayVerticalLatestAds($ads,$image,$itemid,$nb_images, $isNewPart) { global $mosConfig_absolute_path,$mosConfig_live_site; $scale = 1.25; $thumb_w = 100 * $scale; $thumb_h = 75 * $scale; $found = false; if ($image == 1) { echo "
"; foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); $ok = 0;$i=1; while(!$ok) { if ($i < $nb_images + 1) { $ext_name = chr(ord('a')+$i-1); $pic = $mosConfig_absolute_path."/images/com_adsmanager/car_parts_info/".$row->id.$ext_name."_t.jpg"; if (file_exists( $pic)) { echo "
"; $ok = 1; $found = true; } } else { $ok = 1; } $i++; } if (!$found) continue; $heading = stripslashes($row->ad_headline); if (strlen($heading) > 40) { $heading = substr($heading, 0, 40) . "..."; } $veh_type = stripslashes($row->ad_vehiclemake); if (strlen($veh_type) > 25) { $veh_type = substr($veh_type, 0, 25) . "..."; } echo "
$heading"; //vehicle model/type echo "
VEHICLE TYPE:
" . $veh_type; //price echo "

ONLY S$" . $row->ad_price . ""; echo "
Contact " . ($isNewPart == 1 ? "Dealer" : "Seller") . "
"; echo "
"; break; } echo "
"; } else { foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); echo "".stripslashes($row->ad_headline).""; break; } } } } $adid = intval($params->get( 'adid', -1 )) ; $catid = intval($params->get( 'category_id', 0 )) ; $image = intval($params->get( 'image', 1 )) ; $itemid = intval($params->get( 'default_itemid', mosGetParam( $_GET, 'Itemid', 0 ) )) ; $random = intval($params->get( 'random',0)); $isNewPart = $catid == 1 ? true : false; $database->setQuery( "SELECT c.id, c.name, c.parent FROM #__adsmanager_categories as c ". "WHERE c.published = 1 ORDER BY c.parent,c.ordering"); $list = $database->loadObjectList(); // establish the hierarchy of the menu $tree = array(); // first pass - collect children foreach ($list as $v ) { $pt = $v->parent; $list_temp = @$tree[$pt] ? $tree[$pt] : array(); array_push( $list_temp, $v ); $tree[$pt] = $list_temp; } if ($adid != -1) { $order_sql = " AND a.id = $adid "; } else if ($catid > 0) { $cat_list = "$catid"; getChildrenCategories($tree, $cat_list, $catid); $order_sql = " AND a.category IN ($cat_list) "; } if ($random == 1) { $order_sql .= "ORDER BY RAND() "; } else { $order_sql .= "ORDER BY a.published_date DESC, a.id "; } $sqlquery = "SELECT a.id, a.name, a.ad_headline, a.category, a.date_created,c.name as cat, a.ad_price, a.ad_vehiclemake " . "FROM #__adsmanager_ads as a, #__adsmanager_categories as c " . "WHERE c.published = 1 and a.published = 1 and a.category = c.id and a.ad_availability = 1 $order_sql DESC"; $database->setQuery($sqlquery); $ads = $database->loadObjectList(); // get configuration $database->setQuery( "SELECT * FROM #__adsmanager_config"); $confs = $database->loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } //echo "

$sqlquery

"; displayVerticalLatestAds($ads,$image,$itemid,$confs[0]->nb_images, $isNewPart); ?>
See all listing

Latest Ads

id; getChildrenCategories($tree, $cat_list, $c[$n]->id); } } } function displayVerticalLatestAds($ads,$image,$itemid,$nb_images, $isNewPart) { global $mosConfig_absolute_path,$mosConfig_live_site; $scale = 1.25; $thumb_w = 100 * $scale; $thumb_h = 75 * $scale; $found = false; if ($image == 1) { echo "
"; foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); $ok = 0;$i=1; while(!$ok) { if ($i < $nb_images + 1) { $ext_name = chr(ord('a')+$i-1); $pic = $mosConfig_absolute_path."/images/com_adsmanager/car_parts_info/".$row->id.$ext_name."_t.jpg"; if (file_exists( $pic)) { echo "
"; $ok = 1; $found = true; } } else { $ok = 1; } $i++; } if (!$found) continue; $heading = stripslashes($row->ad_headline); if (strlen($heading) > 40) { $heading = substr($heading, 0, 40) . "..."; } $veh_type = stripslashes($row->ad_vehiclemake); if (strlen($veh_type) > 25) { $veh_type = substr($veh_type, 0, 25) . "..."; } echo "
$heading"; //vehicle model/type echo "
VEHICLE TYPE:
" . $veh_type; //price echo "

ONLY S$" . $row->ad_price . ""; echo "
Contact " . ($isNewPart == 1 ? "Dealer" : "Seller") . "
"; echo "
"; break; } echo "
"; } else { foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); echo "".stripslashes($row->ad_headline).""; break; } } } } $adid = intval($params->get( 'adid', -1 )) ; $catid = intval($params->get( 'category_id', 0 )) ; $image = intval($params->get( 'image', 1 )) ; $itemid = intval($params->get( 'default_itemid', mosGetParam( $_GET, 'Itemid', 0 ) )) ; $random = intval($params->get( 'random',0)); $isNewPart = $catid == 1 ? true : false; $database->setQuery( "SELECT c.id, c.name, c.parent FROM #__adsmanager_categories as c ". "WHERE c.published = 1 ORDER BY c.parent,c.ordering"); $list = $database->loadObjectList(); // establish the hierarchy of the menu $tree = array(); // first pass - collect children foreach ($list as $v ) { $pt = $v->parent; $list_temp = @$tree[$pt] ? $tree[$pt] : array(); array_push( $list_temp, $v ); $tree[$pt] = $list_temp; } if ($adid != -1) { $order_sql = " AND a.id = $adid "; } else if ($catid > 0) { $cat_list = "$catid"; getChildrenCategories($tree, $cat_list, $catid); $order_sql = " AND a.category IN ($cat_list) "; } if ($random == 1) { $order_sql .= "ORDER BY RAND() "; } else { $order_sql .= "ORDER BY a.published_date DESC, a.id "; } $sqlquery = "SELECT a.id, a.name, a.ad_headline, a.category, a.date_created,c.name as cat, a.ad_price, a.ad_vehiclemake " . "FROM #__adsmanager_ads as a, #__adsmanager_categories as c " . "WHERE c.published = 1 and a.published = 1 and a.category = c.id and a.ad_availability = 1 $order_sql DESC"; $database->setQuery($sqlquery); $ads = $database->loadObjectList(); // get configuration $database->setQuery( "SELECT * FROM #__adsmanager_config"); $confs = $database->loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } //echo "

$sqlquery

"; displayVerticalLatestAds($ads,$image,$itemid,$confs[0]->nb_images, $isNewPart); ?>

Popular Ads

id; getChildrenCategories($tree, $cat_list, $c[$n]->id); } } } function displayVerticalLatestAds($ads,$image,$itemid,$nb_images, $isNewPart) { global $mosConfig_absolute_path,$mosConfig_live_site; $scale = 1.25; $thumb_w = 100 * $scale; $thumb_h = 75 * $scale; $found = false; if ($image == 1) { echo "
"; foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); $ok = 0;$i=1; while(!$ok) { if ($i < $nb_images + 1) { $ext_name = chr(ord('a')+$i-1); $pic = $mosConfig_absolute_path."/images/com_adsmanager/car_parts_info/".$row->id.$ext_name."_t.jpg"; if (file_exists( $pic)) { echo "
"; $ok = 1; $found = true; } } else { $ok = 1; } $i++; } if (!$found) continue; $heading = stripslashes($row->ad_headline); if (strlen($heading) > 40) { $heading = substr($heading, 0, 40) . "..."; } $veh_type = stripslashes($row->ad_vehiclemake); if (strlen($veh_type) > 25) { $veh_type = substr($veh_type, 0, 25) . "..."; } echo "
$heading"; //vehicle model/type echo "
VEHICLE TYPE:
" . $veh_type; //price echo "

ONLY S$" . $row->ad_price . ""; echo "
Contact " . ($isNewPart == 1 ? "Dealer" : "Seller") . "
"; echo "
"; break; } echo "
"; } else { foreach($ads as $row) { $linkTarget = sefRelToAbs("index.php?option=com_adsmanager&page=show_ad&adid=".$row->id."&Itemid=".$itemid); echo "".stripslashes($row->ad_headline).""; break; } } } } $adid = intval($params->get( 'adid', -1 )) ; $catid = intval($params->get( 'category_id', 0 )) ; $image = intval($params->get( 'image', 1 )) ; $itemid = intval($params->get( 'default_itemid', mosGetParam( $_GET, 'Itemid', 0 ) )) ; $random = intval($params->get( 'random',0)); $isNewPart = $catid == 1 ? true : false; $database->setQuery( "SELECT c.id, c.name, c.parent FROM #__adsmanager_categories as c ". "WHERE c.published = 1 ORDER BY c.parent,c.ordering"); $list = $database->loadObjectList(); // establish the hierarchy of the menu $tree = array(); // first pass - collect children foreach ($list as $v ) { $pt = $v->parent; $list_temp = @$tree[$pt] ? $tree[$pt] : array(); array_push( $list_temp, $v ); $tree[$pt] = $list_temp; } if ($adid != -1) { $order_sql = " AND a.id = $adid "; } else if ($catid > 0) { $cat_list = "$catid"; getChildrenCategories($tree, $cat_list, $catid); $order_sql = " AND a.category IN ($cat_list) "; } if ($random == 1) { $order_sql .= "ORDER BY RAND() "; } else { $order_sql .= "ORDER BY a.published_date DESC, a.id "; } $sqlquery = "SELECT a.id, a.name, a.ad_headline, a.category, a.date_created,c.name as cat, a.ad_price, a.ad_vehiclemake " . "FROM #__adsmanager_ads as a, #__adsmanager_categories as c " . "WHERE c.published = 1 and a.published = 1 and a.category = c.id and a.ad_availability = 1 $order_sql DESC"; $database->setQuery($sqlquery); $ads = $database->loadObjectList(); // get configuration $database->setQuery( "SELECT * FROM #__adsmanager_config"); $confs = $database->loadObjectList(); if ($database -> getErrorNum()) { echo $database -> stderr(); return false; } //echo "

$sqlquery

"; displayVerticalLatestAds($ads,$image,$itemid,$confs[0]->nb_images, $isNewPart); ?>