From 139769aa245fd58d032cb009303b0ea2cc4187cd Mon Sep 17 00:00:00 2001 From: nicosomb Date: Tue, 16 Apr 2013 11:52:25 +0200 Subject: stockage de la vue et du tri en session --- index.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index d477d699..f62cf139 100755 --- a/index.php +++ b/index.php @@ -10,22 +10,17 @@ 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); +$entries = display_view(); $tpl->assign('title', 'poche, a read it later open source system'); -$tpl->assign('view', $view); +$tpl->assign('view', $_SESSION['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'); \ No newline at end of file + +$tpl->draw('head'); +$tpl->draw('home'); +$tpl->draw('entries'); +$tpl->draw('js'); +$tpl->draw('footer'); \ No newline at end of file -- cgit v1.2.3