Пример #1
0
 public function deleteAction()
 {
     $authorization = Zend_Auth::getInstance();
     $identity = $authorization->getIdentity();
     if ($identity->user_type == "admin") {
         $id = $this->getRequest()->getParam('id');
         if ($id) {
             $model = new Application_Model_Materials();
             $this->view->courses = $model->deleteMaterial($id);
         }
         $this->redirect("materials/list");
     } else {
         $this->view->notAllwed = "The page not allowed for normal user.";
         $this->_redirect("/materials/list");
     }
 }