Ejemplo n.º 1
0
 /**
  * Refresh this MetaControl with Data from the local GrowthGroup object.
  * @param boolean $blnReload reload GrowthGroup from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objGrowthGroup->Reload();
     }
     if ($this->lstGroup) {
         $this->lstGroup->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstGroup->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objGroupArray = Group::LoadAll();
         if ($objGroupArray) {
             foreach ($objGroupArray as $objGroup) {
                 $objListItem = new QListItem($objGroup->__toString(), $objGroup->Id);
                 if ($this->objGrowthGroup->Group && $this->objGrowthGroup->Group->Id == $objGroup->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstGroup->AddItem($objListItem);
             }
         }
     }
     if ($this->lblGroupId) {
         $this->lblGroupId->Text = $this->objGrowthGroup->Group ? $this->objGrowthGroup->Group->__toString() : null;
     }
     if ($this->lstGrowthGroupLocation) {
         $this->lstGrowthGroupLocation->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstGrowthGroupLocation->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objGrowthGroupLocationArray = GrowthGroupLocation::LoadAll();
         if ($objGrowthGroupLocationArray) {
             foreach ($objGrowthGroupLocationArray as $objGrowthGroupLocation) {
                 $objListItem = new QListItem($objGrowthGroupLocation->__toString(), $objGrowthGroupLocation->Id);
                 if ($this->objGrowthGroup->GrowthGroupLocation && $this->objGrowthGroup->GrowthGroupLocation->Id == $objGrowthGroupLocation->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstGrowthGroupLocation->AddItem($objListItem);
             }
         }
     }
     if ($this->lblGrowthGroupLocationId) {
         $this->lblGrowthGroupLocationId->Text = $this->objGrowthGroup->GrowthGroupLocation ? $this->objGrowthGroup->GrowthGroupLocation->__toString() : null;
     }
     if ($this->lstGrowthGroupDayType) {
         $this->lstGrowthGroupDayType->SelectedValue = $this->objGrowthGroup->GrowthGroupDayTypeId;
     }
     if ($this->lblGrowthGroupDayTypeId) {
         $this->lblGrowthGroupDayTypeId->Text = $this->objGrowthGroup->GrowthGroupDayTypeId ? GrowthGroupDayType::$NameArray[$this->objGrowthGroup->GrowthGroupDayTypeId] : null;
     }
     if ($this->txtMeetingBitmap) {
         $this->txtMeetingBitmap->Text = $this->objGrowthGroup->MeetingBitmap;
     }
     if ($this->lblMeetingBitmap) {
         $this->lblMeetingBitmap->Text = $this->objGrowthGroup->MeetingBitmap;
     }
     if ($this->txtStartTime) {
         $this->txtStartTime->Text = $this->objGrowthGroup->StartTime;
     }
     if ($this->lblStartTime) {
         $this->lblStartTime->Text = $this->objGrowthGroup->StartTime;
     }
     if ($this->txtEndTime) {
         $this->txtEndTime->Text = $this->objGrowthGroup->EndTime;
     }
     if ($this->lblEndTime) {
         $this->lblEndTime->Text = $this->objGrowthGroup->EndTime;
     }
     if ($this->txtAddress1) {
         $this->txtAddress1->Text = $this->objGrowthGroup->Address1;
     }
     if ($this->lblAddress1) {
         $this->lblAddress1->Text = $this->objGrowthGroup->Address1;
     }
     if ($this->txtAddress2) {
         $this->txtAddress2->Text = $this->objGrowthGroup->Address2;
     }
     if ($this->lblAddress2) {
         $this->lblAddress2->Text = $this->objGrowthGroup->Address2;
     }
     if ($this->txtCrossStreet1) {
         $this->txtCrossStreet1->Text = $this->objGrowthGroup->CrossStreet1;
     }
     if ($this->lblCrossStreet1) {
         $this->lblCrossStreet1->Text = $this->objGrowthGroup->CrossStreet1;
     }
     if ($this->txtCrossStreet2) {
         $this->txtCrossStreet2->Text = $this->objGrowthGroup->CrossStreet2;
     }
     if ($this->lblCrossStreet2) {
         $this->lblCrossStreet2->Text = $this->objGrowthGroup->CrossStreet2;
     }
     if ($this->txtZipCode) {
         $this->txtZipCode->Text = $this->objGrowthGroup->ZipCode;
     }
     if ($this->lblZipCode) {
         $this->lblZipCode->Text = $this->objGrowthGroup->ZipCode;
     }
     if ($this->txtLongitude) {
         $this->txtLongitude->Text = $this->objGrowthGroup->Longitude;
     }
     if ($this->lblLongitude) {
         $this->lblLongitude->Text = $this->objGrowthGroup->Longitude;
     }
     if ($this->txtLatitude) {
         $this->txtLatitude->Text = $this->objGrowthGroup->Latitude;
     }
     if ($this->lblLatitude) {
         $this->lblLatitude->Text = $this->objGrowthGroup->Latitude;
     }
     if ($this->txtAccuracy) {
         $this->txtAccuracy->Text = $this->objGrowthGroup->Accuracy;
     }
     if ($this->lblAccuracy) {
         $this->lblAccuracy->Text = $this->objGrowthGroup->Accuracy;
     }
     if ($this->txtDescription) {
         $this->txtDescription->Text = $this->objGrowthGroup->Description;
     }
     if ($this->lblDescription) {
         $this->lblDescription->Text = $this->objGrowthGroup->Description;
     }
     if ($this->lstGrowthGroupStructures) {
         $this->lstGrowthGroupStructures->RemoveAllItems();
         $objAssociatedArray = $this->objGrowthGroup->GetGrowthGroupStructureArray();
         $objGrowthGroupStructureArray = GrowthGroupStructure::LoadAll();
         if ($objGrowthGroupStructureArray) {
             foreach ($objGrowthGroupStructureArray as $objGrowthGroupStructure) {
                 $objListItem = new QListItem($objGrowthGroupStructure->__toString(), $objGrowthGroupStructure->Id);
                 foreach ($objAssociatedArray as $objAssociated) {
                     if ($objAssociated->Id == $objGrowthGroupStructure->Id) {
                         $objListItem->Selected = true;
                     }
                 }
                 $this->lstGrowthGroupStructures->AddItem($objListItem);
             }
         }
     }
     if ($this->lblGrowthGroupStructures) {
         $objAssociatedArray = $this->objGrowthGroup->GetGrowthGroupStructureArray();
         $strItems = array();
         foreach ($objAssociatedArray as $objAssociated) {
             $strItems[] = $objAssociated->__toString();
         }
         $this->lblGrowthGroupStructures->Text = implode($strGlue, $strItems);
     }
 }
Ejemplo n.º 2
0
	    	<?php 
    }
}
?>
	  }
	  google.maps.event.addDomListener(window, 'load', initialize);	
</script>
<script type="text/javascript" src="/scripts/growthgroups.js"></script>

<div id="map_canvas" style="width: 980px; height: 400px; border: 1px solid black; float: left; margin-bottom:10px;"></div>

	<h2 style="color:#fffac9; font-size:24px;">Growth Group Regions</h2>
	<div style="background-color: #2F6C61; width: 980px; height: 72px; float:left; box-shadow: 10px 10px 5px #444444;">
		<ul class="mapnav">
		<?php 
foreach (GrowthGroupLocation::LoadAll(QQ::OrderBy(QQN::GrowthGroupLocation()->Id)) as $objLocation) {
    $strStyle = null;
    if ($objLocation->Id == $this->objLocation->Id) {
        $strLocation = QApplication::HtmlEntities($objLocation->Location);
        $strLocation = str_replace(' (', '<br/><span style="font-size: 14px; font-weight: normal; font-family: arial;">(', $strLocation);
        $strLocation = str_replace(')', ')</span>', $strLocation);
        $strLocation = str_replace('including', 'incl.', $strLocation);
        $strLocation = str_replace('to San', 'to<br/>San', $strLocation);
        printf('<li class="selected"%s>%s</li>', $strStyle, $strLocation);
    } else {
        $strLocation = QApplication::HtmlEntities($objLocation->Location);
        if (strpos($strLocation, '(')) {
            $strLocation = str_replace(' (', '</a><br/><span style="font-size: 14px; font-weight: normal; font-family: arial; ">(', $strLocation);
            $strLocation = str_replace(')', ')</span>', $strLocation);
            $strLocation = str_replace('including', 'incl.', $strLocation);
            printf('<li%s><a href="/index.php/%s">%s</li>', $strStyle, $objLocation->Id, $strLocation);