public function configure() { $gifts = array(); $this->premium_choices = sfConfig::get('app_premium_choices', array('hat' => array('Hat - One Size', 1, 0))); foreach ($this->premium_choices as $key => $gift) { $gifts[$key] = $gift[0]; } $yes_no = array(1 => 'Yes', 0 => 'No'); //$total=$request->getParameter('total_amount'); //print_r($total); //die(); //farazi Condition of validation for admin and mormal member $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true); $context = sfContext::getInstance(); $user = $context->getUser(); $totalAmount = $context->getRequest()->getParameter('total_amount'); if ($totalAmount > 0) { //echo "1"; $card = array('ccard_number' => new sfValidatorString(array('max_length' => 20, 'required' => true), array('required' => 'Please confirm Credit Card Number')), 'ccard_code' => new sfValidatorString(array('max_length' => 5, 'required' => true)), 'ccard_expire' => new sfValidatorDate(array('date_output' => 'm/Y', 'date_format' => '#\\d\\d\\/\\d\\d\\d\\d#', 'required' => false, 'with_time' => false), array('bad_format' => 'Format errro', 'required' => 'Please confirm Expiration Date', 'invalid' => 'Date of birth is invalid !.'))); } else { //echo "1"; $card = array('ccard_number' => new sfValidatorString(array('max_length' => 20, 'required' => false), array('required' => 'Please confirm Credit Card Number')), 'ccard_code' => new sfValidatorString(array('max_length' => 5, 'required' => false)), 'ccard_expire' => new sfValidatorDate(array('date_output' => 'm/Y', 'date_format' => '#\\d\\d\\/\\d\\d\\d\\d#', 'required' => false, 'with_time' => false), array('bad_format' => 'Format errro', 'required' => 'Please confirm Expiration Date', 'invalid' => 'Date of birth is invalid !.'))); } /* //echo "1"; $card = array( 'ccard_number' => new sfValidatorString(array('max_length' => 20, 'required' => true),array('required'=>'Please confirm Credit Card Number')), 'ccard_code' => new sfValidatorString(array('max_length' => 5, 'required' => true)), 'ccard_expire' => new sfValidatorDate(array('date_output' =>'m/Y', 'date_format' => '#\d\d\/\d\d\d\d#', 'required' => true, 'with_time' => false), array('bad_format' => 'Format errro', 'required'=>'Please confirm Expiration Date', 'invalid'=> 'Date of birth is invalid !.')), ); }else { //echo "1"; $card = array( 'ccard_number' => new sfValidatorString(array('max_length' => 20, 'required' => false),array('required'=>'Please confirm Credit Card Number')), 'ccard_code' => new sfValidatorString(array('max_length' => 5, 'required' => false)), 'ccard_expire' => new sfValidatorDate(array('date_output' =>'m/Y', 'date_format' => '#\d\d\/\d\d\d\d#', 'required' => false, 'with_time' => false), array('bad_format' => 'Format errro', 'required'=>'Please confirm Expiration Date', 'invalid'=> 'Date of birth is invalid !.')), ); }*/ $widgets = array('id' => new sfWidgetFormInputHidden(), 'premium_choice' => new sfWidgetFormSelectRadio(array('choices' => $gifts)), 'premium_size' => new sfWidgetFormInput(), 'mission_orientation' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'mission_coordination' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'pilot_recruitment' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'fund_raising' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'celebrity_contacts' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'graphic_arts' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'hospital_outreach' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'event_planning' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'media_relations' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'telephone_work' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'computers' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'clerical' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'printing' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'writing' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'speakers_bureau' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'wing_team' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'web_internet' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'foundation_contacts' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'aviation_contacts' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'will')), 'member_aopa' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'wiss')), 'member_kiwanis' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'wiss')), 'member_rotary' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'wiss')), 'member_lions' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'wiss')), 'member_99s' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'wiss')), 'member_wia' => new sfWidgetFormInputCheckbox(array(), array('value' => 1, 'class' => 'wiss')), 'company_name' => new sfWidgetFormInput(array(), array('class' => 'text')), 'company_position' => new sfWidgetFormInput(array(), array('class' => 'text')), 'company_match_funds' => new sfWidgetFormSelectRadio(array('choices' => $yes_no, 'formatter' => array($this, 'formatterRaw'))), 'referral_source' => new sfWidgetFormPropelChoice(array('model' => 'RefSource', 'method' => 'getSourceName', 'add_empty' => 'Please Select', 'order_by' => array('SourceName', 'asc'))), 'referral_source_other' => new sfWidgetFormInput(array(), array('class' => 'text narrow')), 'referer_name' => new sfWidgetFormInput(array(), array('class' => 'text')), 'mission_email_optin' => new sfWidgetFormSelectRadio(array('choices' => $yes_no, 'formatter' => array($this, 'formatterRaw'))), 'hseats_interest' => new sfWidgetFormSelectRadio(array('choices' => $yes_no, 'formatter' => array($this, 'formatterRaw'))), 'ccard_number' => new widgetFormInputPhone(array('mask' => '9999-9999-9999-9999', 'ok_class' => 'field_ok', 'holder_class' => 'field_hold'), array('style' => 'width:200')), 'ccard_code' => new sfWidgetFormInput(array(), array('class' => 'text narrowest')), 'ccard_expire' => new widgetFormDate(array('change_year' => true, 'change_month' => true, 'format_date' => array('js' => 'mm/yy', 'php' => 'm/Y'), 'button' => '/images/icons/calendar.gif'), array('class' => 'text narrow'))); $labels = array('premium_choice' => 'Choose a Gift*', 'mission_orientation' => 'Mission Orientation', 'mission_coordination' => 'Mission Coordination', 'pilot_recruitment' => 'Pilot Recruitment', 'fund_raising' => 'Fund Raising', 'celebrity_contacts' => 'Celebrity Contacts', 'graphic_arts' => 'Graphic Arts', 'hospital_outreach' => 'Hospital Outreach', 'event_planning' => 'Event Planning', 'media_relations' => 'Media Relations', 'telephone_work' => 'Telephone Work', 'computers' => 'Computers', 'clerical' => 'Clerical', 'printing' => 'Printing', 'writing' => 'Writing (grants, newsletter, etc.)', 'speakers_bureau' => 'Speaker\'s Bureau', 'wing_team' => 'Wing Leadership', 'web_internet' => 'Web/Internet', 'foundation_contacts' => 'Foundation Contacts', 'aviation_contacts' => 'Aviation Business Contacts', 'member_aopa' => 'AOPA', 'member_kiwanis' => 'Kiwanis', 'member_rotary' => 'Rotary', 'member_lions' => 'Lions', 'member_99s' => '99\'s', 'member_wia' => 'Women in Aviation', 'company_name' => 'Your company or Employer Name', 'company_position' => 'Your position', 'company_match_funds' => 'Does your company provide matching grants?', 'referral_source' => 'How did you hear about Angel Flight West?', 'referral_source_other' => 'Or, other', 'referer_name' => 'Referer Name', 'mission_email_optin' => 'Do you wish to receive emails listing available missions?', 'hseats_interest' => 'Are you interested in serving as a homeland security pilot?', 'ccard_number' => 'Credit Card Number', 'ccard_code' => 'Code', 'ccard_expire' => 'Expiration Date'); $helps = array('referer_name' => 'If you were referred to Angel Flight West by a person, please enter his or her name', 'mission_email_optin' => 'Periodic emails will be sent', 'hseats_interest' => 'You will serve as homeland security pilot'); //'premium_choice' => new sfValidatorChoice(array('choices' => array_keys($gifts))), $isRenewal = ApplicationTempPeer::getRenewalStatus($context->getRequest()->getParameter('id')); $validators = array('id' => new sfValidatorPropelChoice(array('model' => 'ApplicationTemp', 'column' => 'id', 'required' => false)), 'premium_choice' => new sfValidatorChoice(array('required' => $isRenewal ? false : true, 'choices' => array_keys($gifts))), 'premium_size' => new sfValidatorInteger(array('required' => false)), 'mission_orientation' => new sfValidatorInteger(array('required' => false)), 'mission_coordination' => new sfValidatorInteger(array('required' => false)), 'pilot_recruitment' => new sfValidatorInteger(array('required' => false)), 'fund_raising' => new sfValidatorInteger(array('required' => false)), 'celebrity_contacts' => new sfValidatorInteger(array('required' => false)), 'graphic_arts' => new sfValidatorInteger(array('required' => false)), 'hospital_outreach' => new sfValidatorInteger(array('required' => false)), 'event_planning' => new sfValidatorInteger(array('required' => false)), 'media_relations' => new sfValidatorInteger(array('required' => false)), 'telephone_work' => new sfValidatorInteger(array('required' => false)), 'computers' => new sfValidatorInteger(array('required' => false)), 'clerical' => new sfValidatorInteger(array('required' => false)), 'printing' => new sfValidatorInteger(array('required' => false)), 'writing' => new sfValidatorInteger(array('required' => false)), 'speakers_bureau' => new sfValidatorInteger(array('required' => false)), 'wing_team' => new sfValidatorInteger(array('required' => false)), 'web_internet' => new sfValidatorInteger(array('required' => false)), 'foundation_contacts' => new sfValidatorInteger(array('required' => false)), 'aviation_contacts' => new sfValidatorInteger(array('required' => false)), 'member_aopa' => new sfValidatorInteger(array('required' => false)), 'member_kiwanis' => new sfValidatorInteger(array('required' => false)), 'member_rotary' => new sfValidatorInteger(array('required' => false)), 'member_lions' => new sfValidatorInteger(array('required' => false)), 'member_99s' => new sfValidatorInteger(array('required' => false)), 'member_wia' => new sfValidatorInteger(array('required' => false)), 'company_name' => new sfValidatorString(array('max_length' => 40, 'required' => false)), 'company_position' => new sfValidatorString(array('max_length' => 40, 'required' => false)), 'company_match_funds' => new sfValidatorInteger(array('required' => false)), 'referral_source' => new sfValidatorPropelChoice(array('model' => 'RefSource', 'column' => 'id', 'required' => false)), 'referral_source_other' => new sfValidatorString(array('max_length' => 40, 'required' => false)), 'referer_name' => new sfValidatorString(array('max_length' => 40, 'required' => false)), 'mission_email_optin' => new sfValidatorInteger(array('required' => false)), 'hseats_interest' => new sfValidatorInteger(array('required' => false))); $validators = array_merge((array) $validators, (array) $card); /* echo "<pre>"; print_r($validators); echo "</pre>"; die(); */ $this->setWidgets($widgets); $this->widgetSchema->setLabels($labels); $this->widgetSchema->setHelps($helps); $this->setValidators($validators); $this->widgetSchema->setNameFormat('application[%s]'); $this->widgetSchema->getFormFormatter()->setHelpFormat('%help%'); }
public function executeSendMail(sfWebRequest $request) { $this->forward404Unless($application_temp = ApplicationTempPeer::retrieveByPk($request->getParameter('id')), sprintf('Object application_temp does not exist (%s).', $request->getParameter('id'))); $to = $request->getParameter('to'); $email = $request->getParameter('email'); $subject = $request->getParameter('subject'); $text = $request->getParameter('body'); $this->getComponent('mail', 'missionReqReject', array('text' => $text, 'email' => $email, 'subject' => $subject)); $application_temp->delete(); $this->getUser()->setFlash('success', 'Email have successfully queued!'); $this->redirect($request->getReferer()); }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(ApplicationTempPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(ApplicationTempPeer::DATABASE_NAME); $criteria->add(ApplicationTempPeer::ID, $pks, Criteria::IN); $objs = ApplicationTempPeer::doSelect($criteria, $con); } return $objs; }
public function executePriorityList() { $this->pilot_request_count = PilotRequestPeer::countIn2Days(); $this->no_pilot_count = MissionPeer::countNoPilotIn2Days(); $this->cancelled_legs = MissionLegPeer::countCancelled(); $pilot = PilotPeer::retrieveByPK($this->getUser()->getPilotId()); if (!$pilot instanceof Pilot) { return sfView::NONE; } if ($pilot->getPrimaryAirportId()) { $this->near_mission = MissionLegPeer::getPilotNear($pilot->getPrimaryAirportId()); } else { $this->near_mission = array(); } $pilot_id = $this->getUser()->getPilotId(); $this->p_id = $pilot_id; if ($pilot_id) { $pilot = PilotPeer::retrieveByPK($pilot_id); $p_firstname = $pilot->getMember()->getPerson()->getFirstName(); $p_lastname = $pilot->getMember()->getPerson()->getLastName(); $c = new Criteria(); $c->add(MissionLegPeer::TRANSPORTATION, 'air_mission'); $c->add(MissionLegPeer::PILOT_ID, $pilot_id); $c->addJoin(MissionLegPeer::MISSION_ID, MissionPeer::ID, Criteria::RIGHT_JOIN); $c->add(MissionPeer::MISSION_DATE, date('Y-m-d H:i:s'), Criteria::LESS_THAN); $c->addJoin(MissionLegPeer::MISSION_REPORT_ID, MissionReportPeer::ID, Criteria::LEFT_JOIN); $c->add(MissionReportPeer::APPROVED, null, Criteria::ISNULL); $mission_legs = MissionLegPeer::doSelectJoinMission($c, null, Criteria::RIGHT_JOIN); $this->miss = count($mission_legs); $pind = MissionLegPeer::getPendingMissions($pilot_id); $this->pinding = $pind; //Update Farazi $member_id = $this->getUser()->getMemberId(); $member = MemberPeer::retrieveByPK($member_id); $date_now = strtotime("NOW"); $date_ren = strtotime($member->getRenewalDate()); $sub = $date_ren - $date_now; $preday = 0; if ($sub >= 86400) { $pday = $sub / 86400; $preday = explode('.', $pday); } else { $pday = $sub / 86400; $preday = explode('.', $pday); } $this->due_day = $preday[0]; } // Show mission request list for adin user if ($this->getUser()->hasCredential(array('Administrator'), false)) { // Get number of un processed mission requests $this->un_proc_miss_req = MissionRequestPeer::getNumberOfNonProcessedMissionRequest(); // Get number of un processed member applications $this->un_proc_mem_apps = ApplicationTempPeer::getNonProcessedMemberApplications(); // Get number of un processed pilot requests $this->un_proc_pilot_reqs = PilotRequestPeer::getPager()->getNbResults(); // Get uncoordinate mission legs $this->un_coor_mission_legs = MissionLegPeer::getPager(10, 1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, true)->getNbResults(); } // ziyed : count unprocessed contact request $c = new Criteria(); $c->add(ContactRequestPeer::PROCESSED, NULL, Criteria::ISNULL); $this->un_proce_contact_req = ContactRequestPeer::doCount($c); //end //Farazi : new contact requests $c = new Criteria(); $c->add(ContactRequestPeer::PROCESSED, NULL, Criteria::ISNULL); $this->new_contact_requeststs = ContactRequestPeer::doSelect($c); //end // ziyed : count unprocessed contact request $c = new Criteria(); $c->add(ContactRequestPeer::PROCESSED, NULL, Criteria::ISNULL); $c->add(ContactRequestPeer::REQUEST_DATE, 'ABS(DATEDIFF( NOW( \'Y-m-d\' ),' . ContactRequestPeer::REQUEST_DATE . ') ) > 1', Criteria::CUSTOM); $this->graterThanOneDay = ContactRequestPeer::doCount($c); //end //Farazi //Removed Pilots if ($this->getUser()->hasCredential(array('Pilot'), false)) { $pilot = PilotPeer::retrieveByPK($this->getUser()->getPilotId()); $this->removed_pilot = PilotRequestPeer::getRemovedPilot($pilot->getMemberId()); } //Revival Pilots if ($this->getUser()->hasCredential(array('Pilot'), false)) { $pilot = PilotPeer::retrieveByPK($this->getUser()->getPilotId()); $this->revival_pilot = PilotRequestPeer::getRevivalPilot($pilot->getMemberId()); } //New Pilot added to the mission leg if ($this->getUser()->hasCredential(array('Administrator', 'Staff', 'Coordinator'), false)) { $this->pilots_added = PilotRequestPeer::getPilotsAdded(); } //Mission report due $c = new Criteria(); $pilotId = $this->getUser()->getPilotId(); $c->add(MissionLegPeer::PILOT_ID, $pilotId, Criteria::EQUAL); $c->add(MissionLegPeer::MISSION_REPORT_ID, NULL, Criteria::ISNULL); $c->add(MissionLegPeer::CANCEL_MISSION_LEG, 1, Criteria::NOT_EQUAL); $c->addJoin(MissionPeer::ID, MissionLegPeer::MISSION_ID, Criteria::LEFT_JOIN); $c->add(MissionPeer::MISSION_DATE, 'NOW( \'Y-m-d\' )', Criteria::LESS_THAN); //echo $c->toString(); $this->mission_report_dues = MissionLegPeer::doCount($c); //End Farazi }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = ApplicationTempPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setApplicationDate($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setRenewal($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setTitle($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setFirstName($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setLastName($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setAddress1($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setAddress2($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setCity($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setState($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setZipcode($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setDayPhone($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setDayComment($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setEvePhone($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setEveComment($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setMobilePhone($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setMobileComment($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setPagerPhone($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setPagerComment($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setFaxPhone1($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setFaxComment1($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setFaxPhone2($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setFaxComment2($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setOtherPhone($arr[$keys[23]]); } if (array_key_exists($keys[24], $arr)) { $this->setOtherComment($arr[$keys[24]]); } if (array_key_exists($keys[25], $arr)) { $this->setEmail($arr[$keys[25]]); } if (array_key_exists($keys[26], $arr)) { $this->setSpouseFirstName($arr[$keys[26]]); } if (array_key_exists($keys[27], $arr)) { $this->setSpouseLastName($arr[$keys[27]]); } if (array_key_exists($keys[28], $arr)) { $this->setApplicantPilot($arr[$keys[28]]); } if (array_key_exists($keys[29], $arr)) { $this->setSpousePilot($arr[$keys[29]]); } if (array_key_exists($keys[30], $arr)) { $this->setApplicantCopilot($arr[$keys[30]]); } if (array_key_exists($keys[31], $arr)) { $this->setLanguagesSpoken($arr[$keys[31]]); } if (array_key_exists($keys[32], $arr)) { $this->setHomeBase($arr[$keys[32]]); } if (array_key_exists($keys[33], $arr)) { $this->setFboName($arr[$keys[33]]); } if (array_key_exists($keys[34], $arr)) { $this->setAircraftPrimaryId($arr[$keys[34]]); } if (array_key_exists($keys[35], $arr)) { $this->setAircraftPrimaryOwn($arr[$keys[35]]); } if (array_key_exists($keys[36], $arr)) { $this->setAircraftPrimaryIce($arr[$keys[36]]); } if (array_key_exists($keys[37], $arr)) { $this->setAircraftPrimarySeats($arr[$keys[37]]); } if (array_key_exists($keys[38], $arr)) { $this->setAircraftPrimaryNNumber($arr[$keys[38]]); } if (array_key_exists($keys[39], $arr)) { $this->setAircraftSecondaryId($arr[$keys[39]]); } if (array_key_exists($keys[40], $arr)) { $this->setAircraftSecondaryOwn($arr[$keys[40]]); } if (array_key_exists($keys[41], $arr)) { $this->setAircraftSecondaryIce($arr[$keys[41]]); } if (array_key_exists($keys[42], $arr)) { $this->setAircraftSecondarySeats($arr[$keys[42]]); } if (array_key_exists($keys[43], $arr)) { $this->setAircraftSecondaryNNumber($arr[$keys[43]]); } if (array_key_exists($keys[44], $arr)) { $this->setPilotCertificate($arr[$keys[44]]); } if (array_key_exists($keys[45], $arr)) { $this->setRatings($arr[$keys[45]]); } if (array_key_exists($keys[46], $arr)) { $this->setMedicalClass($arr[$keys[46]]); } if (array_key_exists($keys[47], $arr)) { $this->setLicenseType($arr[$keys[47]]); } if (array_key_exists($keys[48], $arr)) { $this->setTotalHours($arr[$keys[48]]); } if (array_key_exists($keys[49], $arr)) { $this->setIfrHours($arr[$keys[49]]); } if (array_key_exists($keys[50], $arr)) { $this->setMultiHours($arr[$keys[50]]); } if (array_key_exists($keys[51], $arr)) { $this->setOtherHours($arr[$keys[51]]); } if (array_key_exists($keys[52], $arr)) { $this->setDateOfBirth($arr[$keys[52]]); } if (array_key_exists($keys[53], $arr)) { $this->setHeight($arr[$keys[53]]); } if (array_key_exists($keys[54], $arr)) { $this->setWeight($arr[$keys[54]]); } if (array_key_exists($keys[55], $arr)) { $this->setAvailabilityWeekdays($arr[$keys[55]]); } if (array_key_exists($keys[56], $arr)) { $this->setAvailabilityWeeknights($arr[$keys[56]]); } if (array_key_exists($keys[57], $arr)) { $this->setAvailabilityWeekends($arr[$keys[57]]); } if (array_key_exists($keys[58], $arr)) { $this->setAvailabilityNotice($arr[$keys[58]]); } if (array_key_exists($keys[59], $arr)) { $this->setAvailabilityLastMinute($arr[$keys[59]]); } if (array_key_exists($keys[60], $arr)) { $this->setAvailabilityCopilot($arr[$keys[60]]); } if (array_key_exists($keys[61], $arr)) { $this->setAffirmationAgreed($arr[$keys[61]]); } if (array_key_exists($keys[62], $arr)) { $this->setInsuranceAgreed($arr[$keys[62]]); } if (array_key_exists($keys[63], $arr)) { $this->setVolunteerInterest($arr[$keys[63]]); } if (array_key_exists($keys[64], $arr)) { $this->setCompanyName($arr[$keys[64]]); } if (array_key_exists($keys[65], $arr)) { $this->setCompanyPosition($arr[$keys[65]]); } if (array_key_exists($keys[66], $arr)) { $this->setCompanyMatchFunds($arr[$keys[66]]); } if (array_key_exists($keys[67], $arr)) { $this->setCompanyBusinessCategoryId($arr[$keys[67]]); } if (array_key_exists($keys[68], $arr)) { $this->setReferralSource($arr[$keys[68]]); } if (array_key_exists($keys[69], $arr)) { $this->setPremiumChoice($arr[$keys[69]]); } if (array_key_exists($keys[70], $arr)) { $this->setPremiumSize($arr[$keys[70]]); } if (array_key_exists($keys[71], $arr)) { $this->setDuesAmountPaid($arr[$keys[71]]); } if (array_key_exists($keys[72], $arr)) { $this->setDonationAmountPaid($arr[$keys[72]]); } if (array_key_exists($keys[73], $arr)) { $this->setMethodOfPaymentId($arr[$keys[73]]); } if (array_key_exists($keys[74], $arr)) { $this->setCcardApprovalNumber($arr[$keys[74]]); } if (array_key_exists($keys[75], $arr)) { $this->setCcardErrorCode($arr[$keys[75]]); } if (array_key_exists($keys[76], $arr)) { $this->setCcardAvsResult($arr[$keys[76]]); } if (array_key_exists($keys[77], $arr)) { $this->setProcessedDate($arr[$keys[77]]); } if (array_key_exists($keys[78], $arr)) { $this->setMemberId($arr[$keys[78]]); } if (array_key_exists($keys[79], $arr)) { $this->setMissionOrientation($arr[$keys[79]]); } if (array_key_exists($keys[80], $arr)) { $this->setMissionCoordination($arr[$keys[80]]); } if (array_key_exists($keys[81], $arr)) { $this->setPilotRecruitment($arr[$keys[81]]); } if (array_key_exists($keys[82], $arr)) { $this->setFundRaising($arr[$keys[82]]); } if (array_key_exists($keys[83], $arr)) { $this->setCelebrityContacts($arr[$keys[83]]); } if (array_key_exists($keys[84], $arr)) { $this->setHospitalOutreach($arr[$keys[84]]); } if (array_key_exists($keys[85], $arr)) { $this->setMediaRelations($arr[$keys[85]]); } if (array_key_exists($keys[86], $arr)) { $this->setTelephoneWork($arr[$keys[86]]); } if (array_key_exists($keys[87], $arr)) { $this->setComputers($arr[$keys[87]]); } if (array_key_exists($keys[88], $arr)) { $this->setClerical($arr[$keys[88]]); } if (array_key_exists($keys[89], $arr)) { $this->setPublicity($arr[$keys[89]]); } if (array_key_exists($keys[90], $arr)) { $this->setWriting($arr[$keys[90]]); } if (array_key_exists($keys[91], $arr)) { $this->setSpeakersBureau($arr[$keys[91]]); } if (array_key_exists($keys[92], $arr)) { $this->setWingTeam($arr[$keys[92]]); } if (array_key_exists($keys[93], $arr)) { $this->setGraphicArts($arr[$keys[93]]); } if (array_key_exists($keys[94], $arr)) { $this->setEventPlanning($arr[$keys[94]]); } if (array_key_exists($keys[95], $arr)) { $this->setWebInternet($arr[$keys[95]]); } if (array_key_exists($keys[96], $arr)) { $this->setFoundationContacts($arr[$keys[96]]); } if (array_key_exists($keys[97], $arr)) { $this->setAviationContacts($arr[$keys[97]]); } if (array_key_exists($keys[98], $arr)) { $this->setPrinting($arr[$keys[98]]); } if (array_key_exists($keys[99], $arr)) { $this->setMemberAopa($arr[$keys[99]]); } if (array_key_exists($keys[100], $arr)) { $this->setMemberKiwanis($arr[$keys[100]]); } if (array_key_exists($keys[101], $arr)) { $this->setMemberRotary($arr[$keys[101]]); } if (array_key_exists($keys[102], $arr)) { $this->setMemberLions($arr[$keys[102]]); } if (array_key_exists($keys[103], $arr)) { $this->setPersonId($arr[$keys[103]]); } if (array_key_exists($keys[104], $arr)) { $this->setNovapointeId($arr[$keys[104]]); } if (array_key_exists($keys[105], $arr)) { $this->setPremiumShipDate($arr[$keys[105]]); } if (array_key_exists($keys[106], $arr)) { $this->setPremiumShipMethod($arr[$keys[106]]); } if (array_key_exists($keys[107], $arr)) { $this->setPremiumShipCost($arr[$keys[107]]); } if (array_key_exists($keys[108], $arr)) { $this->setPremiumShipTrackingNumber($arr[$keys[108]]); } if (array_key_exists($keys[109], $arr)) { $this->setRefererName($arr[$keys[109]]); } if (array_key_exists($keys[110], $arr)) { $this->setReferralSessionId($arr[$keys[110]]); } if (array_key_exists($keys[111], $arr)) { $this->setAircraftThirdId($arr[$keys[111]]); } if (array_key_exists($keys[112], $arr)) { $this->setAircraftThirdOwn($arr[$keys[112]]); } if (array_key_exists($keys[113], $arr)) { $this->setAircraftThirdIce($arr[$keys[113]]); } if (array_key_exists($keys[114], $arr)) { $this->setAircraftThirdSeats($arr[$keys[114]]); } if (array_key_exists($keys[115], $arr)) { $this->setAircraftThirdNNumber($arr[$keys[115]]); } if (array_key_exists($keys[116], $arr)) { $this->setIpAddress($arr[$keys[116]]); } if (array_key_exists($keys[117], $arr)) { $this->setPagerEmail($arr[$keys[117]]); } if (array_key_exists($keys[118], $arr)) { $this->setMember99s($arr[$keys[118]]); } if (array_key_exists($keys[119], $arr)) { $this->setMemberWia($arr[$keys[119]]); } if (array_key_exists($keys[120], $arr)) { $this->setMissionEmailOptin($arr[$keys[120]]); } if (array_key_exists($keys[121], $arr)) { $this->setHseatsInterest($arr[$keys[121]]); } if (array_key_exists($keys[122], $arr)) { $this->setMasterApplicationId($arr[$keys[122]]); } if (array_key_exists($keys[123], $arr)) { $this->setMasterMemberId($arr[$keys[123]]); } if (array_key_exists($keys[124], $arr)) { $this->setReferralSourceOther($arr[$keys[124]]); } if (array_key_exists($keys[125], $arr)) { $this->setSecondaryEmail($arr[$keys[125]]); } if (array_key_exists($keys[126], $arr)) { $this->setPaymentTransactionId($arr[$keys[126]]); } if (array_key_exists($keys[127], $arr)) { $this->setMiddleName($arr[$keys[127]]); } if (array_key_exists($keys[128], $arr)) { $this->setSuffix($arr[$keys[128]]); } if (array_key_exists($keys[129], $arr)) { $this->setNickname($arr[$keys[129]]); } if (array_key_exists($keys[130], $arr)) { $this->setVeteran($arr[$keys[130]]); } if (array_key_exists($keys[131], $arr)) { $this->setGender($arr[$keys[131]]); } if (array_key_exists($keys[132], $arr)) { $this->setEmergencyContactName($arr[$keys[132]]); } if (array_key_exists($keys[133], $arr)) { $this->setEmergencyContactPhone($arr[$keys[133]]); } if (array_key_exists($keys[134], $arr)) { $this->setCountry($arr[$keys[134]]); } if (array_key_exists($keys[135], $arr)) { $this->setDriversLicenseState($arr[$keys[135]]); } if (array_key_exists($keys[136], $arr)) { $this->setDriversLicenseNumber($arr[$keys[136]]); } if (array_key_exists($keys[137], $arr)) { $this->setCcardNumber($arr[$keys[137]]); } if (array_key_exists($keys[138], $arr)) { $this->setCcardCode($arr[$keys[138]]); } if (array_key_exists($keys[139], $arr)) { $this->setCcardExpire($arr[$keys[139]]); } if (array_key_exists($keys[140], $arr)) { $this->setIsComplete($arr[$keys[140]]); } if (array_key_exists($keys[141], $arr)) { $this->setMemberClassId($arr[$keys[141]]); } if (array_key_exists($keys[142], $arr)) { $this->setWingId($arr[$keys[142]]); } }
public function executeSearch(sfWebRequest $request) { #security if (!$this->getUser()->hasCredential(array('Administrator', 'Staff'), false)) { $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer()); $this->redirect('dashboard/index'); } slot('nav_menu', array('members', 'pending-search')); $this->processFilterSearch($request); $this->pager = ApplicationTempPeer::getNonProcessedSearchPager($this->max, $this->page, $this->deceased_until, $this->name, $this->email); $this->application_temp_list = $this->pager->getResults(); $this->date_widget = new widgetFormDate(array('format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text')); }
public function executeAjaxGetPilotRequests(sfWebRequest $request) { # arrived requests $this->mission_requests = MissionRequestPeer::getRsNonProcessed($count); $this->mission_requests_count = $count; # available missions $this->available_mission_legs = MissionLegPeer::getRsAvailable($count); $this->available_mission_legs_count = $count; # coordinated missions $this->coordinated_mission_legs = MissionLegPeer::getRsCoordinated($count); $this->coordinated_mission_legs_count = $count; # pilot requests //return $this->renderText($request->getParameter('req_date1').' '.$request->getParameter('req_date2')); # filter $this->processPilotRequestFilter($request); $this->pager = PilotRequestPeer::getPager($this->max, $this->page, $this->req_date1, $this->req_date2, $this->miss_date1, $this->miss_date2, $this->not_process, $this->hold, $this->process); $this->pilot_reqs = $this->pager->getResults(); $this->date_widget = new widgetFormDate(array('format_date' => array('js' => 'mm/dd/yy', 'php' => 'm/d/Y')), array('class' => 'text')); # member requests $c = new Criteria(); $c->add(ApplicationTempPeer::RENEWAL, null, Criteria::ISNULL); $c->add(ApplicationTempPeer::MEMBER_ID, null, Criteria::ISNULL); $c->add(ApplicationTempPeer::PROCESSED_DATE, null, Criteria::ISNULL); $c->setLimit(50); $this->member_requests = ApplicationTempPeer::doSelect($c); $this->transportations = array('air_mission' => 'Air Mission', 'ground_mission' => 'Ground Mission', 'commercial_mission' => 'Commercial Mission'); }