<?php if (!defined('XOOPS_ROOT_PATH')) { exit; } $root = XCube_Root::getSingleton(); $op = $root->mContext->mRequest->getRequest('op'); $op = empty($op) ? '' : $op; $class = new multimenu($menu_num); switch ($op) { case "new": $class->im_admin_new(); break; case "edit": $class->im_admin_edit(); break; case "update": $class->im_admin_update(); break; case "del": $class->im_admin_del(); break; case "move": $class->im_admin_move(); $class->im_admin_list(); break; default: $class->im_admin_list(); break; }
function list_groups() { global $xoopsUser, $xoopsConfig, $xoopsDB; global $xoopsModule, $block_arr, $xoops_system_url; foreach (array_keys($block_arr) as $i) { $item_list[$block_arr[$i]->getVar("bid")] = $block_arr[$i]->getVar("title"); } $form = new MyXoopsGroupPermForm('', 1, 'block_read', _MD_AM_ADGS); $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); foreach ($item_list as $item_id => $item_name) { $form->addItem($item_id, $item_name); } echo $form->render(); } if (!empty($_POST['submit'])) { include "mygroupperm.php"; redirect_header(XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/admin/myblocksadmin.php", 1, _MD_AM_DBUPDATED); } xoops_cp_header(); // for multimenu admin menu //echo "<h3 style='text-align:left;'>".$xoopsModule->name()."</h3>\n" ; require 'admin_function.php'; $class = new multimenu($menu_num); $class->mm_admin_menu(0, _AM_BADMIN); //echo "<h4 style='text-align:left;'>"._AM_BADMIN."</h4>\n" ; list_blocks(); if (!defined('XOOPS_CUBE_LEGACY')) { list_groups(); } xoops_cp_footer();