Revision 294 | Revision 296 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?php/*** @author Lars Tiefland* @copyright 2016*/class Navigation{public function __construct(){$nav = array();$CI = &get_instance();$CI->load->model('category_model', 'category');$CI->db->select('id,name,Beschreibung,short_line_1');$CI->db->order_by('kennung', 'ASC');$res = $CI->db->get_where('directory', array('Father' => -1,'language' => 'DE','sichtbar' => 1,'status' => 0,));//$lang_strings = $res->result_array();while ($row = $res->unbuffered_row('array')){$row['dirLink'] = $CI->category->get_link($row['id']);$row['sub'] = $this->get_sub($row['id']);$nav[]['top'][] = $row;}$CI->smarty->assign('nav', $nav);$CI->smarty->view('top_navigation.tpl');}private function get_sub($id){$sub=array();$CI = &get_instance();$CI->load->model('category_model', 'category');$CI->db->select('id,name,Beschreibung,short_line_1');$CI->db->order_by('kennung', 'ASC');$res = $CI->db->get_where('directory', array('Father' => $id,'language' => 'DE','status' => 0,));while($row=$res->unbuffered_row('array')){$row['dirLink'] = $CI->category->get_link($row['id']);$sub[]=$row;}return $row;}}?>