function smarty_function_show_page_load_time($params, &$smarty)
{
    global $g_benchmark_start, $g_enable_benchmarking;
    if (!$g_enable_benchmarking || empty($g_benchmark_start)) {
        return;
    }
    $difference = round(ft_get_microtime_float() - $g_benchmark_start, 5);
    echo "<div class=\"medium_grey\">Page load time: <b>{$difference}</b> seconds</div>";
}
Beispiel #2
0
require_once dirname(__FILE__) . "/code/files.php";
require_once dirname(__FILE__) . "/code/forms.php";
require_once dirname(__FILE__) . "/code/general.php";
require_once dirname(__FILE__) . "/code/hooks.php";
require_once dirname(__FILE__) . "/code/languages.php";
require_once dirname(__FILE__) . "/code/list_groups.php";
require_once dirname(__FILE__) . "/code/menus.php";
require_once dirname(__FILE__) . "/code/modules.php";
require_once dirname(__FILE__) . "/code/option_lists.php";
require_once dirname(__FILE__) . "/code/sessions.php";
require_once dirname(__FILE__) . "/code/settings.php";
require_once dirname(__FILE__) . "/code/submissions.php";
require_once dirname(__FILE__) . "/code/themes.php";
require_once dirname(__FILE__) . "/code/upgrade.php";
require_once dirname(__FILE__) . "/code/validation.php";
require_once dirname(__FILE__) . "/code/views.php";
require_once dirname(__FILE__) . "/smarty/Smarty.class.php";
if ($config_file_exists && (!isset($g_defer_init_page) || !$g_defer_init_page)) {
    $g_link = ft_db_connect();
    // our Smarty instance, used for rendering the webpages
    $g_smarty = new Smarty();
    // load the appropriate language file
    $g_language = ft_get_ui_language();
    require_once dirname(__FILE__) . "/lang/{$g_language}.php";
    if (isset($_GET["logout"])) {
        ft_logout_user();
    }
}
if ($g_enable_benchmarking) {
    $g_benchmark_start = ft_get_microtime_float();
}