예제 #1
0
    $aform = new XoopsThemeForm(_AMS_AM_MANAGEAUDIENCES, "audienceform", 'index.php', 'post');
    if ($id > 0) {
        $aform->addElement(new XoopsFormHidden('aid', $id));
    }
    $aform->addElement(new XoopsFormHidden('op', 'audience'));
    $aform->addElement(new XoopsFormText(_AMS_AM_AUDIENCENAME, 'aname', 12, 20, $audience), true);
    $aform->addElement(new XoopsFormSelectGroup(_AMS_AM_ACCESSRIGHTS, 'groups', true, $groups, 5, true), true);
    $aform->addElement(new XoopsFormButton('', 'submitaud', _AMS_AM_SAVE, 'submit'));
    $aform->display();
}
xoops_cp_header();
switch ($op) {
    case "newarticle":
        adminmenu(2);
        include_once XOOPS_ROOT_PATH . "/class/module.textsanitizer.php";
        newSubmissions();
        lastStories();
        break;
    case "audience":
        adminmenu(5);
        if (isset($_POST['submitaud'])) {
            $audience_handler =& xoops_getmodulehandler('audience', 'AMS');
            $gperm_handler =& xoops_gethandler('groupperm');
            if (isset($_POST['aid'])) {
                $audience =& $audience_handler->get($_POST['aid']);
            } else {
                $audience =& $audience_handler->create();
            }
            $audience->setVar('audience', $_POST['aname']);
            if ($audience_handler->insert($audience)) {
                $audid = $audience->getVar('audienceid');
예제 #2
0
파일: index.php 프로젝트: nouphet/rata
             break;
         case 'autostory':
             $total = Bulletin::countAutoStory($mydirname);
             $story_list = newSubmissions('autoStories', $limit, $start);
             $table_title = _AM_AUTOARTICLES;
             $mode = 'autostory';
             break;
         case 'expstory':
             $total = Bulletin::countExpired($mydirname);
             $story_list = newSubmissions('Expired', $limit, $start);
             $table_title = _AM_EXPARTS;
             $mode = '';
             break;
         default:
             $total = Bulletin::countPublished($mydirname);
             $story_list = newSubmissions('Published', $limit, $start);
             $table_title = _AM_PUB_ARTICLES;
             $mode = '';
             break;
     }
     $navi = '';
     if ($total > $limit) {
         $pagenav = new XoopsPageNav($total, $limit, $start, 'start', 'op=listall&statu=' . $statu);
         $navi = $pagenav->renderNav();
     }
     $asssigns = array('table_title' => $table_title, 'stories' => $story_list, 'mode' => $mode, 'navi' => $navi);
     break;
     //Allow each group configuration screen post
 //Allow each group configuration screen post
 case 'permition':
     xoops_cp_header();