]> git.immae.eu Git - github/wallabag/wallabag.git/blob - index.php
vérificatio CSRF et mise en page
[github/wallabag/wallabag.git] / index.php
1 <?php
2 /**
3 * poche, a read it later open source system
4 *
5 * @category poche
6 * @author Nicolas Lœuillet <support@inthepoche.com>
7 * @copyright 2013
8 * @license http://www.wtfpl.net/ see COPYING file
9 */
10
11 include dirname(__FILE__).'/inc/config.php';
12
13 $action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
14 $view = (isset ($_GET['view'])) ? htmlentities($_GET['view']) : 'index';
15 $id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
16 $url = (isset ($_GET['url'])) ? $_GET['url'] : '';
17 $token = (isset ($_POST['token'])) ? $_POST['token'] : '';
18
19 if ($action != '') {
20 action_to_do($action, $id, $url, $token);
21 }
22
23 $entries = display_view($view);
24
25 $tpl->assign('title', 'poche, a read it later open source system');
26 $tpl->assign('view', $view);
27 $tpl->assign('poche_url', get_poche_url());
28 $tpl->assign('entries', $entries);
29 $tpl->assign('load_all_js', 1);
30 $tpl->assign('token', $_SESSION['token_poche']);
31 $tpl->draw('home');