Пример #1
0
/**
 * autoload class
 *
 * @param string $className The name of the class to load
 */
function __autoload($className)
{
    if (file_exists('class/' . $className . '.php')) {
        include_once 'class/' . $className . '.php';
    }
}
MyTool::$opts = array('http' => array('timeout' => 4, 'user_agent' => 'KrISS feed agent ' . FEED_VERSION . ' by Tontof.net http://tontof.net/kriss/feed'));
Plugin::init();
/* ?><?php include("plugins"); ?><?php */
// Check if php version is correct
MyTool::initPHP();
// Initialize Session
Session::$sessionName = 'kriss';
Session::$banFile = BAN_FILE;
Session::init();
// Initialize internationalization
Intl::addLang('en_GB', 'English (Great Britain)', 'flag-gb');
Intl::addLang('en_US', 'English (America)', 'flag-us');
Intl::init();
$ref = MyTool::getUrl();
$referer = empty($_SERVER['HTTP_REFERER']) ? '?' : $_SERVER['HTTP_REFERER'];
if (substr($referer, 0, strlen($ref)) !== $ref) {
    $referer = $ref;
}
if (isset($_GET['file'])) {
    $gmtTime = gmdate('D, d M Y H:i:s', filemtime(__FILE__)) . ' GMT';