aboutsummaryrefslogtreecommitdiffhomepage
path: root/process.php
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-09 15:05:49 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-09 15:05:49 +0200
commite46efced1b2c19ca0f628207b70b28a30fcbc288 (patch)
treec475b5e47e13ba9196b2f5765875868b64f95172 /process.php
parent1ff23336004fb0870e8329a163f6edd851417b01 (diff)
downloadwallabag-e46efced1b2c19ca0f628207b70b28a30fcbc288.tar.gz
wallabag-e46efced1b2c19ca0f628207b70b28a30fcbc288.tar.zst
wallabag-e46efced1b2c19ca0f628207b70b28a30fcbc288.zip
utilisation de jquery pour traitement ajax
mise en page de la grille, type Masonry (méthode full css). cf ici : http://designshack.net/articles/css/masonry/ réorganisation des fichiers avec un fichier dédié pour le traitement des actions (process.php) utilisation de pictos à la place des codes héxas
Diffstat (limited to 'process.php')
-rw-r--r--process.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/process.php b/process.php
new file mode 100644
index 00000000..ef258308
--- /dev/null
+++ b/process.php
@@ -0,0 +1,38 @@
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
17
18switch ($action)
19{
20 case 'toggle_fav' :
21 $sql_action = "UPDATE entries SET is_fav=~is_fav WHERE id=?";
22 $params_action = array($id);
23 break;
24 case 'toggle_archive' :
25 $sql_action = "UPDATE entries SET is_read=~is_read WHERE id=?";
26 $params_action = array($id);
27 break;
28 default:
29 break;
30}
31
32# action query
33if (isset($sql_action))
34{
35 $query = $db->getHandle()->prepare($sql_action);
36 $query->execute($params_action);
37}
38?> \ No newline at end of file