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


PHP config_get_global函数代码示例

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


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

示例1: get_all_users

 /**
  * Gets all users in the mantis database
  *
  * @return bool|mysqli_result
  */
 public function get_all_users()
 {
     $user_table = $this->get_mantis_table('user');
     $query = "SELECT id FROM {$user_table}\n          WHERE access_level < " . config_get_global('admin_site_threshold');
     $all_users = $this->mysqli->query($query);
     return $all_users;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.UserProjectView-Plugin,代码行数:12,代码来源:databaseapi.php

示例2: init

 function init()
 {
     // Get path to core folder
     $t_core_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
     // Include constants
     require_once $t_core_path . 'constant_api.php';
 }
开发者ID:QuestorX,项目名称:MantisBT-Plugin.BackgroundImageView,代码行数:7,代码来源:BackgroundImageView.php

示例3: wiki_init

/**
 * Initilise wiki engine
 * @return null
 * @access public
 */
function wiki_init()
{
    if (wiki_enabled()) {
        # handle legacy style wiki integration
        require_once config_get_global('class_path') . 'MantisCoreWikiPlugin.class.php';
        switch (config_get_global('wiki_engine')) {
            case 'dokuwiki':
                plugin_child('MantisCoreDokuwiki');
                break;
            case 'mediawiki':
                plugin_child('MantisCoreMediaWiki');
                break;
            case 'twiki':
                plugin_child('MantisCoreTwiki');
                break;
            case 'WikkaWiki':
                plugin_child('MantisCoreWikkaWiki');
                break;
            case 'xwiki':
                plugin_child('MantisCoreXwiki');
                break;
        }
        if (is_null(event_signal('EVENT_WIKI_INIT'))) {
            config_set_global('wiki_enable', OFF);
        }
    }
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:32,代码来源:wiki_api.php

示例4: init

 function init()
 {
     //mantisgraph_autoload();
     spl_autoload_register(array('MantisGraphPlugin', 'autoload'));
     $t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
     set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
 }
开发者ID:Kirill,项目名称:mantisbt,代码行数:7,代码来源:MantisGraph.php

示例5: access_denied

function access_denied()
{
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            $t_return_page = $_SERVER['PHP_SELF'];
            if (isset($_SERVER['QUERY_STRING'])) {
                $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url(string_sanitize_url($t_return_page));
            print_header_redirect('login_page.php?return=' . $t_return_page);
        }
    } else {
        if (auth_get_current_user_id() == user_get_id_by_name(config_get_global('anonymous_account'))) {
            if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
                $t_return_page = $_SERVER['PHP_SELF'];
                if (isset($_SERVER['QUERY_STRING'])) {
                    $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
                }
                $t_return_page = string_url(string_sanitize_url($t_return_page));
                echo '<center>';
                echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
                print_bracket_link('login_page.php?return=' . $t_return_page, lang_get('click_to_login'));
                echo '<p></p>';
                print_bracket_link('main_page.php', lang_get('proceed'));
                echo '</center>';
            }
        } else {
            echo '<center>';
            echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
            print_bracket_link('main_page.php', lang_get('proceed'));
            echo '</center>';
        }
    }
    exit;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:35,代码来源:access_api.php

示例6: config_get_access_parent

/**
 * Retrieves the access level needed to change the configuration option in the
 * project's parent (ALL_PROJECTS level if project, or file-level if all projects)
 * @param integer $p_project Project.
 * @param string  $p_option  Configuration option to retrieve.
 * @return integer access level
 */
function config_get_access_parent($p_project, $p_option)
{
    if ($p_project == ALL_PROJECTS) {
        return config_get_global('admin_site_threshold');
    } else {
        return config_get_access($p_option, null, ALL_PROJECTS);
    }
}
开发者ID:gtn,项目名称:mantisbt,代码行数:15,代码来源:manage_config_workflow_set.php

示例7: config_get_parent

/**
 * Retrieves the value of config option for the project's parent
 * (ALL_PROJECTS level if project, or file-level if all projects)
 * @param $p_project project
 * @param $p_option config option to retrieve
 * @return mixed config option value
 */
function config_get_parent($p_project, $p_option)
{
    if ($p_project == ALL_PROJECTS) {
        return config_get_global($p_option);
    } else {
        return config_get($p_option, null, null, ALL_PROJECTS);
    }
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:15,代码来源:manage_config_workflow_set.php

示例8: init

 function init()
 {
     spl_autoload_register(array('MantisKanbanPlugin', 'autoload'));
     $t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
     set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
     // register our custom tables
     #$GLOBALS['g_db_table']['mantis_team_user_table']    = '%db_table_prefix%_team_user%db_table_suffix%';
     #$GLOBALS['g_db_table']['mantis_team_table']         = '%db_table_prefix%_team%db_table_suffix%';
 }
开发者ID:aberad,项目名称:MantisKanban,代码行数:9,代码来源:MantisKanban.php

示例9: wiki_mediawiki_get_url_for_page_id

function wiki_mediawiki_get_url_for_page_id($p_page_id)
{
    $t_root_url = config_get_global('wiki_engine_url');
    $t_root_namespace = config_get('wiki_root_namespace');
    if (is_blank($t_root_namespace)) {
        $t_page_id = $p_page_id;
    } else {
        $t_page_id = $t_root_namespace . ':' . $p_page_id;
    }
    return $t_root_url . 'index.php/' . urlencode($t_page_id);
}
开发者ID:jin255ff,项目名称:company_website,代码行数:11,代码来源:wiki_mediawiki_api.php

示例10: menu

 function menu()
 {
     require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'userprojectapi.php';
     if (!userprojectapi::checkPluginIsRegisteredInWhiteboardMenu()) {
         userprojectapi::addPluginToWhiteboardMenu();
     }
     if ((!plugin_is_installed('WhiteboardMenu') || !file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
         return '<a href="' . plugin_page('UserProject') . '&sortVal=userName&sort=ASC">' . plugin_lang_get('menu_title') . '</a>';
     }
     return null;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.UserProjectView-Plugin,代码行数:11,代码来源:UserProjectView.php

示例11: resources

 /**
  * Create the resource link to load the chosen library.
  */
 function resources($p_event)
 {
     $markup = '';
     $plugin_path = config_get_global('path') . 'plugins/' . plugin_get_current();
     $style = $plugin_path . '/lib/chosen.min.css';
     $script = $plugin_path . '/js/chosen_for_mantisbt.js';
     $chosen_script = $plugin_path . '/lib/chosen.jquery.min.js';
     $markup .= '<link rel="stylesheet" type="text/css" href="' . $style . '" />';
     $markup .= '<script type="text/javascript" src="' . $chosen_script . '"></script>';
     $markup .= '<script type="text/javascript" src="' . $script . '"></script>';
     return $markup;
 }
开发者ID:bueltge,项目名称:Chosen-for-MantisBT,代码行数:15,代码来源:chosen.php

示例12: log_event

/**
 * Log an event
 * @param int $p_level
 * @param string $p_msg
 * @return null
 */
function log_event($p_level, $p_msg)
{
    global $g_log_levels;
    # check to see if logging is enabled
    $t_sys_log = config_get_global('log_level');
    if (0 == ($t_sys_log & $p_level)) {
        return;
    }
    $t_now = date(config_get_global('complete_date_format'));
    $t_level = $g_log_levels[$p_level];
    $t_plugin_event = '[' . $t_level . '] ' . $p_msg;
    if (function_exists('event_signal')) {
        event_signal('EVENT_LOG', array($t_plugin_event));
    }
    $t_php_event = $t_now . ' ' . $t_level . ' ' . $p_msg;
    $t_log_destination = config_get_global('log_destination');
    if (is_blank($t_log_destination)) {
        $t_destination = '';
    } else {
        # Use @ to avoid error when there is no delimiter in log destination
        @(list($t_destination, $t_modifiers) = explode(':', $t_log_destination, 2));
    }
    switch ($t_destination) {
        case 'file':
            error_log($t_php_event . PHP_EOL, 3, $t_modifiers);
            break;
        case 'firebug':
            if (!class_exists('FirePHP')) {
                if (file_exists(BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php')) {
                    require_once BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php';
                }
            }
            if (class_exists('FirePHP')) {
                static $firephp;
                if ($firephp === null) {
                    $firephp = FirePHP::getInstance(true);
                }
                $firephp->log($t_php_event);
                return;
            }
            // if firebug is not available, fall through
        // if firebug is not available, fall through
        default:
            # use default PHP error log settings
            error_log($t_php_event . PHP_EOL);
            break;
    }
    # If running from command line, echo log event to stdout
    if (php_sapi_name() == 'cli') {
        echo $t_php_event . PHP_EOL;
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:58,代码来源:logging_api.php

示例13: rss_calculate_key

/**
 * Calculates a key to be used for RSS authentication based on user name, cookie and password.
 * if the user changes his user name or password, then the key becomes invalid.
 * @param int $p_user_id
 * @return string
 */
function rss_calculate_key($p_user_id = null)
{
    if ($p_user_id === null) {
        $t_user_id = auth_get_current_user_id();
    } else {
        $t_user_id = $p_user_id;
    }
    $t_seed = config_get_global('rss_key_seed');
    $t_username = user_get_field($t_user_id, 'username');
    $t_password = user_get_field($t_user_id, 'password');
    $t_cookie = user_get_field($t_user_id, 'cookie_string');
    return md5($t_seed . $t_username . $t_cookie . $t_password);
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:19,代码来源:rss_api.php

示例14: print_page_head

 /**
  * Prints head elements of a page
  * @param $string
  */
 public function print_page_head($string)
 {
     html_page_top1($string);
     echo '<script language="javascript" type="text/javascript" src="' . SPECMANAGEMENT_PLUGIN_URL . 'files/checkbox.js"></script>';
     echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
     html_page_top2();
     if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
         require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
         $whiteboard_print_api = new whiteboard_print_api();
         $whiteboard_print_api->printWhiteboardMenu();
     }
     $this->print_plugin_menu();
 }
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:17,代码来源:specmanagement_print_api.php

示例15: bug_group_action_init

/**
 * Initialise bug action group api
 * @param string $p_action Custom action to run.
 * @return void
 */
function bug_group_action_init($p_action)
{
    $t_valid_actions = bug_group_action_get_commands(current_user_get_accessible_projects());
    $t_action = strtoupper($p_action);
    if (!isset($t_valid_actions[$t_action]) && !isset($t_valid_actions['EXT_' . $t_action])) {
        trigger_error(ERROR_GENERIC, ERROR);
    }
    $t_include_file = config_get_global('absolute_path') . 'bug_actiongroup_' . $p_action . '_inc.php';
    if (!file_exists($t_include_file)) {
        trigger_error(ERROR_GENERIC, ERROR);
    } else {
        require_once $t_include_file;
    }
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:19,代码来源:bug_group_action_api.php


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