Beispiel #1
0
<?php

include 'Session.php';
// Personnalize PHP session name
Session::$sessionName = 'kriss';
// default is empty
// If the user does not access any page within this time,
// his/her session is considered expired (3600 sec. = 1 hour)
Session::$inactivityTimeout = 7200;
// default is 3600
// If you get disconnected often or if your IP address changes often.
// Let you disable session cookie hijacking protection
Session::$disableSessionProtection = true;
// default is false
// Ban IP after this many failures.
Session::$banAfter = 5;
// default is 4
// Ban duration for IP address after login failures (in seconds).
// (1800 sec. = 30 minutes)
Session::$banDuration = 3600;
// default is 1800
// File storage for failures and bans. If empty, no ban management.
Session::$banFile = 'ipbans.php';
// default is empty
Session::init();
 * @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';
    $etag = '"' . md5($gmtTime) . '"';
    header("Cache-Control:");
    header("Pragma:");
Beispiel #3
0
require_once dirname(__FILE__) . '/Session.php';
require_once dirname(__FILE__) . '/../class/User.php';
require_once dirname(__FILE__) . '/../class/Article.php';
require_once dirname(__FILE__) . '/../class/Utils.php';
// get readability library
require_once dirname(__FILE__) . '/Readability.php';
require_once dirname(__FILE__) . '/../class/Readityourself.php';
// Personnalize PHP session name
Session::$sessionName = 'readityourself';
// default is empty
// If the user does not access any page within this time,
// his/her session is considered expired (3600 sec. = 1 hour)
Session::$inactivityTimeout = 7200;
// default is 3600
// Ban IP after this many failures.
Session::$banAfter = 5;
// default is 4
// File storage for failures and bans. If empty, no ban management.
Session::$banFile = dirname(__FILE__) . '/../cache/ipbans.php';
// default is empty
Session::init();
// Set locale to French
setlocale(LC_ALL, 'fr_FR');
// set timezone to Europe/Paris
date_default_timezone_set('Europe/Paris');
// set charset to utf-8 important since all pages will be transform to utf-8
header('Content-Type: text/html;charset=utf-8');
// get readability library
require_once dirname(__FILE__) . '/config.php';
// appel de la libraire RainTPL.
require_once dirname(__FILE__) . '/rain.tpl.class.php';