getPath('toolbar_html')); class HTML_frontend_estateagent{ //========================================================================================= function ORDERVALUES(){ return array( JText::_('EA_OBJ_REFER_NR') => 'obj_id' , JText::_('EA_OBJ_TITLE') => 'title' , JText::_('EA_OBJ_STATE') =>'locstate', JText::_('EA_OBJ_DISTRICT') => 'district', JText::_('EA_OBJ_TOWN') => 'town', JText::_('EA_OBJ_PRICE') =>'value', JText::_('EA_OBJ_CREATED_DATE') => 'created', JText::_('EA_OBJ_TYPE') => 'type' ); } //========================================================================================= function getOrderingQuery(){ global $mainframe; $order = $mainframe->getUserStateFromRequest('com_estateagent.forder','order','value'); $orderdir = $mainframe->getUserStateFromRequest('com_estateagent.orderdir','orderdir','ASC'); if (in_array($order, HTML_frontend_estateagent::ORDERVALUES())) return " $order $orderdir "; else return ""; } //========================================================================================= function forderingList($tag,$attrib,$sel=null){ $val=HTML_frontend_estateagent::ORDERVALUES(); $keys=array_keys($val); foreach($keys as $key){ $options[]= JHTML::_('select.option', $val[$key],$key ); } return JHTML::_('select.genericlist', $options, $tag, $attrib, 'value','text', $sel); } //========================================================================================= function OrderingBar($act,$id,$pageNav){ global $mainframe; $order = $mainframe->getUserStateFromRequest( 'com_estateagent.forder','order','value' ); $orderdir = $mainframe->getUserStateFromRequest( 'com_estateagent.orderdir','orderdir','ASC' ); $opt[] = JHTML::_('select.option', 'ASC', JText::_('EAB_SORT_OPT1')); $opt[] = JHTML::_('select.option', 'DESC', JText::_('EAB_SORT_OPT2')); $sord= JHTML::_('select.genericlist', $opt, 'orderdir', 'size="1" class="inputbox" style="width:105px;" onchange="document.ordering_form.submit()"','value','text', $orderdir); $bar=""; $bar .="
"; $bar .="
"; $bar .="
"; $bar .= "".JText::_('EA_SORT_OPERATION').": "; $bar .= "  "; $bar .= HTML_frontend_estateagent::forderingList('order', 'size="1" class="inputbox" onchange="document.ordering_form.submit()"',$order); $bar .= "  "; $bar .= $sord; $bar .= "  "; $bar .="
"; $bar .="
"; $bar .= $pageNav->getLimitBox(); $bar .="
"; $bar .="
"; $bar.="
"; $bar .="
"; return $bar; } //========================================================================================== function contactInformation(&$obj){ $database = &JFactory::getDBO(); // select users (agents) contact information $my = &JFactory::getUser(); $gid = $my->gid; $gq= is_numeric($gid)?"AND d.access<=$gid":""; $sql = "SELECT d.* FROM #__contact_details AS d LEFT JOIN #__categories AS c ON (d.catid = c.id) WHERE d.user_id = $obj->created_by" ." AND d.published = 1 $gq AND c.name='EstateAgents' "; $database->setQuery($sql); //$ct = null; $contact=$database->loadObject(); echo $database->getErrorMsg(); //check which contact fields to show $contact = EA_helper::getContactDetails($contact); return $contact; } //===================================================================================================== function showCatOverview($catinfo,$hot){ $eaconf=&EAConf::getInstance(); if(count($hot) > 0 && $eaconf->ea_hotfp_pos==0){ HTML_frontend_estateagent::show_cat_hotobjects($hot); } // categories view style //show categories in 1 column if($eaconf->ea_fpstyle == 0){ ?>
children as $c) { // show maincategories $cat= $catinfo[$c]; ?> children) > 0 && $eaconf->ea_show_scats == 1){ foreach($cat->children as $sc) { $scat= $catinfo[$sc]; if($scat->id){ ?> "; } else //show categories in 2 columns { ?>
  entries+$cat->entriesR) > 0){ echo "" . $cat->name .""; } else echo $cat->name; if($eaconf->ea_cat_entries==1) echo " (" . ($cat->entries+$cat->entriesR) . ")"; ?> image;?> image !==""){?> description; ?>
      L  entries+$scat->entriesR ) > 0){ echo "" . $scat->name .""; } else echo $scat->name; if($eaconf->ea_cat_entries==1) echo " (" . ($scat->entries+$scat->entriesR ). ")"; ?> description; ?>
