Ejemplo n.º 1
0
 /** Setup index page
  */
 public function indexAction()
 {
     $content = new Content();
     $this->view->contents = $content->getFrontContent('database');
     $thumbs = new Slides();
     $this->view->thumbs = $thumbs->getLast10Thumbnails(4);
     $finds = new Finds();
     $this->view->counts = $finds->getCountAllFinds();
     $recent = new Logins();
     $this->view->logins = $recent->todayVisitors();
     $form = new SolrForm();
     $form->setMethod('post');
     $this->view->form = $form;
     $values = $form->getValues();
     if ($this->getRequest()->isPost() && $form->isValid($_POST)) {
         if ($form->isValid($form->getValues())) {
             $params = array_filter($form->getValues());
             $params = $this->array_cleanup($params);
             $this->_flashMessenger->addMessage('Your search is complete');
             $this->_helper->Redirector->gotoSimple('results', 'search', 'database', $params);
         } else {
             $form->populate($data);
         }
     }
 }