diff --git a/estate_defs.php b/estate_defs.php
index 6bb57f9..71c60ac 100644
--- a/estate_defs.php
+++ b/estate_defs.php
@@ -19,9 +19,10 @@
define("EST_HOAFREQ", $EST_HOAFREQ);
define("EST_CURSYMB", $EST_CURSYMB);
-define("EST_CONTKEYS",array(EST_GEN_MOBILE,EST_GEN_EMAIL,EST_GEN_OFFICE,EST_GEN_FAX,EST_GEN_WEBSITE,EST_GEN_LINKIN,EST_GEN_TWITER,EST_GEN_FACEBOOK));
-define("EST_LEVMAP",array(0=>array('estate_subdiv','subd_idx'),1=>array('estate_properties','prop_idx'),2=>array('estate_spaces','space_idx'),3=>array('estate_city','city_idx'),4=>array('estate_subdiv_spaces','subspace_idx')));
define("EST_MSGTYPES",array('',EST_MSG_SHOWINGREQUESTS,EST_MSG_OFFERS,EST_MSG_QUOTEREQ,EST_MSG_OTHERQUESTIONS));
+define("EST_CONTKEYS",array(EST_GEN_MOBILE,EST_GEN_EMAIL,EST_GEN_OFFICE,EST_GEN_FAX,EST_GEN_WEBSITE,EST_GEN_LINKIN,EST_GEN_TWITER,EST_GEN_FACEBOOK));
+
+define("EST_LEVMAP",array(0=>array('estate_subdiv','subd_idx'),1=>array('estate_properties','prop_idx'),2=>array('estate_spaces','space_idx'),3=>array('estate_subdiv_spaces','space_idx'),4=>array('estate_subdiv_spaces','space_idx')));
$EST_LEASEDUR = array(EST_GEN_NOLEASE);
for($i = 1; $i <= 6; $i++){array_push($EST_LEASEDUR,$i." ".EST_GEN_MONTH);}
@@ -58,24 +59,122 @@
);
define("EST_IMGTYPES",array(".jpg",".jpeg",".gif",".png"));
+
define("EST_PTH_ADMIN", e_PLUGIN."estate/admin_config.php");
define("EST_PTH_LISTINGS", e_PLUGIN."estate/listings.php");
define("EST_PTH_AVATAR", e_MEDIA."avatars/upload/");
+define("EST_PTH_MEDIA", e_PLUGIN."estate/media/");
+
define("EST_PTHABS_AVATAR", SITEURLBASE.e_MEDIA_ABS."avatars/upload/");
+
define("EST_PATHABS", SITEURLBASE.e_PLUGIN_ABS."estate/");
define("EST_PATHABS_LISTINGS", EST_PATHABS."listings.php");
-define("EST_PATHABS_MEDIA", EST_PATHABS."media/");
define("EST_PATHABS_IMAGES", EST_PATHABS."images/");
+
+define("EST_PATHABS_MEDIA", EST_PATHABS."media/");
define("EST_PTHABS_AGENCY", EST_PATHABS_MEDIA."agency/");
define("EST_PTHABS_AGENT", EST_PATHABS_MEDIA."agent/");
+
+define("EST_PTHABS_CITYTHM", EST_PATHABS_MEDIA."city/thm/");
+define("EST_PTHABS_CITYFULL", EST_PATHABS_MEDIA."city/full/");
+define("EST_PTHABS_CITYVID", EST_PATHABS_MEDIA."city/vid/");
+
define("EST_PTHABS_PROPTHM", EST_PATHABS_MEDIA."prop/thm/");
define("EST_PTHABS_PROPFULL", EST_PATHABS_MEDIA."prop/full/");
define("EST_PTHABS_PROPVID", EST_PATHABS_MEDIA."prop/vid/");
+
define("EST_PTHABS_SUBDTHM", EST_PATHABS_MEDIA."subdiv/thm/");
define("EST_PTHABS_SUBDFULL", EST_PATHABS_MEDIA."subdiv/full/");
define("EST_PTHABS_SUBDVID", EST_PATHABS_MEDIA."subdiv/vid/");
+
+
+
+
+if(EST_USERPERM == 4){
+ $sdir = array('/full','/thm','/vid');
+ $dirs = array('agency'=>0,'agent'=>0,'city'=>$sdir,'prop'=>$sdir,'subdiv'=>$sdir);
+ foreach($dirs as $k=>$v){
+ $ok = estDirChk($k,'',EST_PTH_MEDIA,EST_PATHABS_MEDIA);
+ if($ok[0] < 2){$tst .= '
- '.$SLIDESHOW.'
-
-
'.$tp->toHTML($subd_name,true).'
-
'.EST_GEN_SUBDIVTYPE[$subd_type].'
- '.$SUBDWEB.'
- '.(trim($subd_description) !== '' ? '
'.$tp->toHTML($subd_description,true).'
' : '').'
-
';
- }
-
- else{
- $txt = '
-
-
'.$tp->toHTML($subd_name,true).'
- '.$SLIDESHOW.'
-
-
'.EST_GEN_SUBDIVTYPE[$subd_type].'
- '.$SUBDWEB.'
- '.(trim($subd_description) !== '' ? '
'.$tp->toHTML($subd_description,true).'
' : '').'
-
';
+ if(!is_dir($reldir)){
+ if(mkdir($reldir, 0755, true)){$ok++;}
+ else{return array(1,'Failed to make "'.$reldir.'" ');}
}
+ clearstatcache();
-
- if($subd_hoaappr == 1 || $subd_hoareq == 1 || intval($subd_hoafee) > 0){
- $txt .= '
-
-
'.$tp->toHTML((trim($subd_hoaname) !== '' ? $subd_hoaname : $subd_name),true).' '.EST_GEN_HOMEOWNASS.'
- '.($HOAWEB ? $HOAWEB : ($SUBDWEB ? $SUBDWEB : '')).'
-
'.EST_GEN_HOADEF1.'
-
- - '.($subd_hoareq == 1 ? EST_GEN_HOAREQ1 : EST_GEN_HOAREQ2).'
- '.($subd_hoafee > 0 ? '- '.EST_PROP_HOAFEES.': '.$subd_hoafee.' '.($subd_hoafrq > 0 ? EST_HOAFREQ[$subd_hoafrq] : '').'²
' : '').'
- '.($subd_hoaappr == 1 ? '- '.EST_GEN_HOAAPPR2.'³
' : '').'
-
-
';
+ if($ok > 1){
+ if(!is_writable($reldir)){
+ @chmod($reldir, 0755);
+ $ok++;
}
+ clearstatcache();
-
- $txt .= '
-
-
';
-
- $txt .= '
-
';
-
- //$EST_HOAREQD[$subd_hoareq]
- //EST_HOAFREQ
- unset($SLIDESHOW,$SUBDWEB,$HOAWEB,$CSSTOP);
- return $txt;
+ if(!file_exists($reldir.'/index.html')){
+ $file = fopen($reldir."/index.html","w");
+ fwrite($file,"Hello World.");
+ fclose($file);
+ $ok++;
+ }
+ clearstatcache();
+ }
+ return array($ok,'');
+ }
+
+function estSubDivisionView($subd_idx,$mode=0){
+ return (ADMIN ? '
Not Used
' : '');
+ }
+
+
+function estImgPaths($dta){
+ switch(intval($dta['v'])){
+ case 3 :
+ return [EST_PTHABS_CITYTHM.$dta['t'],EST_PTHABS_CITYFULL.$dta['f']];
+ break;
+ case 2 :
+ case 1 :
+ return [EST_PTHABS_PROPTHM.$dta['t'],EST_PTHABS_PROPFULL.$dta['f']];
+ break;
+ default :
+ return [EST_PTHABS_SUBDTHM.$dta['t'],EST_PTHABS_SUBDFULL.$dta['f']];
+ break;
+ }
}
function estViewImgCSS($cssName,$gal,$loc=1){
$EST_PREF = e107::pref('estate');
- $actv = $EST_PREF['slideshow_act'];
- $stime = intval($EST_PREF['slideshow_time']) * $loc;
- $sdelay = $EST_PREF['slideshow_delay'];
- $CSS = array();
$galCt = (is_array($gal) ? count($gal) : 0);
+
+ $CSS = array();
if($galCt == 0){
$CSS[0] = ' '.$cssName.'{background-image: url("'.EST_PATHABS_IMAGES.'imgnotavail.png");}';
$CSS[1] .= '
';
}
else{
- $sdelay = intval($sdelay);
- $iStep = round(99 / $galCt, 2);
- $imgpth = ($loc == 2 ? EST_PTHABS_SUBDTHM : EST_PTHABS_PROPTHM);
- $imgpthfull = ($loc == 2 ? EST_PTHABS_SUBDFULL : EST_PTHABS_PROPFULL);
$g1 = (!isset($gal[1]) && isset($gal[0]) ? 0 : 1);
- $CSS[0] = '';
- $URLIST = 'url(\''.$imgpth.$gal[$g1]['t'].'\')';
+ $stime = intval($EST_PREF['slideshow_time']);
+ $actv = $EST_PREF['slideshow_act'];
+ $sdelay = intval($EST_PREF['slideshow_delay']);
+ $iStep = round(99 / $galCt, 2);
+ $pths = estImgPaths($gal[$g1]);
+ $CSS[0] = '';
+ $URLIST = 'url(\''.$pths[0].'\')';
if(intval($actv) == 1 && $galCt > 1){
$aniName = str_replace('.','',str_replace('#','',$cssName));
@@ -618,11 +685,16 @@ function estViewImgCSS($cssName,$gal,$loc=1){
$fi = 0;
foreach($gal as $ik=>$idta){
$fi++;
- if($fi > $g1){$URLIST .= ',url(\''.$imgpth.$idta['t'].'\')';}
- $CSS[1] .= '
-
';
+ $pths = estImgPaths($idta);
+
+ if($fi > $g1){$URLIST .= ',url(\''.$pths[0].'\')';}
+ if($idta['v'] == 1 || $idta['v'] == 2){
+ $CSS[1] .= '
+
';
+ }
+
$CSS[2][$ik] = $idta['t'];
- $galCSS .= $iPct.'%'.($fi == 1 ? ', 100%' : '').' {background-image: url("'.$imgpth.$idta['t'].'");}
+ $galCSS .= $iPct.'%'.($fi == 1 ? ', 100%' : '').' {background-image: url("'.$pths[0].'");}
';
$iPct = ($iStep + $iPct);
}
@@ -644,8 +716,10 @@ function estViewImgCSS($cssName,$gal,$loc=1){
'.$galCSS.'}';
}
elseif($galCt == 1){
- $CSS[1] .= '
-
';
+ if($gal[$g1]['v'] == 1 || $gal[$g1]['v'] == 2){
+ $CSS[1] .= '
+
';
+ }
}
$CSS[0] .= '
'.$cssName.'{
diff --git a/estate_shortcodes.php b/estate_shortcodes.php
index 7d97b7f..8f4a3b3 100644
--- a/estate_shortcodes.php
+++ b/estate_shortcodes.php
@@ -142,7 +142,13 @@ function sc_prop_map_agydta($parm){
else{return '';}
}
-
+ //PROP_THMSTY
+ function sc_prop_subdivname($parm){
+ if(trim($this->var['subd_name']) !== ""){
+ return e107::getParser()->toHTML(''.$this->var['subd_name'].'');
+ }
+ }
+
function sc_prop_modelname($parm){
if(trim($this->var['prop_modelname']) !== ""){return '"'.e107::getParser()->toHTML($this->var['prop_modelname']).'"';}
}
@@ -233,12 +239,7 @@ function sc_prop_citystate($parm){
return $tp->toHTML($this->var['city_name']).(trim($this->var['state_init']) ? ', '.$this->var['state_init'] : '');
}
- function sc_prop_subdivname($parm){
- if(intval($this->var['prop_subdiv']) > 0){
- $ret = '
'.e107::getParser()->toHTML($GLOBALS['EST_SUBDIV'][$this->var['prop_subdiv']]['subd_name']).'';
- }
- return $ret;
- }
+
function sc_prop_thmsty($parm){
if(trim($this->var['img'][1]['t']) !== ''){
@@ -532,49 +533,288 @@ function sc_view_spaces($parm){
+ function sc_prop_hoadisclaimers($parm){
+ $tp = e107::getParser();
+ $subapr = intval($this->var['subdiv']['subd_hoaappr']);
+ $subreq = intval($this->var['subdiv']['subd_hoareq']);
+ $subfee = intval($this->var['subdiv']['subd_hoafee']);
+ $subfrq = intval($this->var['subdiv']['subd_hoafrq']);
+ $sublnd = intval($this->var['subdiv']['subd_hoaland']);
+
+ $hoaapr = intval($this->var['prop_hoaappr']);
+ $hoareq = intval($this->var['prop_hoareq']);
+ $hoafee = intval($this->var['prop_hoafee']);
+ $hoafrq = intval($this->var['prop_hoafrq']);
+ $hoalnd = intval($this->var['prop_hoaland']);
+
+ $liarr = array();
+ if($hoaapr == 1 || $hoareq > 0|| $hoafee > 0 || $hoalnd > 0){array_push($liarr,'¹'.EST_PROP_HOADISCLAIMER);}
+ if($subfee > 0 || $hoafee > 0){array_push($liarr,'²'.EST_PROP_HOADISCLAIMER1.' '.EST_PROP_HOADISCLAIMER0.' '.EST_PROP_HOADISCLAIMER2);}
+ if($subapr == 1 || $hoaapr == 1){array_push($liarr,'³'.EST_PROP_HOADISCLAIMER3.' '.EST_PROP_HOADISCLAIMER0);}
+
+ if(intval($this->var['prop_landfee']) > 0){
+ array_push($liarr,'⁴'.EST_PROP_HOADISCLAIMER4);
+ }
+
+ if(count($liarr) > 0){
+ $txt = '
';
+ foreach($liarr as $k=>$v){$txt .= '
'.$tp->toHTML($v).'
';}
+ $txt .= '
';
+
+ return $txt;
+ }
+
+ if($this->var['prop_hoareq'] == 1 || $this->var['subd_hoaappr'] == 1 || $this->var['subd_hoareq'] == 1){
+
+ }
+ unset($subapr,$subreq,$subfee,$subfrq,$sublnd,$hoaapr,$hoareq,$hoafee,$hoafrq,$hoalnd);
+ }
+
+
+
+
+
+
+
function sc_prop_hoa($parm){
$tp = e107::getParser();
- if($this->var['prop_hoaappr'] == 1 || $this->var['prop_hoareq'] == 1 || intval($this->var['prop_hoafee']) > 0){
+ $subapr = intval($this->var['subdiv']['subd_hoaappr']);
+ $subreq = intval($this->var['subdiv']['subd_hoareq']);
+ $subfee = intval($this->var['subdiv']['subd_hoafee']);
+ $subfrq = intval($this->var['subdiv']['subd_hoafrq']);
+ $sublnd = intval($this->var['subdiv']['subd_hoaland']);
+
+ $hoaapr = intval($this->var['prop_hoaappr']);
+ $hoareq = intval($this->var['prop_hoareq']);
+ $hoafee = intval($this->var['prop_hoafee']);
+ $hoafrq = intval($this->var['prop_hoafrq']);
+ $hoalnd = intval($this->var['prop_hoaland']);
+
+ $liarr = array();
+
+ if($subapr !== 1 && $hoaapr == 1){
+ $liarr[0] = '
'.EST_GEN_HOAAPPR2.'³';
+ }
+
+
+ if($hoareq !== $subreq){
+ if($hoareq == 1){$liarr[1] = EST_GEN_HOAREQ1;}
+ else{$liarr[1] = EST_GEN_HOAREQ2;}
+ }
+
+
+ if($hoafee !== $subfee){
+ if($hoafee > 0){
+ $liarr[2] = '
'.EST_PROP_HOAFEES.': '.$hoafee.($hoafrq > 0 ? ' '.EST_HOAFREQ[$hoafrq] : '').($hoalnd == 1 ? ' '.$GLOBALS['EST_HOALAND'][1][$hoalnd] : '').'²';
+ }
+ }
+
+ $landfee = intval($this->var['prop_landfee']);
+ $landfrq = intval($this->var['prop_landfreq']);
+ if($landfee > 0){
+ $liarr[3] = '
'.EST_PROP_LANDLEASE.': '.$landfee.' '.($landfrq > 0 ? ' '.$GLOBALS['EST_HOAFREQ'][$landfrq] : '').'⁴';
+ }
+
+
+ if(count($liarr) > 0){
$txt = '
-
'.EST_GEN_HOADEF2.'¹
-
- '.($this->var['prop_hoareq'] == 1 ? '- '.EST_GEN_HOAREQ1.'
' : EST_GEN_HOAREQ2).'
- '.($this->var['prop_hoafee'] > 0 ? '- '.EST_PROP_HOAFEES.': '.$this->var['prop_hoafee'].' '.($this->var['prop_hoafrq'] > 0 ? EST_HOAFREQ[$this->var['prop_hoafrq']] : '').'²
' : '').'
- '.($this->var['prop_hoaappr'] == 1 ? '- '.EST_GEN_HOAAPPR2.'³
' : '').'
-
';
+
+
';
+ foreach($liarr as $k=>$v){$txt .= '- '.$tp->toHTML($v).'
';}
+ $txt .= '
';
}
+
+ unset($subapr,$subreq,$subfee,$subfrq,$sublnd,$hoaapr,$hoareq,$hoafee,$hoafrq,$hoalnd);
return $txt;
}
- function sc_prop_hoadisclaimers($parm){
- $tp = e107::getParser();
- if($this->var['prop_hoaappr'] == 1 || $this->var['prop_hoareq'] == 1 || intval($this->var['prop_hoafee']) > 0 || $this->var['subd_hoaappr'] == 1 || $this->var['subd_hoareq'] == 1 || intval($this->var['subd_hoafee']) > 0){
- return '
-
-
¹'.EST_PROP_HOADISCLAIMER.'
- '.($this->var['prop_hoafee'] > 0 || intval($this->var['subd_hoafee']) > 0 ? '
²'.EST_PROP_HOADISCLAIMER1.' '.EST_PROP_HOADISCLAIMER0.' '.EST_PROP_HOADISCLAIMER2.'
' : '').'
- '.($this->var['prop_hoaappr'] == 1 || $this->var['subd_hoaappr'] == 1 ? '
³'.EST_PROP_HOADISCLAIMER3.' '.EST_PROP_HOADISCLAIMER0.'
' : '').'
-
';
+
+
+
+
+
+
+
+
+
+
+ function sc_community_slideshow($parm){
+ if(isset($this->var['subdiv']['media']) && count($this->var['subdiv']['media']) > 0){
+ return '
';
+ }
+ }
+
+ function sc_comminuty_name($parm){
+ return e107::getParser()->toHTML($this->var['subdiv']['subd_name'],true);
+ }
+
+ function sc_community_url($parm){
+ if(trim($this->var['subdiv']['subd_url']) !== "" && $this->var['subdiv']['subd_url'] !== $this->var['subdiv']['subd_hoaweb']){
+ return e107::getParser()->makeClickable($this->var['subdiv']['subd_url'],'url',array('ext'=>1));
+ }
+ }
+
+ function sc_community_type($parm){
+ return e107::getParser()->toHTML(EST_GEN_SUBDIVTYPE[$this->var['subdiv']['subd_type']]);
+ }
+
+
+ function sc_community_desc($parm){
+ if(trim($this->var['subdiv']['subd_description']) !== ''){
+ return e107::getParser()->toHTML($this->var['subdiv']['subd_description'],true);
+ }
+ }
+
+
+
+ function sc_community_hoa($parm){
+ $tp = e107::getParser();
+
+ $subapr = intval($this->var['subdiv']['subd_hoaappr']);
+ $subreq = intval($this->var['subdiv']['subd_hoareq']);
+ $subfee = intval($this->var['subdiv']['subd_hoafee']);
+ $subfrq = intval($this->var['subdiv']['subd_hoafrq']);
+ $sublnd = intval($this->var['subdiv']['subd_hoaland']);
+
+
+ $liarr = array();
+ if(trim($this->var['subdiv']['subd_hoaweb']) !== "" && $this->var['subdiv']['subd_hoaweb'] == $this->var['subdiv']['subd_url']){
+ $liarr['txt'][0] = '
'.$tp->makeClickable($this->var['subdiv']['subd_hoaweb'],'url',array('ext'=>1)).'
';
}
+
+ if(trim($this->var['subdiv']['subd_hoaname']) !== '' && $this->var['subdiv']['subd_hoaname'] !== $this->var['subdiv']['subd_name']){
+ $liarr['txt'][1] = '
'.$tp->toHTML($this->var['subdiv']['subd_hoaname'],true).' '.EST_GEN_HOMEOWNASS.'
';
+ }
+
+ if(trim($this->var['subdiv']['subd_url']) !== "" && $this->var['subdiv']['subd_url'] !== $this->var['subdiv']['subd_hoaweb']){
+ $liarr['txt'][2] = '
'.$tp->makeClickable($this->var['subdiv']['subd_hoaweb'],'url',array('ext'=>1)).'
';
+ }
+
+ if($subapr == 1 || $subreq == 1 || $subfee > 0){
+ $liarr['ul'][0] = ($subreq == 1 ? EST_GEN_HOAREQ1 : EST_GEN_HOAREQ2);
+ if($subfee > 0){
+ $liarr['ul'][1] = '
'.EST_PROP_HOAFEES.': '.$subfee.($subfrq > 0 ? ' '.EST_HOAFREQ[$subfrq] : '').'²';
+ }
+ if($subapr == 1){
+ $liarr['ul'][2] = '
'.EST_GEN_HOAAPPR2.'³';
+ }
+ }
+
+ if(count($liarr) > 0){
+ $txt = '';//'
'.EST_GEN_HOADEF1.'
';
+ if(isset($liarr['txt']) && count($liarr['txt']) > 0){
+ foreach($liarr['txt'] as $k=>$v){$txt .= $v;}
+ }
+
+ if(isset($liarr['ul']) && count($liarr['ul']) > 0){
+ $txt .= '
';
+ foreach($liarr['ul'] as $k=>$v){$txt .= '- '.$v.'
';}
+ $txt .= '
';
+ }
+ $txt .= '';
+ }
+ return $txt;
+ unset($subapr,$subreq,$subfee,$subfrq,$sublnd,$txt);
}
function sc_prop_community($parm){
if(!isset($this->var['subdiv'])){return '';}
- $tp = e107::getParser();
+ if(!is_array($this->var['subdiv'])){return '';}
+
+ $tp = e107::getParser();
- if($parm['get'] == 'capt'){return $tp->toHTML(EST_GEN_COMMUNITY.': '.$this->var['subdiv']['subd_name']);}
+ if($parm['get'] == 'capt'){
+ if(intval($this->var['subdiv']['subd_idx']) == 0){return'';}
+ return $tp->toHTML(EST_GEN_COMMUNITY.': '.$this->var['subdiv']['subd_name']);
+ }
- return estSubDivisionView($this->var['subdiv'],0);
+
+ //$EST_HOAREQD[$subd_hoareq]
+ //EST_HOAFREQ
+ unset($CSSTOP);
+ return $txt;
}
- function sc_prop_community_sect($parm){
- if(!isset($this->var['subdiv'])){return '';}
- $txt = $this->sc_prop_community($parm);
- return '
'.e107::getRender()->tablerender(EST_GEN_COMMUNITY, $txt, 'community-section',true).'
';
- unset($capt, $txt);
+ function minithumb($v){
+ if(isset($v['media']) && count($v['media']) > 0){
+ $g1 = (!isset($v['media'][1]) && isset($v['media'][0]) ? 0 : 1);
+ $EST_PREF = e107::pref('estate');
+ $galCt = count($v['media']);
+ if(intval($EST_PREF['slideshow_act']) == 1 && $galCt > 1){
+ $cssName = 'estMiniThumb-'.intval($v['media'][$g1]['p']).'-'.intval($v['media'][$g1]['v']).'-'.intval($v['media'][$g1]['l']).'-img';
+ $stime = intval($EST_PREF['slideshow_time']);
+ $sdelay = intval($EST_PREF['slideshow_delay']);
+ if($sdelay == 0){$sdelay = ($galCt > 7 ? ceil($galCt / 2) : 4);}
+
+ $iStep = round(99 / $galCt, 2);
+ $iPct = 0;
+ foreach($v['media'] as $mk=>$mv){
+ $pth = estImgPaths($mv);
+ if($mk == 0){
+ $urlist = 'url(\''.$pth[0].'\')';
+ $keyframes = '@keyframes '.$cssName.'{
+ 0%, 100% {background-image: url("'.$pth[0].'");}
+ ';
+ }
+ else{
+ $urlist .= ',url(\''.$pth[0].'\')';
+ $keyframes .= $iPct.'% {background-image: url("'.$pth[0].'");}
+ ';
+ }
+
+ $iPct = ($iStep + $iPct);
+ unset($mk,$mv);
+ }
+ return '
+
+
';
+ unset($pth,$cssName,$urlist,$keyframes,$galCt,$sdelay,$stime);
+ }
+ else{
+ $pth = estImgPaths($v['media'][0]);
+ return '
+
';
+ unset($pth,$galCt);
+ }
+ }
+ else{
+ return '
+
';
+ }
+ }
+
+
+ function sc_community_spaces($parm){
+ $tp = e107::getParser();
+ if(isset($this->var['subdiv']['spaces']['subd'])){
+ if(count($this->var['subdiv']['spaces']['subd']) > 0){
+ foreach($this->var['subdiv']['spaces']['subd'] as $k=>$v){
+ $txt .= '
+
+
'.$tp->toHTML($v['space_name'],true).'
';
+ $txt .= $this->minithumb($v);
+ $txt .= '
+
'.$tp->toHTML($v['space_description'],true).'
+
';
+ }
+ return $txt;
+ unset($txt,$k,$v);
+ }
+ }
}
@@ -622,9 +862,10 @@ function sc_spaces_menu($parm){
function sc_prop_newicon(){
- $tp = e107::getParser();
+ //$tp = e107::getParser();
if(EST_USERPERM > 0){
- return '
'.EST_GEN_FULLADDLIST.' '.EST_GEN_QUICKADDLIST.'
';
+ //
'.EST_GEN_FULLADDLIST.' '.EST_GEN_QUICKADDLIST.'
+ return '
';
}
if(intval($GLOBALS['EST_PREF']['public_act']) !== 0 && USERID > 0 && check_class($GLOBALS['EST_PREF']['public_act'])){
return '
';
@@ -757,12 +998,10 @@ function estGetSeller(){
function sc_prop_agentcard($parm){
- //if(defined("ESTAGENTRENDERED")){return '
';}
$tp = e107::getParser();
$EST_PREF = e107::pref('estate');
$AGENT = $this->estGetSeller();
-
if($AGENT['error']){
if(ADMIN){e107::getMessage()->addWarning($AGENT['error']);}
return;
@@ -926,7 +1165,7 @@ function sc_prop_saved_list($parm){
function estPropStat($DTA){
- if(intval($DTA['prop_status']) == 5){$ret = (intval($DTA['prop_listype']) == 0 ? EST_GEN_OFFMARKET : EST_GEN_SOLD);}
+ if(intval($DTA['prop_status']) == 5){$ret = (intval($DTA['prop_listype']) == 0 ? EST_GEN_OFFMARKET : EST_GEN_SOLD);}//'';
elseif(intval($DTA['prop_status']) == 4){$ret = EST_GEN_PENDING; $parm = '';}
elseif(intval($DTA['prop_status']) == 3){$ret = $GLOBALS['EST_LISTTYPE1'][$DTA['prop_listype']]; $parm = '';}
elseif(intval($DTA['prop_status']) == 2){
@@ -949,55 +1188,6 @@ function estPropStat($DTA){
}
- function estPriceDrop($DTA,$MODE){
- if(intval($DTA['prop_listprice']) !== intval($DTA['prop_origprice'])){
- $OPLP = round((1 -(intval($DTA['prop_listprice']) / intval($DTA['prop_origprice']))) * 100, 1);
- if($MODE > 0){
- if($MODE == 1){return $OPLP;}
- }
- else{
- if($OPLP > 0){return '
↓'.$OPLP.'%';} // style="color:#009900"
- else{return'
↑'.$OPLP.'%';} // style="color:#990000"
- }
- }
- }
-
-
- function estPropPrice($DTA,$NOADV=0){
- $tp = e107::getParser();
- $nf = new NumberFormatter('en_US', \NumberFormatter::CURRENCY);
- $nf->setTextAttribute(NumberFormatter::CURRENCY_CODE, 'USD');
- $nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, 0);
- //EST_CURSYMB
-
- $ListPrice = $nf->format($DTA['prop_listprice']).($DTA['prop_listype'] == 0 ? '/'.$GLOBALS['EST_LEASEFREQ'][$DTA['prop_leasefreq']] : '');
- $ListPrice .= $this->estPriceDrop($this->var,0);
-
- if(ADMIN && (intval($DTA['prop_status']) < 2 || intval($DTA['prop_status']) > 4)){
- $ADMVIEW = '
'.$ListPrice.'';
- }
-
- if(intval($DTA['prop_status']) == 5){
- if($ADMVIEW){$ret = $ADMVIEW;}
- }
- elseif(intval($DTA['prop_status']) == 4 || intval($DTA['prop_status']) == 3){
- $ret = $ListPrice;
- }
- elseif(intval($DTA['prop_status']) == 2){
- if(intval($DTA['prop_datelive']) > 0 && intval($DTA['prop_datelive']) <= $GLOBALS['STRTIMENOW']){
- $ret = $ListPrice;
- }
- elseif(USERID > 0 && (intval($DTA['prop_dateprevw']) > 0 && intval($DTA['prop_dateprevw']) <= $GLOBALS['STRTIMENOW'])){
- $ret = ($NOADV == 0 ? $GLOBALS['EST_LISTTYPE1'][$DTA['prop_listype']] : '').' '.$ListPrice;
- }
- elseif($ADMVIEW){$ret = ($NOADV == 0 ? $GLOBALS['EST_LISTTYPE1'][$DTA['prop_listype']] : '').' '.$ADMVIEW;}
- }
- elseif(intval($DTA['prop_status']) == 1){
- if($ADMVIEW){$ret = ($NOADV == 0 ? $GLOBALS['EST_LISTTYPE1'][$DTA['prop_listype']] : '').' '.$ADMVIEW;}
- }
- unset($nf,$ListPrice,$ADMVIEW);
- return $ret;
- }
@@ -1007,7 +1197,7 @@ function sc_prop_status($parm = ''){
function sc_prop_price($parm = ''){
- return $this->estPropPrice($this->var);
+ return estGetListPrice($this->var);//$this->estPropPrice($this->var);
}
diff --git a/estate_sidebar_menu.php b/estate_sidebar_menu.php
index 1f34444..f06c844 100644
--- a/estate_sidebar_menu.php
+++ b/estate_sidebar_menu.php
@@ -10,8 +10,7 @@
if (!defined('e107_INIT')) { exit; }
if (!e107::isInstalled('estate')) { return; }
-if(defined("EST_MENU_RENDERED")){return;}
-
+if(defined("EST_RENDERED_SIDEBARMENU")){return;}
$EST_PREF = e107::pref('estate');
$tp = e107::getParser();
@@ -31,7 +30,7 @@
if(EST_USERPERM == 4){echo '