当前位置: 首页>>代码示例>>PHP>>正文


PHP xoops_getModuleOption函数代码示例

本文整理汇总了PHP中xoops_getModuleOption函数的典型用法代码示例。如果您正苦于以下问题:PHP xoops_getModuleOption函数的具体用法?PHP xoops_getModuleOption怎么用?PHP xoops_getModuleOption使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xoops_getModuleOption函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: publisherCpHeader

/**
 * Includes scripts in HTML header
 *
 * @return void
 */
function publisherCpHeader()
{
    xoops_cp_header();
    //cannot use xoTheme, some conflit with admin gui
    echo '<link type="text/css" href="' . XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css" rel="stylesheet" />
    <link type="text/css" href="' . PUBLISHER_URL . '/assets/css/publisher.css" rel="stylesheet" />
    <script type="text/javascript" src="' . PUBLISHER_URL . '/assets/js/funcs.js"></script>
    <script type="text/javascript" src="' . PUBLISHER_URL . '/assets/js/cookies.js"></script>
    <script type="text/javascript" src="' . XOOPS_URL . '/browse.php?Frameworks/jquery/jquery.js"></script>
    <!-- <script type="text/javascript" src="' . XOOPS_URL . '/browse.php?Frameworks/jquery/jquery-migrate-1.2.1.js"></script> -->
    <script type="text/javascript" src="' . XOOPS_URL . '/browse.php?Frameworks/jquery/plugins/jquery.ui.js"></script>
    <script type="text/javascript" src="' . PUBLISHER_URL . '/assets/js/ajaxupload.3.9.js"></script>
    <script type="text/javascript" src="' . PUBLISHER_URL . '/assets/js/publisher.js"></script>
    ';
}
开发者ID:trabisdementia,项目名称:publisher,代码行数:20,代码来源:functions.php

示例2: smarty_compiler_xoAdminNav

/**
 * xoAdminNav Smarty compiler plug-in
 *
 * @copyright    (c) 2000-2016 XOOPS Project (www.xoops.org)
 * @license          GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author           Andricq Nicolas (AKA MusS)
 * @since            2.5
 * @param $argStr
 * @param $smarty
 * @return string
 */
function smarty_compiler_xoAdminNav($argStr, &$smarty)
{
    global $xoops, $xoTheme;
    $icons = xoops_getModuleOption('typebreadcrumb', 'system');
    if ($icons == '') {
        $icons = 'default';
    }
    if (file_exists($xoops->path('modules/system/images/breadcrumb/' . $icons . '/index.html'))) {
        $url = $xoops->url('modules/system/images/breadcrumb/' . $icons . '/' . $argStr);
    } else {
        if (file_exists($xoops->path('modules/system/images/breadcrumb/default/' . $argStr))) {
            $url = $xoops->url('modules/system/images/icons/default/' . $argStr);
        }
    }
    return "\necho '" . addslashes($url) . "';";
}
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:27,代码来源:compiler.xoAdminNav.php

示例3: render

 /**
  * Render System BreadCrumb
  *
  */
 function render()
 {
     if (isset($GLOBALS['xoopsTpl'])) {
         $GLOBALS['xoopsTpl']->assign('xo_sys_breadcrumb', $this->_bread);
         $GLOBALS['xoopsTpl']->assign('xo_sys_help', $this->_help);
         if ($this->_tips) {
             if (xoops_getModuleOption('usetips', 'system')) {
                 $GLOBALS['xoopsTpl']->assign('xo_sys_tips', $this->_tips);
             }
         }
         // Call template
         if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $GLOBALS['xoopsConfig']['language'] . '/help/' . $this->_directory . '.html')) {
             $GLOBALS['xoopsTpl']->assign('help_content', XOOPS_ROOT_PATH . '/modules/system/language/' . $GLOBALS['xoopsConfig']['language'] . '/help/' . $this->_directory . '.html');
         } else {
             if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/help/' . $this->_directory . '.html')) {
                 $GLOBALS['xoopsTpl']->assign('help_content', XOOPS_ROOT_PATH . '/modules/system/language/english/help/' . $this->_directory . '.html');
             } else {
                 $GLOBALS['xoopsTpl']->assign('load_error', 1);
             }
         }
     } else {
         $out = $menu = '<style type="text/css" media="screen">@import ' . XOOPS_URL . '/modules/system/css/menu.css;</style>';
         $out .= '<ul id="xo-breadcrumb">';
         foreach ($this->_bread as $menu) {
             if ($menu['home']) {
                 $out .= '<li><a href="' . $menu['link'] . '" title="' . $menu['title'] . '"><img src="images/home.png" alt="' . $menu['title'] . '" class="home" /></a></li>';
             } else {
                 if ($menu['link'] != '') {
                     $out .= '<li><a href="' . $menu['link'] . '" title="' . $menu['title'] . '">' . $menu['title'] . '</a></li>';
                 } else {
                     $out .= '<li>' . $menu['title'] . '</li>';
                 }
             }
         }
         $out .= '</ul>';
         if ($this->_tips) {
             $out .= '<div class="tips">' . $this->_tips . '</div>';
         }
         echo $out;
     }
 }
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:45,代码来源:breadcrumb.php

