cbTabHandler(); } function getDisplayTab($tab,$user,$ui) { global $database,$my,$mainframe,$mosConfig_live_site; $params = $this->params; $return="NULL"; $adsLimit = $params->get('adsLimit',''); $adDescription = $params->get('adDescription',''); $adTitle = $params->get('adTitle',''); $adDate = $params->get('adDate',''); $showTotal = $params->get('showTotal',''); $noAds = $params->get('noAds',''); $totalTitle = $params->get('totalTitle',''); // get language for marketplace if(file_exists($mainframe->getCfg('absolute_path').'/components/com_marketplace/language/'.$mainframe->getCfg('lang').'.php')) { require_once($mainframe->getCfg('absolute_path').'/components/com_marketplace/language/'.$mainframe->getCfg('lang').'.php'); } else { require_once($mainframe->getCfg('absolute_path').'/components/com_marketplace/language/english.php'); } $database->setQuery("select id from #__menu where link='index.php?option=com_marketplace' AND published=1"); $comitem=$database->loadResult() or die ('I cannot connect to the database because: ' . mysql_error());; $database->setQuery("SELECT id, user, userid, ad_type, ad_headline, ad_text, ad_image, ad_price, date_format(date_created, '%m/%d/%Y' ) as date_created, views FROM #__marketplace_ads WHERE userid=$user->id ORDER BY id DESC LIMIT $adsLimit"); $rows = $database->loadObjectList() or die ('I cannot connect to the database because: ' . mysql_error()); $nn = count($rows); if ($nn > 0) { $content .="
| ".JOO_AD.""; $content .=" | ".JOO_VIEWS.""; $content .=" | ".JOO_PRICE.""; $content .=" | ".JOO_DATE.""; $content .=" | |||
| ";
      					$content .=" ";
      			$content .="
 | ";
				$content .=" ";
      			$content .=""; $content .= $row->views; $content .=" | ";
				$content .=" ";
      			$content .=""; $content .= $row->ad_price; $content .=" | ";
					$content .=" ";
    			$content .=""; $content .= $row->date_created; $content .=" "; $content .= JOO_FROM; //$content .="".$row->user.""; $content .="".$row->user.""; $content .=" |