X7ROOT File Manager
Current Path:
/home/jurarevi/beta.jurareview.ro/application/controllers
home
/
jurarevi
/
beta.jurareview.ro
/
application
/
controllers
/
📁
..
📄
announcements.php
(2.85 KB)
📄
chapters.php
(8.95 KB)
📄
config.php
(2.01 KB)
📄
contact.php
(2.52 KB)
📄
headerFooter.php
(1.39 KB)
📄
home.php
(731 B)
📄
index.html
(114 B)
📄
login.php
(925 B)
📄
menu.php
(2.19 KB)
📄
pagini.php
(3.86 KB)
📄
search.php
(1.19 KB)
📄
sidebars.php
(2.18 KB)
📄
test.php
(773 B)
📄
volumes.php
(8.79 KB)
📄
welcome.php
(770 B)
Editing: menu.php
<?php class Menu extends MY_Controller{ function __construct() { parent::__construct(); $this->load->model('menu_model'); $this->load->model('sidebars_model'); } public function index() { $data = array(); $data['page_title'] = 'Lista meniuri'; $data['menus'] = $this->menu_model->getFormatedMenuList(); $this->load->view('common/header', $data); $this->load->view('admin/admin_menu', $data); $this->load->view('admin/menus_edit', $data); $this->load->view('common/footer', $data); } public function updateParents() { if (!empty($_POST['existing']) && is_array($_POST['existing'])) { foreach ($_POST['existing'] as $id => $menu) { if (!empty($menu['text'])) { if (empty($menu['url'])) { $menu['url'] = '#'; } $this->menu_model->updateMenu($id, $menu['text'], $menu['url'], -1); } } } if (!empty($_POST['new']['text'])) { if (empty($_POST['new']['url'])){ $_POST['new']['url'] = '#'; } $this->menu_model->insertMenu($_POST['new']['text'], $_POST['new']['url'], -1); } header("Location: /menu"); } public function updateChildren() { if (!empty($_POST['existing']) && is_array($_POST['existing'])) { foreach ($_POST['existing'] as $id => $menu) { if (!empty($menu['text']) && !empty($menu['url']) && !empty($menu['parent'])) { $this->menu_model->updateMenu($id, $menu['text'], $menu['url'], $menu['parent']); } } } if (!empty($_POST['new']['text']) && !empty($_POST['new']['url']) && !empty($_POST['new']['parent'])) { $this->menu_model->insertMenu($_POST['new']['text'], $_POST['new']['url'], $_POST['new']['parent']); } header("Location: /menu"); } public function deleteMenu($id) { $this->menu_model->deleteMenu($id); header("Location: /menu"); } }
Upload File
Create Folder