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


PHP config::_UI_perm_denied方法代码示例

本文整理汇总了PHP中config::_UI_perm_denied方法的典型用法代码示例。如果您正苦于以下问题:PHP config::_UI_perm_denied方法的具体用法?PHP config::_UI_perm_denied怎么用?PHP config::_UI_perm_denied使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在config的用法示例。


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

示例1: get_ui

 /**
  * This function is responsible for creating the configuration GUI
  *
  * @param string sg        This is the subgroup name to load the gui for.
  *                        If nothing is passed, it will display the first
  *                         (alpha) subgroup
  *
  * @param array(string=>boolean) change_result
  *                        This is an array of what changes were made to the
  *                        configuration - if it is passed, it will display
  *                        the "Changes" message box.
  */
 function get_ui($grp, $sg = '0', $activeTab = '', $change_result = null)
 {
     global $_CONF, $LANG_CONFIG, $LANG_configsubgroups, $LANG_configsections;
     if (!array_key_exists($grp, $LANG_configsubgroups)) {
         $LANG_configsubgroups[$grp] = array();
     }
     if (!SEC_inGroup('Root')) {
         return config::_UI_perm_denied();
     }
     if (!isset($sg) or empty($sg)) {
         $sg = '0';
     }
     $t = new Template($_CONF['path_layout'] . 'admin/config');
     $t->set_file(array('main' => 'configuration.thtml', 'menugroup' => 'menu_element.thtml'));
     $token = SEC_createToken();
     $t->set_var('sec_token_name', CSRF_TOKEN);
     $t->set_var('sec_token', $token);
     $t->set_var('lang_save_changes', $LANG_CONFIG['save_changes']);
     $t->set_var('lang_reset_form', $LANG_CONFIG['reset_form']);
     $t->set_var('lang_changes_made', $LANG_CONFIG['changes_made']);
     $t->set_var('lang_search', $LANG_CONFIG['search']);
     if (isset($_POST['fieldname']) && $_POST['fieldname'] != '') {
         $fieldname = COM_applyFilter($_POST['fieldname']);
         $t->set_var('highlight', $fieldname);
     } else {
         $t->set_var('highlight', '');
     }
     // depreciated
     $t->set_var('gltoken_name', CSRF_TOKEN);
     $t->set_var('gltoken', $token);
     // end decpreciated
     $t->set_var('open_group', $grp);
     $groups = $this->_get_groups();
     $outerloopcntr = 1;
     if (count($groups) > 0) {
         $t->set_block('menugroup', 'subgroup-selector', 'subgroups');
         if (is_array($groups)) {
             foreach ($groups as $group) {
                 $t->set_var("select_id", $group === $grp ? 'id="current"' : '');
                 $t->set_var("group_select_value", $group);
                 $t->set_var("group_display", ucwords($group));
                 $subgroups = $this->_get_sgroups($group);
                 $innerloopcntr = 1;
                 foreach ($subgroups as $sgname => $sgroup) {
                     if ($grp == $group and $sg == $sgroup) {
                         $t->set_var('group_active_name', ucwords($group));
                         $t->set_var('group_name', $LANG_configsections[$group]['label']);
                         if (isset($LANG_configsubgroups[$group][$sgname])) {
                             $t->set_var('subgroup_active_name', $LANG_configsubgroups[$group][$sgname]);
                         } else {
                             if (isset($LANG_configsubgroups[$group][$sgroup])) {
                                 $t->set_var('subgroup_active_name', $LANG_configsubgroups[$group][$sgroup]);
                             } else {
                                 $t->set_var('subgroup_active_name', $sgname);
                             }
                         }
                         $t->set_var('select_id', 'id="current"');
                     } else {
                         $t->set_var('select_id', '');
                     }
                     $t->set_var('subgroup_name', $sgroup);
                     if (isset($LANG_configsubgroups[$group][$sgname])) {
                         $t->set_var('subgroup_display_name', $LANG_configsubgroups[$group][$sgname]);
                     } else {
                         $t->set_var('subgroup_display_name', $sgname);
                     }
                     if ($innerloopcntr == 1) {
                         $t->parse('subgroups', "subgroup-selector");
                     } else {
                         $t->parse('subgroups', "subgroup-selector", true);
                     }
                     $innerloopcntr++;
                 }
                 $t->set_var('cntr', $outerloopcntr);
                 $t->parse("menu_elements", "menugroup", true);
                 $outerloopcntr++;
             }
         }
     } else {
         $t->set_var('hide_groupselection', 'none');
     }
     $t->set_var('open_sg', $sg);
     $t->set_block('main', 'fieldset', 'sg_contents');
     $t->set_block('fieldset', 'notes', 'fs_notes');
     $t->set_block('main', 'tabs', 'sg_tabs');
     $ext_info = $this->_get_extended($sg, $grp);
     $docUrl = $this->_getConfigHelpDocument($grp, '');
     if ($docUrl != '') {
//.........这里部分代码省略.........
开发者ID:spacequad,项目名称:glfusion,代码行数:101,代码来源:config.class.php

示例2: get_ui

 /**
  * This function is responsible for creating the configuration GUI
  * 
  * @oaram string $grp     This is the group name to load the gui for.
  * @param string sg       This is the subgroup name to load the gui for.
  *                        If nothing is passed, it will display the first
  *                        (alpha) subgroup.
  * @param mixed  $change_result
  *                        This is an array of what changes were made to the
  *                        configuration - if it is passed, it will display
  *                        the "Changes" message box.
  */
 function get_ui($grp, $sg = '0', $change_result = null)
 {
     global $_CONF, $LANG_CONFIG, $LANG_configsubgroups, $LANG_tab, $LANG_fs, $_SCRIPTS, $LANG01;
     if (!array_key_exists($grp, $LANG_configsubgroups)) {
         $LANG_configsubgroups[$grp] = array();
     }
     // denied users that don't have access to configuration
     $groups = $this->_get_groups();
     if (empty($groups)) {
         return config::_UI_perm_denied();
     }
     if (!isset($sg) or empty($sg)) {
         $sg = '0';
         // get default subgroup for non Root user
         if (!SEC_inGroup('Root')) {
             $default_sg = $this->_get_sgroups($grp);
             if (!empty($default_sg)) {
                 $default_sg = array_values($default_sg);
                 $sg = $default_sg[0];
             } else {
                 return config::_UI_perm_denied();
             }
         }
     }
     $t = COM_newTemplate($_CONF['path_layout'] . 'admin/config');
     $t->set_file(array('main' => 'configuration.thtml', 'menugroup' => 'menu_element.thtml'));
     $link_message = $LANG01[139];
     $t->set_var('noscript', COM_getNoScript(false, '', $link_message));
     // Hide the Configuration as Javascript is currently required. If JS is enabled then the JS below will un-hide it
     $js = 'document.getElementById("geeklog_config_editor").style.display="";';
     $_SCRIPTS->setJavaScript($js, true);
     $t->set_var('gltoken_name', CSRF_TOKEN);
     $t->set_var('gltoken', SEC_createToken());
     // set javascript variable for autocomplete
     $js = $this->_UI_autocomplete_data();
     // set javascript variable for image spinner
     $js .= $this->_UI_js_image_spinner();
     $js .= "var frmGroupAction = '" . $_CONF['site_admin_url'] . "/configuration.php';";
     $_SCRIPTS->setJavaScript($js, true);
     $_SCRIPTS->setJavaScriptFile('admin.configuration', '/javascript/admin.configuration.js');
     $t->set_var('search_configuration_label', $LANG_CONFIG['search_configuration_label']);
     if (isset($_POST['search-configuration-cached'])) {
         $t->set_var('search_configuration_value', $_POST['search-configuration-cached']);
     } else {
         $t->set_var('search_configuration_value', '');
     }
     if (isset($_POST['tab-id-cached'])) {
         $t->set_var('tab_id_value', $_POST['tab-id-cached']);
     } else {
         $t->set_var('tab_id_value', '');
     }
     $t->set_var('lang_save_changes', $LANG_CONFIG['save_changes']);
     $t->set_var('lang_reset_form', $LANG_CONFIG['reset_form']);
     $t->set_var('open_group', $grp);
     $outerloopcntr = 1;
     if (count($groups) > 0) {
         $t->set_block('menugroup', 'subgroup-selector', 'subgroups');
         foreach ($groups as $group) {
             $t->set_var("select_id", $group === $grp ? 'id="current"' : '');
             $t->set_var("group_select_value", $group);
             $t->set_var("group_display", ucwords($group));
             $subgroups = $this->_get_sgroups($group);
             $innerloopcntr = 1;
             foreach ($subgroups as $sgname => $sgroup) {
                 if ($grp == $group and $sg == $sgroup) {
                     $t->set_var('group_active_name', ucwords($group));
                     if (isset($LANG_configsubgroups[$group][$sgname])) {
                         $t->set_var('subgroup_active_name', $LANG_configsubgroups[$group][$sgname]);
                     } else {
                         if (isset($LANG_configsubgroups[$group][$sgroup])) {
                             $t->set_var('subgroup_active_name', $LANG_configsubgroups[$group][$sgroup]);
                         } else {
                             $t->set_var('subgroup_active_name', $sgname);
                         }
                     }
                     $t->set_var('select_id', 'id="current"');
                 } else {
                     $t->set_var('select_id', '');
                 }
                 $t->set_var('subgroup_name', $sgroup);
                 if (isset($LANG_configsubgroups[$group][$sgname])) {
                     $t->set_var('subgroup_display_name', $LANG_configsubgroups[$group][$sgname]);
                 } else {
                     $t->set_var('subgroup_display_name', $sgname);
                 }
                 if ($innerloopcntr == 1) {
                     $t->parse('subgroups', "subgroup-selector");
                 } else {
//.........这里部分代码省略.........
开发者ID:alxstuart,项目名称:ajfs.me,代码行数:101,代码来源:config.class.php

示例3: get_ui

 /**
  * This function is responsible for creating the configuration GUI
  *
  * @param string sg        This is the subgroup name to load the gui for.
  *                        If nothing is passed, it will display the first
  *                         (alpha) subgroup
  *
  * @param array(string=>boolean) change_result
  *                        This is an array of what changes were made to the
  *                        configuration - if it is passed, it will display
  *                        the "Changes" message box.
  */
 function get_ui($grp, $sg = '0', $change_result = null)
 {
     global $_CONF, $LANG_CONFIG, $LANG_configsubgroups;
     if (!array_key_exists($grp, $LANG_configsubgroups)) {
         $LANG_configsubgroups[$grp] = array();
     }
     if (!SEC_inGroup('Root')) {
         return config::_UI_perm_denied();
     }
     if (!isset($sg) or empty($sg)) {
         $sg = '0';
     }
     $t = new Template($_CONF['path_layout'] . 'admin/config');
     $t->set_file(array('main' => 'configuration.thtml', 'menugroup' => 'menu_element.thtml'));
     $t->set_var('site_url', $_CONF['site_url']);
     $t->set_var('site_admin_url', $_CONF['site_admin_url']);
     $t->set_var('layout_url', $_CONF['layout_url']);
     $t->set_var('xhtml', XHTML);
     $t->set_var('gltoken_name', CSRF_TOKEN);
     $t->set_var('gltoken', SEC_createToken());
     $t->set_var('lang_save_changes', $LANG_CONFIG['save_changes']);
     $t->set_var('lang_reset_form', $LANG_CONFIG['reset_form']);
     $t->set_var('lang_changes_made', $LANG_CONFIG['changes_made']);
     $t->set_var('open_group', $grp);
     $groups = $this->_get_groups();
     $outerloopcntr = 1;
     if (count($groups) > 0) {
         $t->set_block('menugroup', 'subgroup-selector', 'subgroups');
         foreach ($groups as $group) {
             $t->set_var("select_id", $group === $grp ? 'id="current"' : '');
             $t->set_var("group_select_value", $group);
             $t->set_var("group_display", ucwords($group));
             $subgroups = $this->_get_sgroups($group);
             $innerloopcntr = 1;
             foreach ($subgroups as $sgname => $sgroup) {
                 if ($grp == $group and $sg == $sgroup) {
                     $t->set_var('group_active_name', ucwords($group));
                     if (isset($LANG_configsubgroups[$group][$sgname])) {
                         $t->set_var('subgroup_active_name', $LANG_configsubgroups[$group][$sgname]);
                     } else {
                         if (isset($LANG_configsubgroups[$group][$sgroup])) {
                             $t->set_var('subgroup_active_name', $LANG_configsubgroups[$group][$sgroup]);
                         } else {
                             $t->set_var('subgroup_active_name', $sgname);
                         }
                     }
                     $t->set_var('select_id', 'id="current"');
                 } else {
                     $t->set_var('select_id', '');
                 }
                 $t->set_var('subgroup_name', $sgroup);
                 if (isset($LANG_configsubgroups[$group][$sgname])) {
                     $t->set_var('subgroup_display_name', $LANG_configsubgroups[$group][$sgname]);
                 } else {
                     $t->set_var('subgroup_display_name', $sgname);
                 }
                 if ($innerloopcntr == 1) {
                     $t->parse('subgroups', "subgroup-selector");
                 } else {
                     $t->parse('subgroups', "subgroup-selector", true);
                 }
                 $innerloopcntr++;
             }
             $t->set_var('cntr', $outerloopcntr);
             $t->parse("menu_elements", "menugroup", true);
             $outerloopcntr++;
         }
     } else {
         $t->set_var('hide_groupselection', 'none');
     }
     $t->set_var('open_sg', $sg);
     $t->set_block('main', 'fieldset', 'sg_contents');
     $t->set_block('fieldset', 'notes', 'fs_notes');
     $ext_info = $this->_get_extended($sg, $grp);
     foreach ($ext_info as $fset => $params) {
         $fs_contents = '';
         foreach ($params as $name => $e) {
             $fs_contents .= $this->_UI_get_conf_element($grp, $name, $e['display_name'], $e['type'], $e['value'], $e['selectionArray'], false, $e['reset']);
         }
         $this->_UI_get_fs($grp, $fs_contents, $fset, $t);
     }
     $display = COM_siteHeader('none', $LANG_CONFIG['title']);
     $t->set_var('config_menu', $this->_UI_configmanager_menu($grp, $sg));
     if ($change_result != null and $change_result !== array()) {
         $t->set_var('change_block', $this->_UI_get_change_block($change_result));
     } else {
         $t->set_var('show_changeblock', 'none');
     }
//.........这里部分代码省略.........
开发者ID:Geeklog-Core,项目名称:test-framework,代码行数:101,代码来源:config.class.php


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