]> git.immae.eu Git - github/wallabag/wallabag.git/blame - process.php
typo dans le footer
[github/wallabag/wallabag.git] / process.php
CommitLineData
e46efced 1<?php
2/**
3 * poche, a read it later open source system
4 *
5 * @category poche
6 * @author Nicolas LÅ“uillet <nicolas@loeuillet.org>
7 * @copyright 2013
8 * @license http://www.wtfpl.net/ see COPYING file
9 */
10
11include dirname(__FILE__).'/inc/config.php';
12$db = new db(DB_PATH);
13
14$action = (isset ($_GET['action'])) ? htmlspecialchars($_GET['action']) : '';
15$id = (isset ($_GET['id'])) ? htmlspecialchars($_GET['id']) : '';
16
e46efced 17switch ($action)
18{
19 case 'toggle_fav' :
20 $sql_action = "UPDATE entries SET is_fav=~is_fav WHERE id=?";
21 $params_action = array($id);
22 break;
23 case 'toggle_archive' :
24 $sql_action = "UPDATE entries SET is_read=~is_read WHERE id=?";
25 $params_action = array($id);
26 break;
27 default:
28 break;
29}
30
31# action query
32if (isset($sql_action))
33{
34 $query = $db->getHandle()->prepare($sql_action);
35 $query->execute($params_action);
36}
37?>