children as $c) { // show maincategories $cat= $catinfo[strval($c)]; if($x%2==0) echo ""; ?> "; if(count($catinfo[0]->children) == $x && $x%2 != 0) echo ""; if($x%2==0) echo ""; } echo "
entries+$cat->entriesR > 0){ echo "" . $cat->name .""; } else echo $cat->name; if($eaconf->ea_cat_entries==1) echo " (" .( $cat->entries+$cat->entriesR ). ")"; ?>
image;?> image !==""){?> description; ?>

children) > 0&& $eaconf->ea_show_scats == 1){ if(count(@$cat->children) > 0) echo "
".JText::_('EA_CAT_SUBS') . "
"; $y=0; foreach($cat->children as $sc) { $scat= $catinfo[$sc]; if($cat->id){ if(($scat->entries+$scat->entriesR) > 0){ echo "" . $scat->name .""; } else echo $scat->name; if($eaconf->ea_cat_entries==1) echo " (" . ($scat->entries+$scat->entriesR ). ")"; } $y++; if($y < count($cat->children)) echo ",   "; } if($y = count($cat->children)) echo "
"; } $x++; echo "
 
"; } if(count($hot) > 0 && $eaconf->ea_hotfp_pos==1){ HTML_frontend_estateagent::show_cat_hotobjects($hot); } } //=================================================================================================== function show_CatEntries($act,$task,$id,$catinfo,$hot,$regular,$pageNav){ $eaconf=&EAConf::getInstance(); $database = &JFactory::getDBO(); $query = " SELECT * FROM #__estateagent_categories WHERE id =".$id; $database->setQuery($query); $cat=$database->loadObject(); //Список городов $query = "SELECT DISTINCT town FROM #__estateagent WHERE `cat` =".$id; $database->setQuery($query); $towns=$database->loadObjectList(); ?>
image;?> image !==""){?>
name;?>
description;?>
children) > 0) {?>
children as $sc){ $scat=$catinfo[$sc];?>
entries+ $scat->entriesR) > 0) echo "" . $scat->name . ""; else echo $scat->name; if($eaconf->ea_cat_entries == 1) echo " (" . ($scat->entries+ $scat->entriesR) . ")";?>

