當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpbb_check_and_display_sql_report函數代碼示例

本文整理匯總了PHP中phpbb_check_and_display_sql_report函數的典型用法代碼示例。如果您正苦於以下問題:PHP phpbb_check_and_display_sql_report函數的具體用法?PHP phpbb_check_and_display_sql_report怎麽用?PHP phpbb_check_and_display_sql_report使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了phpbb_check_and_display_sql_report函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: page_footer

/**
* Generate page footer
*
* @param bool $run_cron Whether or not to run the cron
* @param bool $display_template Whether or not to display the template
* @param bool $exit_handler Whether or not to run the exit_handler()
*/
function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
{
    global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
    global $request, $phpbb_dispatcher, $phpbb_admin_path;
    // A listener can set this variable to `true` when it overrides this function
    $page_footer_override = false;
    /**
     * Execute code and/or overwrite page_footer()
     *
     * @event core.page_footer
     * @var	bool	run_cron			Shall we run cron tasks
     * @var	bool	page_footer_override	Shall we return instead of running
     *										the rest of page_footer()
     * @since 3.1.0-a1
     */
    $vars = array('run_cron', 'page_footer_override');
    extract($phpbb_dispatcher->trigger_event('core.page_footer', compact($vars)));
    if ($page_footer_override) {
        return;
    }
    phpbb_check_and_display_sql_report($request, $auth, $db);
    $template->assign_vars(array('DEBUG_OUTPUT' => phpbb_generate_debug_output($db, $config, $auth, $user, $phpbb_dispatcher), 'TRANSLATION_INFO' => !empty($user->lang['TRANSLATION_INFO']) ? $user->lang['TRANSLATION_INFO'] : '', 'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited'), 'U_ACP' => $auth->acl_get('a_') && !empty($user->data['is_registered']) ? append_sid("{$phpbb_admin_path}index.{$phpEx}", false, true, $user->session_id) : ''));
    // Call cron-type script
    $call_cron = false;
    if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('_cron.lock_check')) {
        $call_cron = true;
        $time_now = !empty($user->time_now) && is_int($user->time_now) ? $user->time_now : time();
        // Any old lock present?
        if (!empty($config['cron_lock'])) {
            $cron_time = explode(' ', $config['cron_lock']);
            // If 1 hour lock is present we do not call cron.php
            if ($cron_time[0] + 3600 >= $time_now) {
                $call_cron = false;
            }
        }
    }
    // Call cron job?
    if ($call_cron) {
        global $phpbb_container;
        $cron = $phpbb_container->get('cron.manager');
        $task = $cron->find_one_ready_task();
        if ($task) {
            $url = $task->get_url();
            $template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />');
        } else {
            $cache->put('_cron.lock_check', true, 60);
        }
    }
    /**
     * Execute code and/or modify output before displaying the template.
     *
     * @event core.page_footer_after
     * @var	bool display_template	Whether or not to display the template
     * @var	bool exit_handler		Whether or not to run the exit_handler()
     *
     * @since 3.1.0-RC5
     */
    $vars = array('display_template', 'exit_handler');
    extract($phpbb_dispatcher->trigger_event('core.page_footer_after', compact($vars)));
    if ($display_template) {
        $template->display('body');
    }
    garbage_collection();
    if ($exit_handler) {
        exit_handler();
    }
}
開發者ID:WarriorMachines,項目名稱:warriormachines-phpbb,代碼行數:74,代碼來源:functions.php

示例2: adm_page_footer

/**
* Page footer for acp pages
*/
function adm_page_footer($copyright_html = true)
{
    global $db, $config, $template, $user, $auth, $cache;
    global $starttime, $phpbb_root_path, $phpbb_admin_path, $phpEx;
    global $request, $phpbb_dispatcher;
    // A listener can set this variable to `true` when it overrides this function
    $adm_page_footer_override = false;
    /**
     * Execute code and/or overwrite adm_page_footer()
     *
     * @event core.adm_page_footer
     * @var	bool	copyright_html			Shall we display the copyright?
     * @var	bool	adm_page_footer_override	Shall we return instead of
     *									running the rest of adm_page_footer()
     * @since 3.1.0-a1
     */
    $vars = array('copyright_html', 'adm_page_footer_override');
    extract($phpbb_dispatcher->trigger_event('core.adm_page_footer', compact($vars)));
    if ($adm_page_footer_override) {
        return;
    }
    phpbb_check_and_display_sql_report($request, $auth, $db);
    $template->assign_vars(array('DEBUG_OUTPUT' => phpbb_generate_debug_output($db, $config, $auth, $user, $phpbb_dispatcher), 'TRANSLATION_INFO' => !empty($user->lang['TRANSLATION_INFO']) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited'), 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.min.js", 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'VERSION' => $config['version']));
    $template->display('body');
    garbage_collection();
    exit_handler();
}
開發者ID:Tarendai,項目名稱:spring-website,代碼行數:30,代碼來源:functions_acp.php


注:本文中的phpbb_check_and_display_sql_report函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。