aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
blob: d477d699d965cafa945d6c9e22233beecdb94d11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
 * poche, a read it later open source system
 *
 * @category   poche
 * @author     Nicolas LÅ“uillet <support@inthepoche.com>
 * @copyright  2013
 * @license    http://www.wtfpl.net/ see COPYING file
 */

include dirname(__FILE__).'/inc/config.php';

$action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
$view   = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
$id     = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
$url    = (isset ($_GET['url'])) ? $_GET['url'] : '';
$token    = (isset ($_POST['token'])) ? $_POST['token'] : '';

if ($action != '') {
    action_to_do($action, $id, $url, $token);
}

$entries = display_view($view);

$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);
$tpl->assign('token', $_SESSION['token_poche']);
$tpl->draw('home');