2013-04-09 13:05:49 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* poche, a read it later open source system
|
|
|
|
*
|
|
|
|
* @category poche
|
|
|
|
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
|
|
|
* @copyright 2013
|
|
|
|
* @license http://www.wtfpl.net/ see COPYING file
|
|
|
|
*/
|
|
|
|
define ('DB_PATH', 'sqlite:./db/poche.sqlite');
|
|
|
|
|
|
|
|
include 'db.php';
|
|
|
|
include 'functions.php';
|
|
|
|
require_once 'Readability.php';
|
|
|
|
require_once 'Encoding.php';
|
2013-04-15 07:38:41 +00:00
|
|
|
require_once 'rain.tpl.class.php';
|
|
|
|
|
|
|
|
$db = new db(DB_PATH);
|
|
|
|
|
|
|
|
raintpl::$tpl_dir = './tpl/';
|
|
|
|
raintpl::$cache_dir = './cache/';
|
|
|
|
raintpl::$base_url = get_poche_url();
|
|
|
|
raintpl::configure('path_replace', false);
|
|
|
|
raintpl::configure('debug', false);
|
2013-04-15 12:09:58 +00:00
|
|
|
$tpl = new raintpl();
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
if (!isset($_SESSION['token_poche'])) {
|
|
|
|
$token = md5(uniqid(rand(), TRUE));
|
|
|
|
$_SESSION['token_poche'] = $token;
|
|
|
|
$_SESSION['token_time_poche'] = time();
|
|
|
|
}
|