Exemplo n.º 1
0
 function feedback()
 {
     $this->load->model('script');
     $script = new Script();
     $numberOfScriptsToDisplay = 10;
     $startFrom = 0;
     if (is_numeric($this->uri->segment(3))) {
         $startFrom = $this->uri->segment(3);
     }
     $resultAssoc = $script->getScriptsFor($this->_getUser(), $numberOfScriptsToDisplay + 1, $startFrom);
     $pageate = false;
     if (count($resultAssoc) > $numberOfScriptsToDisplay) {
         $pageate = true;
     }
     // remove the extra result returned to see whether pagation was required
     if (count($resultAssoc) > $numberOfScriptsToDisplay) {
         array_pop($resultAssoc);
     }
     // highlight new order
     if ($this->session->flashdata('newOrder')) {
         $viewData['messages'][] = $this->session->flashdata('newOrder');
     }
     $viewData['scripts'] = $resultAssoc;
     $viewData['pageate'] = $pageate;
     $viewData['resultsPer'] = $numberOfScriptsToDisplay;
     $viewData['startFrom'] = $startFrom;
     $this->load->view('html_head.php', array('site_base' => $this->config->item('base_url')));
     $this->load->view('page_head.php', array('bodyId' => 'view feedback', 'userAuth' => @$this->session->userdata('email'), 'markerAuth' => @$this->session->userdata('markerEmail')));
     $this->load->view('user/script_management', $viewData);
     $this->load->view('footer.php', array('site_base' => $this->config->item('base_url')));
 }