2013-04-03 15:14:01 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* poche, a read it later open source system
|
|
|
|
*
|
|
|
|
* @category poche
|
2013-04-13 11:08:31 +02:00
|
|
|
* @author Nicolas Lœuillet <support@inthepoche.com>
|
2013-04-03 15:14:01 +02:00
|
|
|
* @copyright 2013
|
|
|
|
* @license http://www.wtfpl.net/ see COPYING file
|
|
|
|
*/
|
|
|
|
|
2013-04-09 15:18:39 +02:00
|
|
|
include dirname(__FILE__).'/inc/config.php';
|
2013-04-03 15:14:01 +02:00
|
|
|
|
2013-04-15 14:09:58 +02:00
|
|
|
$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
|
|
|
|
$view = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
|
|
|
|
$id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
|
2013-04-15 09:04:23 +02:00
|
|
|
$url = (isset ($_GET['url'])) ? $_GET['url'] : '';
|
2013-04-15 14:09:58 +02:00
|
|
|
$token = (isset ($_POST['token'])) ? $_POST['token'] : '';
|
|
|
|
|
|
|
|
if ($action != '') {
|
|
|
|
action_to_do($action, $id, $url, $token);
|
|
|
|
}
|
2013-04-03 15:14:01 +02:00
|
|
|
|
2013-04-15 09:58:34 +02:00
|
|
|
$entries = display_view($view);
|
2013-04-04 19:51:24 +02:00
|
|
|
|
2013-04-15 09:38:41 +02:00
|
|
|
$tpl->assign('title', 'poche, a read it later open source system');
|
|
|
|
$tpl->assign('view', $view);
|
|
|
|
$tpl->assign('poche_url', get_poche_url());
|
|
|
|
$tpl->assign('entries', $entries);
|
|
|
|
$tpl->assign('load_all_js', 1);
|
2013-04-15 14:09:58 +02:00
|
|
|
$tpl->assign('token', $_SESSION['token_poche']);
|
2013-04-15 09:38:41 +02:00
|
|
|
$tpl->draw('home');
|