| @@ 38-48 (lines=11) @@ | ||
| 35 | * @param integer $id |
|
| 36 | * @return false|array |
|
| 37 | */ |
|
| 38 | public function get_parent_items($id) { |
|
| 39 | ||
| 40 | $this->db->where('parent_id', $id); |
|
| 41 | $query = $this->db->get('menus_data'); |
|
| 42 | ||
| 43 | if ($query->num_rows > 0) { |
|
| 44 | return $query->result_array(); |
|
| 45 | } else { |
|
| 46 | return FALSE; |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * |
|
| @@ 134-145 (lines=12) @@ | ||
| 131 | * @param integer $id |
|
| 132 | * @return false|array |
|
| 133 | */ |
|
| 134 | public function get_item_position($id) { |
|
| 135 | ||
| 136 | $this->db->select('position'); |
|
| 137 | $this->db->where('id', $id); |
|
| 138 | $query = $this->db->get('menus_data', 1); |
|
| 139 | ||
| 140 | if ($query->num_rows() > 0) { |
|
| 141 | return $query->row_array(); |
|
| 142 | } else { |
|
| 143 | return FALSE; |
|
| 144 | } |
|
| 145 | } |
|
| 146 | ||
| 147 | /** |
|
| 148 | * Return url to page |
|
| @@ 682-691 (lines=10) @@ | ||
| 679 | return $access; |
|
| 680 | } |
|
| 681 | ||
| 682 | public function get_all_menus() { |
|
| 683 | $this->db->select('name, main_title'); |
|
| 684 | $query = $this->db->get('menus'); |
|
| 685 | ||
| 686 | if ($query->num_rows() > 0) { |
|
| 687 | return $query->result_array(); |
|
| 688 | } else { |
|
| 689 | return FALSE; |
|
| 690 | } |
|
| 691 | } |
|
| 692 | ||
| 693 | /** |
|
| 694 | * Display template file |
|