function edytujAction()
 {
     $respondent = new Respondenci();
     $db = $respondent->getAdapter();
     $where = $db->quoteInto('id_respondent <> ?', 'NULL');
     $order = 'e_mail';
     $rowset = $respondent->fetchAll($where, $order);
     $num_rows = $rowset->count();
     $params = $this->_action->getParams();
     $limit = 20;
     $subpage = ceil($num_rows / $limit);
     $offset = ((int) $params['page'] - 1) * $limit;
     $rowset = $respondent->fetchAll($where, $order, $limit, $offset);
     $this->view->page = (int) $params['page'];
     $this->view->offset = $offset;
     $this->view->subpage = $subpage;
     $this->view->respondent = $rowset;
     $this->view->body = $this->view->render('/respondenci/respondenciEdytuj.php');
     $this->display();
 }
 public function mailsendAction()
 {
     //treśc wysłanych maili wyświetlamy w pliku txt
     $file = new Hamster_File();
     $file->setDir('../logs');
     $file->setFileName('mail.txt');
     $respondent = new Respondenci();
     $users = $respondent->fetchAll();
     $data = '';
     foreach ($users as $user) {
         $data = "Witamy,\n" . "Prosimy o wypełnienie tej ankiety:\n" . "http://knip.pol.lublin.pl/~projekt5/ankieta/pokaz/ankieta/" . $this->_getParam('ankieta') . "\n" . "\n \n" . "Jeżeli nie chcesz otrzymywać już więcej takich maili, kliknij na link poniżej\n" . "http://knip.pol.lublin.pl/~projekt5/respondenci/usunhash/hash/" . md5($user->eMail) . "\n=======================================================" . "\n \n";
         mail($user->eMail, "Nowa Ankieta", $data);
     }
     //$file->putFileContent($data);
     $this->_forward('ankieter', 'edytuj', array('ankieta' => $this->_getParam('ankieta')));
 }