示例4: foreach

     $i = 0;
     foreach (array_keys($avatars) as $i) {
         $avatar_list[$i] = $avatars[$i]->toArray();
         $avatar_list[$i]['type'] = $type;
         $avatar_list[$i]['count'] = count($avt_handler->getUser($avatars[$i]));
         if ($type == 'c') {
             $user = $avt_handler->getUser($avatars[$i]);
             if (is_array($user) && isset($user[0])) {
                 $avatar_list[$i]['user'] = $user[0];
             }
         }
     }
     $xoopsTpl->assign('avatars_list', $avatar_list);
     // Display Page Navigation
     if ($avtcount > xoops_getModuleOption('avatars_pager')) {
         $nav = new XoopsPageNav($avtcount, xoops_getModuleOption('avatars_pager', 'system'), $start, 'start', 'fct=avatars&amp;type=' . $type . '&amp;op=listavt');
         $xoopsTpl->assign('nav_menu', $nav->renderImageNav());
     }
     // Call Footer
     xoops_cp_footer();
     break;
 case 'edit':
     // Define main template
     $xoopsOption['template_main'] = 'system_avatars.html';
     // Call Header
     xoops_cp_header();
     // Define Stylesheet
     $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
     // Define Breadcrumb and tips
     $xoBreadCrumb->addLink(_AM_SYSTEM_AVATAR_MANAGER, system_adminVersion('avatars', 'adminpath'));
     $xoBreadCrumb->addLink(_AM_SYSTEM_AVATAR_EDIT);
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:main.php

