public static function getName()
 {
     if (is_null(self::$context)) {
         self::initialize();
     }
     if (self::$sessionName == null) {
         if (self::$context->getProperty('service.session_cookie') !== null) {
             self::$sessionName = self::$context->getProperty('service.session_cookie');
         } else {
             self::$sessionName = 'TSSESSION' . self::$context->getProperty('service.domain') . self::$context->getProperty('service.path');
             self::$sessionName = preg_replace('/[^a-zA-Z0-9]/', '', self::$sessionName);
         }
     }
     return self::$sessionName;
 }
 public static function start()
 {
     if (!Session::$_started) {
         if (defined('SESSION_NAME')) {
             Session::$sessionName = SESSION_NAME;
         } else {
             Session::$_sessionName = 'ZARAFA_REST_API_SESSION';
         }
         session_name(Session::$_sessionName);
         Session::open();
         session_regenerate_id();
         Session::$_started = true;
     } else {
         Session::open();
     }
 }
 *
 * @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:");
Beispiel #4
0
<?php

/**
 * wallabag, self hostable application allowing you to not miss any content anymore
 *
 * @category   wallabag
 * @author     Nicolas Lœuillet <*****@*****.**>
 * @copyright  2013
 * @license    http://opensource.org/licenses/MIT see COPYING file
 */
define('POCHE', '1.9.0');
require 'check_essentials.php';
require 'check_setup.php';
require_once 'inc/poche/global.inc.php';
// Start session
Session::$sessionName = 'wallabag';
Session::init();
// Let's rock !
$wallabag = new Poche();
$wallabag->run();
Beispiel #5
0
 * wallabag, self hostable application allowing you to not miss any content anymore
 *
 * @category   wallabag
 * @author     Nicolas Lœuillet <*****@*****.**>
 * @copyright  2013
 * @license    http://www.wtfpl.net/ see COPYING file
 */
define('POCHE', '1.7.2');
require 'check_setup.php';
require_once 'inc/poche/global.inc.php';
# Set error reporting level
if (defined('ERROR_REPORTING')) {
    error_reporting(ERROR_REPORTING);
}
# Start session
Session::$sessionName = 'poche';
Session::init();
# Start Poche
$poche = new Poche();
$notInstalledMessage = $poche->getNotInstalledMessage();
# Parse GET & REFERER vars
$referer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
$view = Tools::checkVar('view', 'home');
$action = Tools::checkVar('action');
$id = Tools::checkVar('id');
$_SESSION['sort'] = Tools::checkVar('sort', 'id');
$url = new Url(isset($_GET['url']) ? $_GET['url'] : '');
# vars to _always_ send to templates
$tpl_vars = array('referer' => $referer, 'view' => $view, 'poche_url' => Tools::getPocheUrl(), 'title' => _('wallabag, a read it later open source system'), 'token' => Session::getToken(), 'theme' => $poche->getTheme());
if (!empty($notInstalledMessage)) {
    if (!Poche::$canRenderTemplates || !Poche::$configFileAvailable) {
Beispiel #6
0
<?php

// FUNCTIONS BEGIN
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