Exemplo n.º 1
0
    case 'del':
        mymenus_admin_confirmdel($id, $redir);
        break;
    case 'delok':
        mymenus_admin_del($id, $redir);
        break;
    case 'delall':
        mymenus_admin_confirmdel(null, $redir, 'delallok');
        break;
    case 'delallok':
        mymenus_admin_delall($redir);
        break;
    case 'list':
    default:
        xoops_cp_header();
        mymenus_adminMenu(0, _MI_MYMENUS_MENUSMANAGER);
        echo mymenus_admin_list($start);
        xoops_cp_footer();
        break;
}
function mymenus_admin_list($start = 0)
{
    global $mymenusTpl, $limit;
    $myts =& MyTextSanitizer::getInstance();
    $this_handler =& xoops_getModuleHandler('menus', 'mymenus');
    $query = isset($_POST['query']) ? $_POST['query'] : null;
    $mymenusTpl->assign('query', $query);
    $criteria = new CriteriaCompo();
    if (!is_null($query)) {
        $crit = new CriteriaCompo(new Criteria('title', $myts->addSlashes($query) . '%', 'LIKE'));
        $criteria->add($crit);
Exemplo n.º 2
0
        mymenus_adminMenu(1, _MI_MYMENUS_MENUMANAGER);
        mymenus_admin_move($id, $weight);
        echo mymenus_admin_list($start);
        xoops_cp_footer();
        break;
    case 'toggle':
        xoops_cp_header();
        mymenus_adminMenu(1, _MI_MYMENUS_MENUMANAGER);
        mymenus_admin_toggle($id, $visible);
        echo mymenus_admin_list($start);
        xoops_cp_footer();
        break;
    case 'list':
    default:
        xoops_cp_header();
        mymenus_adminMenu(1, _MI_MYMENUS_MENUMANAGER);
        echo mymenus_admin_list($start);
        xoops_cp_footer();
        break;
}
function mymenus_admin_list($start = 0)
{
    global $mymenusTpl, $menu_id;
    $this_handler =& xoops_getModuleHandler('menu', 'mymenus');
    $criteria = new CriteriaCompo(new Criteria('mid', $menu_id));
    //$criteria->add(new Criteria('pid', 0));
    $count = $this_handler->getCount($criteria);
    $mymenusTpl->assign('count', $count);
    $criteria->setSort('weight');
    $criteria->setOrder('ASC');
    $menus = array();