예제 #1
0
 public function toExcelAction()
 {
     $this->filename = 'staffList.xls';
     $this->type = 'Excel5';
     $generic = new GenericProfilesObject();
     $generic->setOrderBy('GP_LastName');
     $profile = new StaffProfilesObject();
     $oAddr = new AddressObject();
     $this->select = $profile->getAll(null, false);
     $this->select->joinLeft($generic->getDataTableName(), $profile->getDataId() . ' = ' . $generic->getDataId(), array('lastName' => 'GP_LastName', 'firstName' => 'GP_FirstName', 'email' => 'GP_Email', 'member_id' => 'GP_MemberID'));
     $this->select->joinLeft($oAddr->getDataTableName(), $oAddr->getDataId() . ' = ' . $profile->getAddressField());
     $this->select->joinLeft($oAddr->getIndexTableName(), $oAddr->getIndexId() . ' = ' . $oAddr->getDataId());
     $this->tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'), 'StaffProfile' => array('SP_GenericProfileId'), 'AddressData' => array('A_CityTextValue'), 'AddressIndex' => array('AI_FirstTel', 'AI_SecondTel'));
     $this->fields = array('firstName' => array('width' => '250px'), 'lastName' => array('width' => '250px'), 'email' => array('width' => '250px'), 'AI_FirstTel' => array('width' => '250px'), 'AI_SecondTel' => array('width' => '250px'));
     $this->filters = array();
     parent::toExcelAction();
 }
예제 #2
0
 public function toExcelAction()
 {
     $this->filename = 'benevolesList.xls';
     $this->type = 'Excel5';
     $generic = new GenericProfilesObject();
     $generic->setOrderBy('GP_LastName');
     $profile = new VolunteersProfilesObject();
     $oRef = new ReferencesObject();
     $this->select = $profile->getAll(null, false);
     $this->select->joinLeft($generic->getDataTableName(), $profile->getDataId() . ' = ' . $generic->getDataId(), array('lastName' => 'GP_LastName', 'firstName' => 'GP_FirstName', 'email' => 'GP_Email', 'member_id' => 'GP_MemberID'));
     $this->select->joinLeft($oRef->getDataTableName(), $oRef->getDataId() . ' = VP_Job', array('R_TypeRef'));
     $this->select->joinLeft($oRef->getIndexTableName(), $oRef->getIndexId() . ' = ' . $oRef->getDataId(), array('VP_Job' => 'RI_Value'));
     $this->tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'), 'VolunteersProfile' => array('VP_GenericProfileId', 'VP_Job'), $oRef->getDataTableName() => array('R_TypeRef'), $oRef->getIndexTableName() => array('RI_Value'));
     $this->fields = array('firstName' => array('width' => '250px'), 'lastName' => array('width' => '250px'), 'email' => array('width' => '250px'), 'VP_Job' => array('width' => '250px'));
     $this->filters = array();
     parent::toExcelAction();
 }
예제 #3
0
 public function toExcelAction()
 {
     $this->filename = 'membersList.xls';
     $this->type = 'Excel5';
     $profile = new GenericProfilesObject();
     $profile->setOrderBy('GP_LastName');
     $member = new MemberProfilesObject();
     $oRef = new ReferencesObject();
     $oAddr = new AddressObject();
     $oParent = new ParentProfilesObject();
     $oParent = new ParentProfilesObject();
     $this->select = $profile->getAll(null, false);
     $this->select->columns(array('lastName' => 'GP_LastName', 'firstName' => 'GP_FirstName', 'email' => 'GP_Email', 'member_id' => 'GP_MemberID'));
     $this->select->joinRight($member->getDataTableName(), $member->getDataId() . ' = ' . $profile->getDataId());
     $this->select->joinLeft($oRef->getDataTableName(), $oRef->getDataId() . ' = MP_Section', array('R_TypeRef'));
     $this->select->joinLeft($oRef->getIndexTableName(), $oRef->getIndexId() . ' = ' . $oRef->getDataId(), array('section' => 'RI_Value'));
     $this->select->joinLeft($oParent->getDataTableName(), $oParent->getDataId() . ' = MP_FirstParent OR ' . $oParent->getDataId() . ' = MP_SecondParent');
     //            $this->select->joinLeft(
     //                    $oParent->getDataTableName(),
     //                    $oParent->getDataId() . ' = MP_SecondParent'
     //                );
     $this->select->joinLeft($oAddr->getDataTableName(), $oAddr->getDataId() . ' = PP_AddressId');
     $this->select->joinLeft($oAddr->getIndexTableName(), $oAddr->getIndexId() . ' = ' . $oAddr->getDataId());
     $this->select->joinLeft('CountriesIndex', 'CountriesIndex.CI_CountryID = A_CountryId', 'CI_Name');
     $this->select->joinLeft('StatesIndex', 'SI_StateID = A_StateId', 'SI_Name');
     $this->select->where('MP_Category in (45,46)');
     $this->select->where('MP_YearsParticipate like "%' . date('Y', time()) . '%"');
     $this->tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'), 'MemberProfiles' => array('MP_GenericProfileId', 'MP_Section'), $oRef->getDataTableName() => array('R_TypeRef'), $oRef->getIndexTableName() => array('RI_Value'));
     $this->fields = array('section' => array('width' => '250px'), 'CI_Name' => 'CI_Name', 'SI_Name' => 'SI_Name');
     $this->fields = array_merge($this->fields, $profile->getDataColumns(), $member->getDataColumns(), $oAddr->getDataColumns(), $oAddr->getIndexColumns(), $oParent->getDataColumns(), $oRef->getIndexColumns());
     unset($this->fields[$oRef->getDataId()]);
     unset($this->fields[$member->getDataId()]);
     unset($this->fields[$profile->getDataId()]);
     unset($this->fields['PP_AssuSocNum']);
     $this->filters = array();
     parent::toExcelAction();
 }