0){ echo HTML_frontend_estateagent::OrderingBar($act,$id,$pageNav); HTML_frontend_estateagent::show_cat_objects($regular); }?>
getPagesLinks();?>
getPagesCounter();?>
0){ ?>
0){ ?> ". "" . JText::_('EA_SHOW_ALL_HOTS') .""."";?> setTitle( $mainframe->getCfg('sitename') .' :: ' . $obj->title ); $mainframe->addMetaTag( "description", $obj->metadesc ); $mainframe->addMetaTag( "keywords", $obj->metakey ); $mainframe->addMetaTag( "generator", $eaconf->ea_name.' - v'.$eaconf->ea_version ); $tpath=EA_Template::getCurrentTemplatePath(); switch( $act ) { case "pdfexport": include(EA_SITE_PATH.DS."templates".DS."pdf.estateagent.php"); break; case "print": include(EA_SITE_PATH.DS."templates".DS."print.estateagent.php"); break; default: include($tpath.DS."obj.php"); break; break; } } //============================================================================================== function show_mtfForm($obj){ global $mainframe; $eahelper=&EA_Helper::getInstance(); $eaconf=& EAConf::getInstance(); $lang =& JFactory::getLanguage(); $lang->load('com_mailto'); $document=& JFactory::getDocument(); $document->setTitle( $mainframe->getCfg('sitename') .' :: '. $obj->title ); ?>
ea_captcha == 1) {?>
 *
 *
   
 *
(*
ea_l_srch){ if(count($map)==0 && $eaconf->ea_d_srch == 0) { ?>
"; } } echo "
" method="post" onsubmit="javascript: validate();" id="easearch" name="easearch" > ea_category_srch || $eaconf->ea_f_srch || $eaconf->ea_type_srch || $eaconf->ea_price_srch){ echo "
"; echo ""; if ($eaconf->ea_category_srch) echo ""; if ($eaconf->ea_type_srch) echo ""; if ($eaconf->ea_f_srch) echo ""; if ($eaconf->ea_price_srch){ $pricevalues = explode("\r\n", $eaconf->ea_pricelist); $pricevalues = array_values(array_unique($pricevalues)); $minimvalue = $eahelper->getthepricelist($pricevalues, 'minvalue'); $maximvalue = $eahelper->getthepricelist($pricevalues, 'maxvalue'); echo "".""; } echo "
".JText::_('EA_CAT_OVW')."".$select_cat."
".JText::_('EA_SRCH_TYPE')."".$propertyType['type']."
".JText::_('EA_SRCH_FREE')."
".JText::_('EA_SRCH_PRICE_FROM')."".$minimvalue['minvalue']."
".JText::_('EA_SRCH_PRICE_TO')."".$maximvalue['maxvalue']."
"; } //ea_l_srch = Enable Location Search //ea_loc_srchtype //1= step by step //0=free //----------------------------------------------------------------------------------------------------------------------------------------- ?> ea_l_srch) { ?>
ea_loc_srchtype==0) echo "".JText::_('EA_SRCH_STEP')." 1: ";?> ea_loc_srchtype==0){ $countrys['src_country'] = JHTML::_('select.genericlist', $countrylist,'src_country',' class="inputbox" style="width:140px" onChange="setStates(this.selectedIndex-1)"', 'value', 'text','0' ); }else{ $countrys['src_country'] = JHTML::_('select.genericlist', $countrylist,'src_country',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?>
ea_loc_srchtype==0) echo "".JText::_('EA_SRCH_STEP')." 2: ";?> ea_loc_srchtype==0){ $thestates['src_state'] = JHTML::_('select.genericlist', $statelist,'src_state',' class="inputbox" style="width:140px" onChange="setTowns(this.selectedIndex-1)"', 'value', 'text','0' ); }else{ $thestates['src_state'] = JHTML::_('select.genericlist', $statelist,'src_state',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?>
ea_loc_srchtype==0) echo "".JText::_('EA_SRCH_STEP')." 3: ";?> ea_loc_srchtype==0){ $towns['src_town'] = JHTML::_('select.genericlist', $townlist,'src_town',' class="inputbox" style="width:140px" onChange="setDistricts(this.selectedIndex-1)"', 'value', 'text','0' ); }else{ $towns['src_town'] = JHTML::_('select.genericlist', $townlist,'src_town',' class="inputbox" style="width:140px" ', 'value', 'text','0' ); } ?>
ea_loc_srchtype==0) echo "".JText::_('EA_SRCH_STEP')." 4: ";?>
ea_d_srch) { ?>
   
addCustomTag( ""); ?>
0){ echo HTML_frontend_estateagent::OrderingBar($act,0,$pageNav);?> id) {?> enqueueMessage(JText::_('EA_PROPERTIES INTO YOUR SHORTLIST') .": ". $pageNav->total); echo"
".$pageNav->getResultsCounter()."
"; } else { $mainframe->enqueueMessage(JText::_('EA_SRCH_RESULTS1') ." ". $pageNav->total . " ".JText::_('EA_SRCH_RESULTS2')); echo"
".$pageNav->getResultsCounter()."
"; } $line=1; $total=count($results); foreach($results as $obj) { HTML_frontend_estateagent::show_Object_short($obj, 1, $line, $total); $line++; } } else{ if($act=="shortlist"){ echo "

"; echo JText::_('EA_NO PROPERTIES INTO SHORTLIST')."
"; echo"".JText::_('Go Back').""; echo "
"; } else { echo "

"; echo JText::_('EA_SRCH_NORESULT')."
"; echo"".JText::_('Go Back').""; echo "
"; } }?>
getPagesLinks();?>
getPagesCounter();?>