示例5: getForm

 /**
  * @param string $mode
  *
  * @return XoopsThemeForm
  */
 function getForm($mode = 'edit')
 {
     if ($this->isNew()) {
         $title = _AM_SYSTEM_BLOCKS_ADDBLOCK;
         $modules = array(-1);
         $groups = array(XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS, XOOPS_GROUP_ADMIN);
         $this->setVar('block_type', 'C');
         $this->setVar('visible', 1);
         $op = 'save';
     } else {
         // Search modules
         $blocklinkmodule_handler =& xoops_getmodulehandler('blocklinkmodule');
         $criteria = new CriteriaCompo(new Criteria('block_id', $this->getVar('bid')));
         $blocklinkmodule = $blocklinkmodule_handler->getObjects($criteria);
         foreach ($blocklinkmodule as $link) {
             $modules[] = $link->getVar('module_id');
         }
         // Saerch perms
         $groupperm_handler =& xoops_gethandler('groupperm');
         $groups =& $groupperm_handler->getGroupIds('block_read', $this->getVar('bid'));
         switch ($mode) {
             case 'edit':
                 $title = _AM_SYSTEM_BLOCKS_EDITBLOCK;
                 break;
             case 'clone':
                 $title = _AM_SYSTEM_BLOCKS_CLONEBLOCK;
                 $this->setVar('bid', 0);
                 if ($this->isCustom()) {
                     $this->setVar('block_type', 'C');
                 } else {
                     $this->setVar('block_type', 'D');
                 }
                 break;
         }
         $op = 'save';
     }
     $form = new XoopsThemeForm($title, 'blockform', 'admin.php', 'post', true);
     if (!$this->isNew()) {
         $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_NAME, $this->getVar('name')));
     }
     // Side position
     $side_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'side', $this->getVar('side'));
     $side_select->addOptionArray(array(0 => _AM_SYSTEM_BLOCKS_SBLEFT, 1 => _AM_SYSTEM_BLOCKS_SBRIGHT, 3 => _AM_SYSTEM_BLOCKS_CBLEFT, 4 => _AM_SYSTEM_BLOCKS_CBRIGHT, 5 => _AM_SYSTEM_BLOCKS_CBCENTER, 7 => _AM_SYSTEM_BLOCKS_CBBOTTOMLEFT, 8 => _AM_SYSTEM_BLOCKS_CBBOTTOMRIGHT, 9 => _AM_SYSTEM_BLOCKS_CBBOTTOM));
     $form->addElement($side_select);
     // Order
     $form->addElement(new XoopsFormText(_AM_SYSTEM_BLOCKS_WEIGHT, 'weight', 2, 5, $this->getVar('weight')));
     // Display
     $form->addElement(new XoopsFormRadioYN(_AM_SYSTEM_BLOCKS_VISIBLE, 'visible', $this->getVar('visible')));
     // Visible In
     $mod_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_VISIBLEIN, 'modules', $modules, 5, true);
     $module_handler =& xoops_gethandler('module');
     $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
     $criteria->add(new Criteria('isactive', 1));
     $module_list = $module_handler->getList($criteria);
     $module_list[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
     $module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
     ksort($module_list);
     $mod_select->addOptionArray($module_list);
     $form->addElement($mod_select);
     // Title
     $form->addElement(new XoopsFormText(_AM_SYSTEM_BLOCKS_TITLE, 'title', 50, 255, $this->getVar('title')), false);
     if ($this->isNew() || $this->isCustom()) {
         $editor_configs = array();
         $editor_configs["name"] = "content_block";
         $editor_configs["value"] = $this->getVar('content', 'e');
         $editor_configs["rows"] = 20;
         $editor_configs["cols"] = 100;
         $editor_configs["width"] = "100%";
         $editor_configs["height"] = "400px";
         $editor_configs["editor"] = xoops_getModuleOption('blocks_editor', 'system');
         $form->addElement(new XoopsFormEditor(_AM_SYSTEM_BLOCKS_CONTENT, "content_block", $editor_configs), true);
         if (in_array($editor_configs["editor"], array('dhtmltextarea', 'textarea'))) {
             $ctype_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'c_type', $this->getVar('c_type'));
             $ctype_select->addOptionArray(array('H' => _AM_SYSTEM_BLOCKS_HTML, 'P' => _AM_SYSTEM_BLOCKS_PHP, 'S' => _AM_SYSTEM_BLOCKS_AFWSMILE, 'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE));
             $form->addElement($ctype_select);
         } else {
             $form->addElement(new XoopsFormHidden('c_type', 'H'));
         }
     } else {
         if ($this->getVar('template') != '') {
             $tplfile_handler =& xoops_gethandler('tplfile');
             $btemplate = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $this->getVar('bid'));
             if (count($btemplate) > 0) {
                 $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplate[0]->getVar('tpl_id') . '">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>'));
             } else {
                 $btemplate2 = $tplfile_handler->find('default', 'block', $this->getVar('bid'));
                 if (count($btemplate2) > 0) {
                     $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&amp;op=edittpl&amp;id=' . $btemplate2[0]->getVar('tpl_id') . '" rel="external">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>'));
                 }
             }
         }
         if ($this->getOptions() != false) {
             $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_OPTIONS, $this->getOptions()));
         } else {
             $form->addElement(new XoopsFormHidden('options', $this->getVar('options')));
//.........这里部分代码省略.........
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:101,代码来源:block.php

示例6: exit

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       (c) 2000-2016 XOOPS Project (www.xoops.org)
 * @license             GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html)
 * @author              Cointin Maxime (AKA Kraven30)
 * @package             system
 */
