Beispiel #1
0
                if (($menu->getActive() == $menu->getDefault() and $status > 0 and intval($_GET['sr']) >= 0) || $menu->getActive()->alias == 'all-reports' || $menu->getActive()->alias == 'submit-a-ticket' || $menu->getActive()->alias == 'resources' && $userstate) {
                    $menuTitle = $menu->getActive()->title;
                    if ($menuTitle == 'Start') {
                        if (intval($_GET['sr']) == 0) {
                            ?>
          <li class="<?php 
                            echo $menuTitle == 'Start' ? 'active' : '';
                            ?>
" itemprop="name">
            <i class="clock-icon"></i>
            <input data-toggle="tab" id="report-name" class="name-report" type="text" value = "Name of the Report"></input>
          </li>
          <?php 
                        } else {
                            $report = profilef::profilegetsearch(intval($_GET['sr']));
                            $reportName = profilef::hte($report['reference']);
                            ?>
          <li class="active"><i class="clock-icon"></i><a href=""><?php 
                            echo $reportName;
                            ?>
</a></li>
          <?php 
                        }
                    }
                    ?>
          <li class="<?php 
                    echo $menuTitle == 'REPORT HISTORY' ? 'active' : '';
                    ?>
">
          <?php 
                    if ($menu->getActive()->alias != 'start') {
Beispiel #2
0
 public function profilegetdata($stateid = 0, $councilid = 0, $schemeid = 0, $zoneid = 0, $overlayids = array(), $precinctid = 0)
 {
     $stateid = intval($stateid);
     $councilid = intval($councilid);
     $schemeid = intval($schemeid);
     $zoneid = intval($zoneid);
     $overlayidsnew = array();
     if (!is_array($overlayids)) {
         $overlayids = explode(',', $overlayids);
     }
     $hz = false;
     foreach ($overlayids as $overlayid) {
         $overlayid = intval($overlayid);
         if ($overlayid == 0) {
             if (!$hz) {
                 $hz = true;
             }
         }
         $overlayidsnew[] = $overlayid;
     }
     if ($hz) {
         $overlayidsnew = array();
     }
     unset($overlayids);
     $precinctid = intval($precinctid);
     $data = array();
     if ($councilid > 0) {
         $data['council'] = profilef::profilegetname($councilid);
     }
     if ($schemeid > 0) {
         $data['scheme'] = profilef::profilegetname($schemeid);
     }
     $data['muddefinition'] = '';
     $data['muddisclaimer'] = '';
     $md = profilef::profilegetmuddefinition($stateid);
     if (!empty($md[0])) {
         $data['muddefinition'] = $md[0];
         $data['muddisclaimer'] = $md[1];
     }
     $md = profilef::profilegetmuddefinition($councilid);
     if (!empty($md[0])) {
         $data['muddefinition'] = $md[0];
         $data['muddisclaimer'] = $md[1];
     }
     $md = profilef::profilegetmuddefinition($schemeid);
     if (!empty($md[0])) {
         $data['muddefinition'] = $md[0];
         $data['muddisclaimer'] = $md[1];
     }
     if (empty($data['muddefinition'])) {
         $data['muddefinition'] = '';
         $data['muddisclaimer'] = '';
     }
     $numfields = array('maxcover', 'maxdensity', 'maxstorey', 'min', 'minfrontage', 'minmultiple', 'minmultiplefrontage', 'maxheight', 'maxgfa');
     $generaltextfields = array('mudsetback', 'housesetback', 'smalllotsetback', 'secondarysetback');
     foreach ($generaltextfields as $textfield) {
         $overlaydata['field_' . $textfield] = '';
         $data[$textfield] = '';
         $data[$textfield . 'fromzone'] = false;
         $data[$textfield . 'fromplan'] = false;
         $data[$textfield . 'fromoverlay'] = false;
     }
     foreach ($numfields as $fieldname) {
         $overlaydata['field_' . $fieldname] = NULL;
         $data[$fieldname] = NULL;
     }
     $overlaydata['field_heightinfo'] = '';
     $overlaydata['field_lotinfo'] = '';
     $overlaydata['field_lotmultipleinfo'] = '';
     $overlaydata['field_gfainfo'] = '';
     $overlaydata['field_densityinfo'] = '';
     $overlaydata['field_coverinfo'] = '';
     $overlaydata['field_storeyinfo'] = '';
     $overlaydata['field_frontagelotinfo'] = '';
     $overlaydata['field_frontagelotmultipleinfo'] = '';
     $data['heightinfo'] = '';
     $data['lotinfo'] = '';
     $data['lotmultipleinfo'] = '';
     $data['gfainfo'] = '';
     $data['densityinfo'] = '';
     $data['coverinfo'] = '';
     $data['maxheightfromzone'] = false;
     $data['minfromzone'] = false;
     $data['minmultiplefromzone'] = false;
     $data['maxgfafromzone'] = false;
     $data['maxdensityfromzone'] = false;
     $data['maxcoverfromzone'] = false;
     if ($zoneid > 0) {
         $zonefields = profilef::profilegetdetailfields($zoneid);
         $data['zone'] = $zonefields['field_name'];
         profilef::profilegroupoverride($data, $zonefields, array('maxheight', 'maxstorey'), 'heightinfo', 'maxheightfromzone');
         profilef::profilegroupoverride($data, $zonefields, array('min', 'minfrontage'), 'lotinfo', 'minfromzone');
         profilef::profilegroupoverride($data, $zonefields, array('minmultiple', 'minmultiplefrontage'), 'lotmultipleinfo', 'minmultiplefromzone');
         profilef::profilegroupoverride($data, $zonefields, 'maxgfa', 'gfainfo', 'maxgfafromzone');
         profilef::profilegroupoverride($data, $zonefields, 'maxdensity', 'densityinfo', 'maxdensityfromzone');
         profilef::profilegroupoverride($data, $zonefields, 'maxcover', 'coverinfo', 'maxcoverfromzone');
         foreach ($generaltextfields as $textfield) {
             if (isset($zonefields['field_' . $textfield])) {
                 $text = trim($zonefields['field_' . $textfield]);
                 if (!empty($text)) {
                     $data[$textfield] = $text;
                     $data[$textfield . 'fromzone'] = true;
                 }
             }
         }
     }
     $data['maxheightfromplan'] = false;
     $data['minfromplan'] = false;
     $data['minmultiplefromplan'] = false;
     $data['maxgfafromplan'] = false;
     $data['maxdensityfromplan'] = false;
     $data['maxcoverfromplan'] = false;
     $data['maxheightfromoverlay'] = false;
     $data['minfromoverlay'] = false;
     $data['minmultiplefromoverlay'] = false;
     $data['maxgfafromoverlay'] = false;
     $data['maxdensityfromoverlay'] = false;
     $data['maxcoverfromoverlay'] = false;
     if ($precinctid > 0) {
         $precinctfields = profilef::profilegetdetailfields($precinctid);
         $data['precinct'] = $precinctfields['field_name'];
         profilef::profilegroupoverride($data, $precinctfields, array('maxheight', 'maxstorey'), 'heightinfo', 'maxheightfromplan', 'maxheightfromzone');
         profilef::profilegroupoverride($data, $precinctfields, array('min', 'minfrontage'), 'lotinfo', 'minfromplan', 'minfromzone');
         profilef::profilegroupoverride($data, $precinctfields, array('minmultiple', 'minmultiplefrontage'), 'lotmultipleinfo', 'minmultiplefromplan', 'minmultiplefromzone');
         profilef::profilegroupoverride($data, $precinctfields, 'maxgfa', 'gfainfo', 'maxgfafromplan', 'maxgfafromzone');
         profilef::profilegroupoverride($data, $precinctfields, 'maxdensity', 'densityinfo', 'maxdensityfromplan', 'maxdensityfromzone');
         profilef::profilegroupoverride($data, $precinctfields, 'maxcover', 'coverinfo', 'maxcoverfromplan', 'maxcoverfromzone');
         foreach ($generaltextfields as $textfield) {
             if (isset($precinctfields['field_' . $textfield])) {
                 $text = trim($precinctfields['field_' . $textfield]);
                 if (!empty($text)) {
                     $data[$textfield] = $text;
                     $data[$textfield . 'fromzone'] = false;
                     $data[$textfield . 'fromplan'] = true;
                 }
             }
         }
     }
     $data['overlays'] = array();
     $orphantext = array();
     if (!empty($overlayidsnew)) {
         $mergekeys = array(array('heightinfo', 'storeyinfo'), array('lotinfo', 'frontagelotinfo'), array('lotmultipleinfo', 'frontagelotmultipleinfo'));
         foreach ($overlayidsnew as $overlayid) {
             $overlayfields = profilef::profilegetdetailfields($overlayid);
             $overlayname = $overlayfields['field_name'];
             $data['overlays'][] = array($overlayname, $overlayfields['field_overlayinfo']);
             foreach ($mergekeys as $mergekeyspair) {
                 $overlayfields['field_' . $mergekeyspair[1]] = $overlayfields['field_' . $mergekeyspair[0]];
             }
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'maxheight', true, 'heightinfo');
             //,'maxstorey'
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'min', false, 'lotinfo');
             //,'minfrontage'
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'minmultiple', false, 'lotmultipleinfo');
             //,'minmultiplefrontage'
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'maxstorey', true, 'storeyinfo');
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'minfrontage', false, 'frontagelotinfo');
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'minmultiplefrontage', false, 'frontagelotmultipleinfo');
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'maxgfa', true, 'gfainfo');
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'maxdensity', true, 'densityinfo');
             profilef::profilegroupoverlayoverride($overlaydata, $overlayfields, $orphantext, 'maxcover', true, 'coverinfo');
             foreach ($mergekeys as $mergekeyspair) {
                 $test = trim($overlaydata['field_' . $mergekeyspair[0]]);
                 if (empty($test)) {
                     $test = trim($overlaydata['field_' . $mergekeyspair[1]]);
                     if (!empty($test)) {
                         $overlaydata['field_' . $mergekeyspair[0]] = $test;
                     }
                 }
                 unset($overlaydata['field_' . $mergekeyspair[1]]);
             }
             foreach ($generaltextfields as $textfield) {
                 if (isset($overlayfields['field_' . $textfield])) {
                     $text = trim($overlayfields['field_' . $textfield]);
                     if (!empty($text)) {
                         $texttest = trim($overlaydata['field_' . $textfield] . '');
                         if (!empty($texttest)) {
                             $overlaydata['field_' . $textfield] .= "\n\n" . $text;
                         } else {
                             $overlaydata['field_' . $textfield] = $text;
                         }
                     }
                 }
             }
             //$primarynumfield,$ismax=false,$textfields=array(),$numfields=array(),$setfields=array(),$clearfields=array()
             /*profilef::profilegroupoverlayoverride($data,$overlayfields,'maxheight',true,'heightinfo','maxstorey','maxheightfromoverlay',array('maxheightfromplan','maxheightfromzone'));
             		profilef::profilegroupoverlayoverride($data,$overlayfields,'min',false,'lotinfo','minfrontage','minfromoverlay',array('minfromplan','minfromzone'));
             		profilef::profilegroupoverlayoverride($data,$overlayfields,'minmultiple',false,'lotmultipleinfo','minmultiplefrontage','minmultiplefromoverlay',array('minmultiplefromplan','minmultiplefromzone'));
             		profilef::profilegroupoverlayoverride($data,$overlayfields,'maxgfa',true,'gfainfo','maxgfafromoverlay',array('maxgfafromplan','maxgfafromzone'));
             		profilef::profilegroupoverlayoverride($data,$overlayfields,'maxdensity',true,'densityinfo','maxdensityfromoverlay',array('maxdensityfromplan','maxdensityfromzone'));
             		profilef::profilegroupoverlayoverride($data,$overlayfields,'maxcover',true,'coverinfo','maxcoverfromoverlay',array('maxcoverfromplan','maxcoverfromzone'));
             		foreach($generaltextfields as $textfield) {
             			if(isset($overlayfields['field_'.$textfield])) {
             				$text=trim($overlayfields['field_'.$textfield]);
             				if(!empty($text)) {
             					$data[$textfield]=$text;
             					$data[$textfield.'fromzone']=false;
             					$data[$textfield.'fromplan']=false;
             					$data[$textfield.'fromoverlay']=true;
             				}
             			}
             		}*/
         }
         foreach ($mergekeys as $mergekeyspair) {
             if (isset($orphantext[$mergekeyspair[1]])) {
                 $test = trim($orphantext[$mergekeyspair[0]]);
                 if (empty($test)) {
                     $test = trim($orphantext[$mergekeyspair[1]]);
                     if (!empty($test)) {
                         $orphantext[$mergekeyspair[0]] = $test;
                     }
                 }
                 unset($orphantext[$mergekeyspair[1]]);
             }
         }
         $basictextf = array('heightinfo', 'lotinfo', 'lotmultipleinfo', 'gfainfo', 'densityinfo', 'coverinfo');
         foreach ($basictextf as $textfield) {
             if (isset($orphantext[$textfield])) {
                 $test = trim($overlaydata['field_' . $textfield]);
                 if (empty($test)) {
                     $overlaydata['field_' . $textfield] = $orphantext[$textfield];
                 }
             }
         }
         //foreach
         profilef::profilegroupoverride($data, $overlaydata, array('maxheight', 'maxstorey'), 'heightinfo', 'maxheightfromoverlay', array('maxheightfromplan', 'maxheightfromzone'));
         profilef::profilegroupoverride($data, $overlaydata, array('min', 'minfrontage'), 'lotinfo', 'minfromoverlay', array('minfromplan', 'minfromzone'));
         profilef::profilegroupoverride($data, $overlaydata, array('minmultiple', 'minmultiplefrontage'), 'lotmultipleinfo', 'minmultiplefromoverlay', array('minmultiplefromplan', 'minmultiplefromzone'));
         profilef::profilegroupoverride($data, $overlaydata, 'maxgfa', 'gfainfo', 'maxgfafromoverlay', array('maxgfafromplan', 'maxgfafromzone'));
         profilef::profilegroupoverride($data, $overlaydata, 'maxdensity', 'densityinfo', 'maxdensityfromoverlay', array('maxdensityfromplan', 'maxdensityfromzone'));
         profilef::profilegroupoverride($data, $overlaydata, 'maxcover', 'coverinfo', 'maxcoverfromoverlay', array('maxcoverfromplan', 'maxcoverfromzone'));
         foreach ($generaltextfields as $textfield) {
             if (isset($overlaydata['field_' . $textfield])) {
                 $text = trim($overlaydata['field_' . $textfield]);
                 if (!empty($text)) {
                     $data[$textfield] = $text;
                     $data[$textfield . 'fromzone'] = false;
                     $data[$textfield . 'fromplan'] = false;
                     $data[$textfield . 'fromoverlay'] = true;
                 }
             }
         }
     }
     //echo '<!-- '.str_replace('-->','- - >',print_r($overlayidsnew,true).print_r($overlayfields,true)).$overlayid.' -->';
     return $data;
 }
Beispiel #3
0
                    $ih = true;
                }
            }
            $isprofile = false;
            $isuser = false;
            if (intval($user->id) > 0) {
                $isuser = true;
            }
            if ($isuser) {
                include dirname(__FILE__) . '/profilef.php';
                if ($ih) {
                    $content = profilef::profilegetoutput();
                    $isprofile = true;
                } else {
                    if ($alias == 'past-searches') {
                        $content = profilef::profilegetpastsearchesoutput();
                    }
                }
            }
            JHTML::_('behavior.framework', true);
            /* The following line gets the application object for things like displaying the site name */
            $app = JFactory::getApplication();
            $tplparams = $app->getTemplate(true)->params;
            $hasl = $this->countModules('left') ? true : false;
            $hasr = $this->countModules('right') ? true : false;
            ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
            echo $this->language;
            ?>
" lang="<?php