Exemple #1
0
 /**
  * FBO index
  * Search fbos
  * CODE:fbo_index
  */
 public function executeFboIndex(sfWebRequest $request)
 {
     # security
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff', 'Pilot', 'Coordinator', 'Volunteer'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $this->getUser()->addRecentItem('FBO', 'fbo', 'airport/fboIndex');
     # for navigation menu
     sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');
     slot('nav_menu', array('reference', 'find-fbo'));
     if ($request->getParameter('aport')) {
         $this->max = 10;
         $this->page = 1;
         $this->fbo_name = null;
         $this->discount = null;
         $this->default = null;
         $this->ident = $request->getParameter('aport');
         $this->name = null;
         $this->city = null;
         $this->state = null;
         $this->max_array = array(5, 10, 20, 30);
     } else {
         $this->processFilter2($request);
     }
     # filter
     if ($request->isMethod('post') || $request->getParameter('page')) {
         $this->pager = FboPeer::getPager($this->max, $this->page, $this->fbo_name, $this->discount, $this->default, $this->ident, $this->name, $this->city, $this->state);
         $this->fbos = $this->pager->getResults();
     }
 }