require_once XOOPS_ROOT_PATH . '/modules/system/class/maintenance.php';
// Check users rights
if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
    exit(_NOPERM);
}
//  Check is active
if (!xoops_getModuleOption('active_maintenance', 'system')) {
    redirect_header('admin.php', 2, _AM_SYSTEM_NOTACTIVE);
}
// Get Action type
$op = system_CleanVars($_REQUEST, 'op', 'list', 'string');
// Define main template
$GLOBALS['xoopsOption']['template_main'] = 'system_maintenance.tpl';
// Call Header
xoops_cp_header();
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
// Define scripts
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
$xoTheme->addScript('modules/system/js/admin.js');
switch ($op) {
    case 'list':
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:31,代码来源:main.php

示例7: __construct

 /**
  * @param string $title
  * @param string $name
  * @param string $action
  * @param string $method
  * @param bool   $addtoken
  * @param string $summary
  */
 public function __construct($title, $name, $action, $method = 'post', $addtoken = false, $summary = '')
 {
     //        global $xoTheme;
     //        $GLOBALS['xoTheme']->addScript(PUBLISHER_URL . '/assets/js/ui.core.js');
     //        $GLOBALS['xoTheme']->addScript(PUBLISHER_URL . '/assets/js/ui.tabs.js');
     //        $GLOBALS['xoTheme']->addStylesheet(PUBLISHER_URL . '/assets/css/jquery-ui-1.7.1.custom.css');
     $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
     $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css');
     $this->title = $title;
     $this->name = $name;
     $this->action = $action;
     $this->method = $method;
     $this->summary = $summary;
     if ($addtoken !== false) {
         $this->addElement(new XoopsFormHiddenToken());
     }
 }
开发者ID:trabisdementia,项目名称:publisher,代码行数:25,代码来源:themetabform.php

示例8: xoops_getModuleOption

 $order = "DESC";
 if (isset($_REQUEST['user_order']) && $_REQUEST['user_order'] == "ASC") {
     $requete_pagenav .= '&amp;user_order=ASC';
     $requete_search .= 'tris : ' . $order . '<br />';
 } else {
     //$order = "ASC";
     $requete_pagenav .= '&amp;user_order=DESC';
     $requete_search .= 'tris : ' . $order . '<br />';
 }
 $user_limit = xoops_getModuleOption('users_pager', 'system');
 if (isset($_REQUEST['user_limit'])) {
     $user_limit = $_REQUEST['user_limit'];
     $requete_pagenav .= '&amp;user_limit=' . htmlspecialchars($_REQUEST['user_limit']);
     $requete_search .= 'limit : ' . $user_limit . '<br />';
 } else {
     $requete_pagenav .= '&amp;user_limit=' . xoops_getModuleOption('users_pager', 'system');
     $requete_search .= 'limit : ' . $user_limit . '<br />';
 }
 $start = !empty($_REQUEST['start']) ? intval($_REQUEST['start']) : 0;
 if (isset($_REQUEST['selgroups'])) {
     if ($_REQUEST['selgroups'] != 0) {
         if (count($_REQUEST['selgroups']) == 1) {
             $groups = array(0 => $_REQUEST['selgroups']);
         } else {
             $groups = array_map("intval", $_REQUEST['selgroups']);
         }
     } else {
         $groups = array();
     }
     $requete_pagenav .= '&amp;selgroups=' . htmlspecialchars($_REQUEST['selgroups']);
 } else {
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:main.php

示例9: xoops_getModuleOption

}
// Parameters
$nb_aff = xoops_getModuleOption('banners_pager', 'system');
// Classes
$banner_Handler = xoops_getModuleHandler('banner', 'system');
$banner_finish_Handler = xoops_getModuleHandler('bannerfinish', 'system');
$banner_client_Handler = xoops_getModuleHandler('bannerclient', 'system');
// Get Action type
$op = system_CleanVars($_REQUEST, 'op', 'default', 'string');
// Define template
$GLOBALS['xoopsOption']['template_main'] = 'system_banners.tpl';
// Call header
xoops_cp_header();
// Define Stylesheet
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css');
// Define scripts
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.tablesorter.js');
$xoTheme->addScript('modules/system/js/admin.js');
// Define Breadcrumb and tips
$xoBreadCrumb->addLink(_AM_SYSTEM_BANNERS_NAV_MANAGER, system_adminVersion('banners', 'adminpath'));
switch ($op) {
    // Banners
    case 'banner_save':
        // Save banner
        if (!$GLOBALS['xoopsSecurity']->check()) {
            redirect_header('admin.php?fct=banners', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
        }
        $bid = system_CleanVars($_POST, 'bid', 0, 'int');
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:31,代码来源:main.php

示例10: getForm

 /**
  * @param bool $action
  *
  * @return XoopsThemeForm
  */
 public function getForm($action = false)
 {
     if ($action === false) {
         $action = $_SERVER['REQUEST_URI'];
     }
     if ($this->isNew()) {
         $s_cat_value = '';
         $a_mod_value = array();
         $r_mod_value = array();
         $r_block_value = array();
     } else {
         $sysperm_handler = xoops_getHandler('groupperm');
         $s_cat_value = $sysperm_handler->getItemIds('system_admin', $this->getVar('groupid'));
         $member_handler = xoops_getHandler('member');
         $thisgroup = $member_handler->getGroup($this->getVar('groupid'));
         $moduleperm_handler = xoops_getHandler('groupperm');
         $a_mod_value = $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid'));
         $r_mod_value = $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid'));
         $gperm_handler = xoops_getHandler('groupperm');
         $r_block_value = $gperm_handler->getItemIds('block_read', $this->getVar('groupid'));
     }
     xoops_load('XoopsFormLoader');
     xoops_load('XoopsLists');
     include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
     $title = $this->isNew() ? sprintf(_AM_SYSTEM_GROUPS_ADD) : sprintf(_AM_SYSTEM_GROUPS_EDIT);
     $form = new XoopsThemeForm($title, 'groupform', $action, 'post', true);
     $form->setExtra('enctype="multipart/form-data"');
     $name_text = new XoopsFormText(_AM_SYSTEM_GROUPS_NAME, 'name', 30, 50, $this->getVar('name'));
     $desc_text = new XoopsFormTextArea(_AM_SYSTEM_GROUPS_DESCRIPTION, 'desc', $this->getVar('description'));
     $system_catids = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_SYSTEMRIGHTS, '');
     $s_cat_checkbox_all = new XoopsFormCheckBox('', 'catbox', 1);
     $s_cat_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL);
     $s_cat_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"catbox\" , \"system_catids[]\");' ");
     $s_cat_checkbox_all->setClass('xo-checkall');
     $system_catids->addElement($s_cat_checkbox_all);
     $s_cat_checkbox = new XoopsFormCheckBox('', 'system_catids', $s_cat_value);
     $s_cat_checkbox->columns = 6;
     $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin/';
     $dirlist = XoopsLists::getDirListAsArray($admin_dir);
     foreach ($dirlist as $file) {
         include XOOPS_ROOT_PATH . '/modules/system/admin/' . $file . '/xoops_version.php';
         if (!empty($modversion['category'])) {
             if (xoops_getModuleOption('active_' . $file, 'system') == 1) {
                 $s_cat_checkbox->addOption($modversion['category'], $modversion['name']);
             }
         }
         unset($modversion);
     }
     unset($dirlist);
     $system_catids->addElement($s_cat_checkbox);
     $admin_mids = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_ACTIVERIGHTS, '');
     $s_admin_checkbox_all = new XoopsFormCheckBox('', 'adminbox', 1);
     $s_admin_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL);
     $s_admin_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"adminbox\" , \"admin_mids[]\");' ");
     $s_admin_checkbox_all->setClass('xo-checkall');
     $admin_mids->addElement($s_admin_checkbox_all);
     $a_mod_checkbox = new XoopsFormCheckBox('', 'admin_mids[]', $a_mod_value);
     $a_mod_checkbox->columns = 5;
     $module_handler = xoops_getHandler('module');
     $criteria = new CriteriaCompo(new Criteria('hasadmin', 1));
     $criteria->add(new Criteria('isactive', 1));
     $criteria->add(new Criteria('dirname', 'system', '<>'));
     $a_mod_checkbox->addOptionArray($module_handler->getList($criteria));
     $admin_mids->addElement($a_mod_checkbox);
     $read_mids = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_ACCESSRIGHTS, '');
     $s_mod_checkbox_all = new XoopsFormCheckBox('', 'readbox', 1);
     $s_mod_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL);
     $s_mod_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"readbox\" , \"read_mids[]\");' ");
     $s_mod_checkbox_all->setClass('xo-checkall');
     $read_mids->addElement($s_mod_checkbox_all);
     $r_mod_checkbox = new XoopsFormCheckBox('', 'read_mids[]', $r_mod_value);
     $r_mod_checkbox->columns = 5;
     $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
     $criteria->add(new Criteria('isactive', 1));
     $r_mod_checkbox->addOptionArray($module_handler->getList($criteria));
     $read_mids->addElement($r_mod_checkbox);
     $criteria = new CriteriaCompo(new Criteria('isactive', 1));
     $criteria->setSort('mid');
     $criteria->setOrder('ASC');
     $module_list = $module_handler->getList($criteria);
     $module_list[0] = _AM_SYSTEM_GROUPS_CUSTOMBLOCK;
     $block_handler = xoops_getHandler('block');
     $blocks_obj = $block_handler->getObjects(new Criteria('mid', "('" . implode("', '", array_keys($module_list)) . "')", 'IN'), true);
     $blocks_module = array();
     foreach (array_keys($blocks_obj) as $bid) {
         $title = $blocks_obj[$bid]->getVar('title');
         $blocks_module[$blocks_obj[$bid]->getVar('mid')][$blocks_obj[$bid]->getVar('bid')] = empty($title) ? $blocks_obj[$bid]->getVar('name') : $title;
     }
     ksort($blocks_module);
     $r_block_tray = new XoopsFormElementTray(_AM_SYSTEM_GROUPS_BLOCKRIGHTS, '<br><br>');
     $s_checkbox_all = new XoopsFormCheckBox('', 'blocksbox', 1);
     $s_checkbox_all->addOption('allbox', _AM_SYSTEM_ALL);
     $s_checkbox_all->setExtra(" onclick='xoopsCheckGroup(\"groupform\", \"blocksbox\" , \"read_bids[]\");' ");
     $s_checkbox_all->setClass('xo-checkall');
     $r_block_tray->addElement($s_checkbox_all);
