示例#1
0
 * Session
 */
//Increase the probability of the session garbage collection being run
//Example: After 30 minues (1800 seconds) of a user having a sesssion, there is
//a 1/15 chance the the garbage collection will clear out old sessions
\Zend_Session::setOptions(array('gc_maxlifetime' => 1800, 'gc_probability' => 1, 'gc_divisor' => 15, 'use_only_cookies' => 1, 'cookie_httponly' => 1));
\Zend_Session::start();
/**
 * Database
 */
$dbo = new \Ventus\Utilities\DBO(DB_URL);
$loggers['audit']->addWriter(new \Ventus\Utilities\Log\Writer\Db($dbo, 'ventus_event_log', array('inserted_on' => 'inserted_on', 'priority' => 'priority', 'message' => 'message', 'ip' => 'ip', 'session_user_ns' => 'session_user_ns', 'session_user_id' => 'session_user_id')));
/**
 * Initialize utility functions static class
 */
\Ventus\Utilities\Functions::init($dbo);
/**
 * Escaper
 */
$antiXSS = new \Ventus\Utilities\AntiXSS();
/**
 * Localization
 */
require_once FS_L10N . '/date-formats.php';
\Locale::setDefault(DEFAULT_LANGUAGE);
$l10n = new \Ventus\Utilities\I18n\Translate(DEFAULT_LANGUAGE, $antiXSS);
$l10n->addResource(FS_L10N . '/nav.json');
/**
 * Database-level constants
 */
//Use YYYY-MM-DD HH:MM:SS format date/time stamp for both 'start' and 'end'. Users of the Professor