Revision 2228 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?php/**** @package WebanOS CI* @author Lars Tiefland <ltiefland@gmail.com>* @copyright 2016* @version $Rev: 2231 $*/class Kategorie extends CI_Controller{public function __construct(){parent::__construct();$this->load->model('directory_model', 'directory');$this->load->model('medien_model', 'medien');}public function create($father){$daten=array("Father"=>$father,);$this->smarty->assign('daten', $daten);$this->smarty->view('directory.tpl');}public function edit($id = null){if (isset($GLOBALS["web_rechte"]["online_shop"]["directory"]["status"]) && $GLOBALS["web_rechte"]["online_shop"]["directory"]["status"]){$ordnerstatus = explode(";", $GLOBALS["web_rechte"]["online_shop"]["directory"]["status"]);$this->smarty->assign('ordnerstatus', $ordnerstatus);}$robots = array("index,follow","index,nofollow","noindex,follow","noindex,nofollow",);$this->smarty->assign('robots', $robots);$daten = array();if ($id){$daten = $this->directory->get($id);}$this->smarty->assign('daten', $daten);$this->smarty->view('directory.tpl');}public function save(){$directory = $this->input->post('directory');$this->directory->save($directory);}public function medien($id){$medien = $this->medien->get_category_medien($id);$this->smarty->assign("dirId", $id);$this->smarty->assign("l_type", "d");$this->smarty->assign('medien', $medien);$this->smarty->view('medien.tpl');}public function del($id = null){if ($id){$daten = $this->directory->get($id);$name = $daten["Name"];$typ = "Kategorie";$this->smarty->assign('name', $name);$this->smarty->assign('id', $id);$this->smarty->assign('typ', $typ);$this->smarty->view('del.tpl');}elseif ($this->input->post('id')){$this->directory->del($this->input->post('id'));}}}?>