芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/www/resupres/application/classes/controller/orientation.php
request->redirect('orientation/list'); } public function action_list() { //on récupère toute les orientations politiques $orientations = ORM::factory('orientation')->find_all(); //on passe toute les orientations à la vue pour affichage $this->template->content = View::factory('orientation/list'); $this->template->content->orientations = $orientations; } public function action_unique() { if($this->request->param('id')!=''){ $orientation = ORM::factory('orientation', $this->request->param('id')); if($orientation->loaded()) { $nom = str_replace(array('À','Á','Â','Ã','Ä','Å','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ò','Ó','Ô','Õ','Ö','Ù','Ú','Û','Ü','Ý','à','á', 'â','ã','ä','å','ç','è','é','ê','ë','ì','í','î','ï','ð','ò','ó','ô','õ','ö','ù','ú','û','ü','ý','ÿ',' '), array('A','A','A','A','A','A','C','E','E','E','E','I','I','I','I','O','O','O','O','O','U','U','U','U','Y','a', 'a','a','a','a','a','c','e','e','e','e','i','i','i','i','o','o','o','o','o','o','u','u','u','u','y','y','_'), strtolower($orientation->nom)); if($this->request->param('nom') != $nom){ $this->request->redirect('orientation/unique/'.$orientation->id.'-'.$nom); } $this->template->content = View::factory('orientation/unique'); $this->template->content->orientation = $orientation; } else { $this->request->redirect('orientation/list'); } } else { $this->request->redirect('orientation/list'); } } }