Revision 382 | Revision 386 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?phpclass Hersteller extends CI_Controller{public function __construct(){parent::__construct();$this->load->model('Herstellerkatalog_model', 'hersteller');}public function index($begin = ''){$herstellerListe2 = $this->hersteller->list_hersteller($begin);$this->smarty->assign('herstellerListe2', $herstellerListe2);$this->smarty->view('hersteller_liste.tpl');}public function view($h_id){$id = explode("-", $h_id);if (is_numeric($id[0])){$hersteller = $this->hersteller->get_info($id[0]);$items = $this->hersteller->list_items($id[0]);foreach ($items as $item){$pfad = array();$url = "/";foreach ($item["path"] as $path){$name = $path["Name"];if ($path["ID"] == $item["Father"]){$url .= "hersteller/".$id[0]."-".str_replace(" ", "-", $hersteller['Name']).".html?kat=".$path["ID"]."-".str_replace(" ", "-", str2url($path["Name"]));$link = '<a href="'.$url.'">'.$name.'</a>';$katIDs[$path["ID"]] = $name; #$katUrl[$path["ID"]] = $url;}else{$link = $name;}$pfad[] = $link;}$pfad = implode(" -> ", $pfad);$item_kats[] = $pfad;}$this->smarty->assign('items', $items);if (!empty($katIDs)){$katIDs = array_unique($katIDs);}else{$katIDs = array();}$this->smarty->assign("katIDs", $katIDs);if (!empty($item_kats)){$item_kats = array_unique($item_kats);}else{$item_kats = array();}$this->smarty->assign("item_kats", $item_kats);$this->smarty->assign('hersteller', $hersteller);$this->smarty->view('hersteller_items.tpl');}else{}}}