if (isset($_REQUEST) && $_REQUEST['action'] == 'Edit') { $save_ob = new saveform($db_table, $_REQUEST, array('title', 'module_id', 'icon'), 'id', "", "", false); $utils->redirect($_SERVER['PHP_SELF']); } if (isset($_REQUEST) && $_REQUEST['action'] == 'Insert') { $save_ob = new saveform($db_table, $_REQUEST, array('title', 'module_id', 'icon'), 'id', 'item_order', "", "", false); $utils->redirect($_SERVER['PHP_SELF']); } if (isset($_REQUEST) && $_REQUEST['action'] == 'Delete') { $save_ob = new saveform($db_table, $_REQUEST, $cols, 'id'); $utils->redirect($_SERVER['PHP_SELF']); } $listMenu = new nestable(); $listMenu->setTable($db_table); $listMenu->setColumns(array('id', 'title', 'icon', 'module_id', 'p_id')); $listMenu->setTypes(array('title' => 'text', 'module_id' => 'select', 'icon' => "text")); $listMenu->setCssClass(array('item_link' => 'chosen-select', 'icon' => "iconpicker", "module_id" => "form-control")); $listMenu->setSource(array('module_id' => array('cms_modules', 'title', "id"))); $listMenu->setExtraFlag(array("short_cut")); $listMenu->setOrder('item_order asc'); $listMenu->setField_id('id'); $listMenu->setField_Parent('p_id'); $listMenu->setParentValue(0); $listMenu->setEdit("editMenu"); $listMenu->setField_order('item_order'); $listMenu->setWhere(''); $listMenu->setEditParameters(array('id')); echo "<div class='box box-danger'>"; echo "<div class='box-header with-border'>"; echo $listMenu->getModuleButtons(); echo "</div>";
if (isset($_REQUEST) && $_REQUEST['action'] == 'Edit') { $save_ob = new saveform($db_table, $_REQUEST, array('item_label', 'item_link'), 'menu_id'); $utils->redirect($_SERVER['PHP_SELF']); } if (isset($_REQUEST) && $_REQUEST['action'] == 'Insert') { $save_ob = new saveform($db_table, $_REQUEST, array('item_label', 'item_link'), 'menu_id', 'item_order'); $utils->redirect($_SERVER['PHP_SELF']); } if (isset($_REQUEST) && $_REQUEST['action'] == 'Delete') { $save_ob = new saveform($db_table, $_REQUEST, $cols, 'menu_id'); $utils->redirect($_SERVER['PHP_SELF']); } $listMenu = new nestable(); $listMenu->setTable($db_table); $listMenu->setColumns(array('menu_id', 'item_label', 'item_link', 'p_id')); $listMenu->setTypes(array('item_label' => 'text', 'item_link' => 'select')); $listMenu->setCssClass(array('item_link' => 'chosen-select')); $listMenu->setSource(array('item_link' => array('cms_pages', 'title', "concat('ar/page',id,'/',replace(title,' ','-'))"))); $listMenu->setOrder('item_order asc'); $listMenu->setField_id('menu_id'); $listMenu->setField_Parent('p_id'); $listMenu->setParentValue(0); $listMenu->setEdit("editMenu"); $listMenu->setField_order('item_order'); $listMenu->setWhere(''); $listMenu->setEditParameters(array('menu_id')); echo "<div class='box box-danger'>"; echo "<div class='box-header with-border'>"; echo $listMenu->getModuleButtons(); echo "</div>"; echo "<div class='box-body'>";