示例#1
0
include "../../common/top.php";
include '../../common/header.php';
include 'config.php';
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'>";
示例#2
0
include "../../common/top.php";
include '../../common/header.php';
include 'config.php';
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'>";
示例#3
0
include 'config.php';
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') {
    $_REQUEST['lang'] = $cmsMlang;
    $save_ob = new saveform($db_table, $_REQUEST, array('item_label', 'item_link', 'lang'), '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']);
}
//echo $utils->lang_switcher();
$listMenu = new nestable();
$listMenu->setTable($db_table);
$listMenu->setFilter(array(array("lang", "selectLang", array("cms_langs", "title", "lang", "active='1'"))));
$listMenu->setColumns(array('menu_id', 'item_label', 'item_link', 'p_id', 'lang'));
$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('" . $cmsMlang . "/page',id,'/',replace(title,' ','-'))", " lang='{$cmsMlang}' ")));
$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');
$default_lang = $utils->lookupField('cms_langs', 'id', 'lang', $table_id, 'is_default="1"');
if ($_REQUEST['lang'] != "") {
    $listMenu->setWhere(array('lang' => $_REQUEST['lang']));