public function homeAction()
 {
     $this->_helper->layout->setLayout('full');
     $doctorProxy = new SxModule_Doctor_Proxy();
     $doctors = $doctorProxy->getAll($this->_getParam('lng', 'nl'), true);
     $this->view->items = $doctors;
 }
 public function indexAction()
 {
     //SxCms_Acl::requireAcl('block', 'block.edit');
     $did = $this->_getParam('did');
     $proxy = new SxModule_Doctor_Agenda_Proxy();
     $items = $proxy->getByDoctorId($did, $_SESSION['System']['lng']);
     $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($items));
     $paginator->setCurrentPageNumber($this->_getParam('page'));
     $paginator->setItemCountPerPage(999);
     $proxy = new SxModule_Doctor_Proxy();
     $doctor = $proxy->getById($did);
     $this->view->doctor = $doctor;
     $this->view->paginator = $paginator;
     $this->view->did = $did;
 }
 public function deleteAction()
 {
     $id = $this->_getParam('id');
     $proxy = new SxModule_Doctor_Proxy();
     $item = $proxy->getById($id);
     $image1 = APPLICATION_ROOT . '/public_html/images/doctors/100x100/' . $item->getPhoto();
     $image2 = APPLICATION_ROOT . '/public_html/images/doctors/230x230/' . $item->getPhoto();
     $image3 = APPLICATION_ROOT . '/public_html/images/doctors/110x110/' . $item->getPhoto();
     if (file_exists($image1)) {
         unlink($image1);
     }
     if (file_exists($image2)) {
         unlink($image2);
     }
     if (file_exists($image3)) {
         unlink($image3);
     }
     $item->delete();
     $flashMessenger = $this->_helper->getHelper('FlashMessenger');
     $flashMessenger->addMessage('Item werd succesvol verwijderd!');
     $this->_helper->redirector->gotoSimple('index', 'doctor');
 }