//.........这里部分代码省略.........
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:101,代码来源:group.php

示例11: XoopsFormText

$cform->addElement(new XoopsFormText(_CM_TITLE, 'com_title', 50, 255, $com_title), true);
// Start add by voltan
if (!($com_user == '' && $com_email == '') || !$xoopsUser) {
    $cform->addElement(new XoopsFormText(_CM_USER, 'com_user', 50, 60, $com_user), true);
    $cform->addElement(new XoopsFormText(_CM_EMAIL, 'com_email', 50, 60, $com_email), true);
    $cform->addElement(new XoopsFormText(_CM_URL, 'com_url', 50, 60, $com_url), false);
}
// End add by voltan
$icons_radio = new XoopsFormRadio(_MESSAGEICON, 'com_icon', $com_icon);
$subject_icons = XoopsLists::getSubjectsList();
foreach ($subject_icons as $iconfile) {
    $icons_radio->addOption($iconfile, '<img src="' . XOOPS_URL . '/images/subject/' . $iconfile . '" alt="" />');
}
$cform->addElement($icons_radio);
// editor
$editor = xoops_getModuleOption('comments_editor', 'system');
if (class_exists('XoopsFormEditor')) {
    $configs = array('name' => 'com_text', 'value' => $com_text, 'rows' => 25, 'cols' => 90, 'width' => '100%', 'height' => '400px', 'editor' => $editor);
    $cform->addElement(new XoopsFormEditor(_CM_MESSAGE, 'com_text', $configs, false, $onfailure = 'textarea'));
} else {
    $cform->addElement(new XoopsFormDhtmlTextArea(_CM_MESSAGE, 'com_text', $com_text, 10, 50), true);
}
$option_tray = new XoopsFormElementTray(_OPTIONS, '<br />');
$button_tray = new XoopsFormElementTray('', '&nbsp;');
if (is_object($xoopsUser)) {
    if (isset($xoopsModuleConfig['com_anonpost'])) {
        if ($xoopsModuleConfig['com_anonpost'] == 1) {
            $noname = !empty($noname) ? 1 : 0;
            $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname);
            $noname_checkbox->addOption(1, _POSTANON);
            $option_tray->addElement($noname_checkbox);
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:comment_form.php

示例12: xoops_gethandler

 $all_ok = false;
 if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
     $sysperm_handler =& xoops_gethandler('groupperm');
     $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups);
 } else {
     $all_ok = true;
 }
 xoops_load('xoopslists');
 $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
 $dirlist = XoopsLists::getDirListAsArray($admin_dir);
 $inactive_section = array('blocksadmin', 'groups', 'modulesadmin', 'preferences', 'tplsets');
 foreach ($dirlist as $directory) {
     if (file_exists($admin_dir . '/' . $directory . '/xoops_version.php')) {
         require $admin_dir . '/' . $directory . '/xoops_version.php';
         if ($modversion['hasAdmin']) {
             if (xoops_getModuleOption('active_' . $directory)) {
                 $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
                 if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
                     $menu['file'] = $directory;
                     $menu['title'] = trim($modversion['name']);
                     $menu['desc'] = str_replace('<br />', ' ', $modversion['description']);
                     $menu['icon'] = $modversion['image'];
                     $menu['status'] = true;
                 }
             } else {
                 $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
                 if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
                     $menu['file'] = $directory;
                     $menu['title'] = trim($modversion['name']);
                     $menu['desc'] = str_replace('<br />', ' ', $modversion['description']);
                     $menu['icon'] = $modversion['image'];
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:admin.php

示例13: exit

//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
// Author: Kazumi Ono (AKA onokazu)                                          //
// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
// Check users rights
if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
    exit(_NOPERM);
}
//  Check is active
if (!xoops_getModuleOption('active_smilies', 'system')) {
    redirect_header('admin.php', 2, _AM_SYSTEM_NOTACTIVE);
}
// Parameters
$nb_smilies = xoops_getModuleOption('smilies_pager', 'system');
$mimetypes = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png');
$upload_size = 500000;
// Get Action type
$op = system_CleanVars($_REQUEST, 'op', 'list', 'string');
// Get smilies handler
$smilies_Handler =& xoops_getModuleHandler("smilies", "system");
// Define main template
$xoopsOption['template_main'] = 'system_smilies.html';
// Call Header
xoops_cp_header();
$xoBreadCrumb->addLink(_AM_SYSTEM_SMILIES_NAV_MANAGER, system_adminVersion('smilies', 'adminpath'));
switch ($op) {
    case 'list':
    default:
        // Define Stylesheet
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:main.php

示例14: system_CleanVars

     $comments_module = $_REQUEST['comments_module'];
 }
 $comments_status = system_CleanVars($_REQUEST, 'comments_status', 0, 'int');
 if ($comments_status > 0) {
     $criteria->add(new Criteria('com_status', $comments_status));
     $comments_status = $_REQUEST['comments_status'];
 }
 $criteria->setSort('com_created');
 $criteria->setOrder('DESC');
 $comments_count = $comments_Handler->getCount($criteria);
 $xoopsTpl->assign('comments_count', $comments_count);
 if ($comments_count > 0) {
     $comments_start = system_CleanVars($_REQUEST, 'comments_start', 0, 'int');
     $comments_limit = system_CleanVars($_REQUEST, 'comments_limit', 0, 'int');
     if (!in_array($comments_limit, $limit_array)) {
         $comments_limit = xoops_getModuleOption('comments_pager', 'system');
     }
     $criteria->setLimit($comments_limit);
     $criteria->setStart($comments_start);
     $comments_arr = $comments_Handler->getObjects($criteria, true);
 }
 $form = '<form action="admin.php?fct=comments" method="post">
         <select name="comments_module">';
 foreach ($module_array as $k => $v) {
     $sel = '';
     if ($k == $module) {
         $sel = ' selected="selected"';
     }
     $form .= '<option value="' . $k . '"' . $sel . '>' . $v . '</option>';
 }
 $form .= '</select>&nbsp;<select name="comments_status">';
开发者ID:RanLee,项目名称:Xoops_demo,代码行数:31,代码来源:main.php

示例15: form_edit

 function form_edit($bid, $mode = 'edit')
 {
     $bid = intval($bid);
     //HACK by domifara
     $block = new XoopsBlock($bid);
     if (!$block->getVar('bid')) {
         // new defaults
         $bid = 0;
         $mode = 'new';
         $block->setVar('mid', 0);
         $block->setVar('block_type', 'C');
     }
     switch ($mode) {
         case 'clone':
             $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM;
             $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE;
             $next_op = 'clone_ok';
             // breadcrumbs
             $breadcrumbsObj =& AltsysBreadcrumbs::getInstance();
             $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM);
             break;
         case 'new':
             $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM;
             $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW;
             $next_op = 'new_ok';
             // breadcrumbs
             $breadcrumbsObj =& AltsysBreadcrumbs::getInstance();
             $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM);
             break;
         case 'edit':
         default:
             $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM;
             $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT;
             $next_op = 'edit_ok';
             // breadcrumbs
             $breadcrumbsObj =& AltsysBreadcrumbs::getInstance();
             $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM);
             break;
     }
     $is_custom = in_array($block->getVar('block_type'), array('C', 'E')) ? true : false;
     $block_template = $block->getVar('template', 'n');
     $block_template_tplset = '';
     if (!$is_custom && $block_template) {
         // find template of the block
         $tplfile_handler =& xoops_gethandler('tplfile');
         $found_templates = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', null, null, $block_template);
         $block_template_tplset = count($found_templates) > 0 ? $GLOBALS['xoopsConfig']['template_set'] : 'default';
     }
     //HACK by domifara
     /*
     	if ( !($block->getVar('c_type')) ){
     		$block->setVar('c_type','S');
     	}
     */
     $block_data = $this->preview_request + array('bid' => $bid, 'name' => $block->getVar('name', 'n'), 'title' => $block->getVar('title', 'n'), 'weight' => intval($block->getVar('weight')), 'bcachetime' => intval($block->getVar('bcachetime')), 'side' => intval($block->getVar('side')), 'visible' => intval($block->getVar('visible')), 'template' => $block_template, 'template_tplset' => $block_template_tplset, 'options' => $block->getVar('options'), 'content' => $block->getVar('content', 'n'), 'is_custom' => $is_custom, 'type' => $block->getVar('block_type'), 'ctype' => $block->getVar('c_type'));
     $block4assign = array('name_raw' => $block_data['name'], 'title_raw' => $block_data['title'], 'content_raw' => $block_data['content'], 'cell_position' => $this->renderCell4BlockPosition($block_data), 'cell_module_link' => $this->renderCell4BlockModuleLink($block_data), 'cell_group_perm' => $this->renderCell4BlockReadGroupPerm($block_data), 'cell_options' => $this->renderCell4BlockOptions($block_data), 'content_preview' => $this->previewContent($block_data)) + $block_data;
     // display
     require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
     $tpl = new D3Tpl();
     //dhtml
     include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
     if ($block_data['ctype'] == 'H' || empty($block_data['ctype'])) {
         $editor_configs = array();
         $editor_configs["name"] = "content_block";
         $editor_configs["value"] = $block_data['content'];
         $editor_configs["rows"] = 20;
         $editor_configs["cols"] = 100;
         $editor_configs["width"] = "100%";
         $editor_configs["height"] = "400px";
         $editor_configs["editor"] = xoops_getModuleOption('blocks_editor', 'system');
         $form = new XoopsFormEditor('', "textarea_content", $editor_configs);
         $rendered = $form->render();
         $tpl->assign('altsys_x25_dhtmltextarea', $rendered);
     } else {
         $form = new XoopsFormDhtmlTextArea('', 'textarea_content', $block_data['content'], 80, 20);
         $rendered = $form->render();
         $rendered = '<div id="textarea_content_bbcode_buttons_pre" style="display:block;">' . str_replace(array('<textarea', '</textarea><br />'), array('</div><textarea', '</textarea><div id="textarea_content_bbcode_buttons_post" style="display:block;">'), $rendered) . '</div>';
         $tpl->assign('altsys_x25_dhtmltextarea', $rendered);
     }
     $tpl->assign(array('target_dirname' => $this->target_dirname, 'target_mname' => $this->target_mname, 'language' => $this->lang, 'cachetime_options' => $this->cachetime_options, 'ctype_options' => $this->ctype_options, 'block' => $block4assign, 'op' => $next_op, 'form_title' => $form_title, 'submit_button' => $button_value, 'common_fck_installed' => file_exists(XOOPS_ROOT_PATH . '/common/fckeditor/fckeditor.js'), 'gticket_hidden' => $GLOBALS['xoopsGTicket']->getTicketHtml(__LINE__, 1800, 'myblocksadmin')));
     //HACK by domifara
     $tpl->display('db:altsys_main_myblocksadmin_edit_4x25.html');
     return;
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:84,代码来源:MyBlocksAdminForX25.class.php


注:本文中的xoops_getModuleOption函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。