23 include_once __DIR__ .
'/header.php';
29 $xoops->header(
'admin:menus/menus_admin_menus.tpl');
32 $xoops->theme()->addStylesheet(
'modules/system/css/admin.css');
35 $op =Request::getCmd(
'op',
'list');
36 $id = Request::getInt(
'id', 0);
37 $limit = Request::getInt(
'limit', 15);
38 $start = Request::getInt(
'start', 0);
46 $obj =
$helper->getHandlerMenus()->create();
55 $id = Request::getInt(
'id', 0);
62 if (!
$xoops->security()->check()) {
63 $xoops->redirect(
'admin_menus.php', 3, implode(
'<br />',
$xoops->security()->getErrors()));
68 $id = Request::getInt(
'id', 0);
69 if (isset(
$id) &&
$id !=0) {
72 $obj =
$helper->getHandlerMenus()->create();
75 $obj->setVar(
'title', Request::getString(
'title',
''));
77 if (
$helper->getHandlerMenus()->insert($obj)) {
78 $xoops->redirect(
'admin_menus.php', 2, implode(
'<br />',
$msg));
80 echo
$xoops->alert(
'error', $obj->getHtmlErrors());
86 $ok = Request::getInt(
'ok', 0);
90 if (!
$xoops->security()->check()) {
91 $xoops->redirect(
'admin_menus.php', 3, implode(
',',
$xoops->security()->getErrors()));
93 if (
$helper->getHandlerMenus()->delete($obj)) {
94 $this_handler =
$helper->getHandlerMenu();
99 echo
$xoops->alert(
'error', $obj->getHtmlErrors());
103 array(
'ok' => 1,
'id' =>
$id,
'op' =>
'del'),
104 $helper->url(
'admin/admin_menus.php'),
116 $this_handler =
$helper->getHandlerMenus();
118 $query = Request::getString(
'query',
'');
140 $xoops->tpl()->assign(
'nav_menu', $nav->renderNav(2));
143 $objs = $this_handler->getObjects(
$criteria);
145 foreach ($objs as $obj) {
146 $xoops->tpl()->append(
'objs', $obj->getValues());
if(!is_object($module)||!$module->getVar('isactive')) $msg