*
 */
define(__NAMESPACE__ . '\\CLASSES', SYSTEM . '/classes');
define(__NAMESPACE__ . '\\USER', ROOT . '/user');
define(__NAMESPACE__ . '\\THEMES', USER . '/themes');
define(__NAMESPACE__ . '\\SETTINGS', USER . '/settings');
define(__NAMESPACE__ . '\\FUNCTIONS', SYSTEM . '/functions');
define(__NAMESPACE__ . '\\LIB', SYSTEM . '/libraries');
/**
 *
 * Other variables
 *
 */
define(__NAMESPACE__ . '\\PLUGIN_NAME', 'STSCore');
require FUNCTIONS . '/core.php';
start_timer();
//register_globals off
unregister_globals();
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
    $_POST = remove_magic_quotes($_POST);
    $_GET = remove_magic_quotes($_GET);
    $_COOKIE = remove_magic_quotes($_COOKIE);
    $_SERVER = remove_magic_quotes($_SERVER);
}
register_shutdown_function(__NAMESPACE__ . '\\shutdown');
spl_autoload_register(__NAMESPACE__ . '\\class_auto_load');
require FUNCTIONS . '/html.php';
$error =& singleton::get(__NAMESPACE__ . '\\error');
try {
    if (!file_exists(SETTINGS . '/config.php')) {
        throw new \Exception('The config file could not be found.');
Exemplo n.º 2
0
function combat_read_table()
{
    // Einlesen der Kontrahenten in den Speicher
    if (COMBAT_VERBOSE) {
        start_timer(1);
        echo "Lese Kampfdaten in den Speicher...";
    }
    $query = $GLOBALS["db"]->query("SELECT * FROM combat") or die($GLOBALS["db"]->error);
    while ($result = $query->fetch_assoc()) {
        $retval[$result["id"]] = $result;
    }
    if (COMBAT_VERBOSE) {
        echo "OK! (" . round(read_timer(1), 4) . ")" . COMBAT_NEWLINE . COMBAT_NEWLINE;
    }
    return $retval;
}
<?php

/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
/**
 * @package chamilo.learnpath
 * @author Yannick Warnier <*****@*****.**>
 */
/**
 * Start a timer and hand it back to the JS by assigning the current time (of start) to
 * var asset_timer
 * @return string JavaScript time intializer
 */
function start_timer()
{
    $time = time();
    return $time;
    //"olms.asset_timer='$time'; olms.asset_timer_total = 0;";
}
echo start_timer();
Container::$legacyTemplate = 'layout_empty.html.twig';