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 --- process.php | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 process.php (limited to 'process.php') diff --git a/process.php b/process.php deleted file mode 100644 index 5a056caa..00000000 --- a/process.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @copyright 2013 - * @license http://www.wtfpl.net/ see COPYING file - */ - -include dirname(__FILE__).'/inc/config.php'; -$db = new db(DB_PATH); - -$action = (isset ($_GET['action'])) ? htmlentities($_GET['action']) : ''; -$id = (isset ($_GET['id'])) ? htmlentities($_GET['id']) : ''; -$token = (isset ($_GET['token'])) ? $_GET['token'] : ''; - -if (verif_token($token)) { - switch ($action) - { - case 'toggle_fav' : - $sql_action = "UPDATE entries SET is_fav=~is_fav WHERE id=?"; - $params_action = array($id); - break; - case 'toggle_archive' : - $sql_action = "UPDATE entries SET is_read=~is_read WHERE id=?"; - $params_action = array($id); - break; - default: - break; - } - - # action query - if (isset($sql_action)) - { - $query = $db->getHandle()->prepare($sql_action); - $query->execute($params_action); - } -} -else die('CSRF problem'); \ No newline at end of file -- cgit v1.2.3