3 * poche, a read it later open source system
6 * @author Nicolas Lœuillet <nicolas@loeuillet.org>
8 * @license http://www.wtfpl.net/ see COPYING file
13 * gestion des erreurs sqlite (duplicate tout ça)
15 * traiter les variables passées en get
16 * récupérer le titre de la page pochée (cf readityourself.php)
17 * actions archive, fav et delete à traiter
19 * améliorer présentation des liens
20 * améliorer présentation d'un article
21 * aligner verticalement les icones d'action
22 * afficher liens mis en favoris et archivés
28 $db_handle = new PDO('sqlite:poche.sqlite');
29 $db_handle->setAttribute(PDO
::ATTR_ERRMODE
, PDO
::ERRMODE_EXCEPTION
);
33 die('error : '.$e->getMessage());
36 $action = (isset ($_GET['action'])) ? htmlspecialchars($_GET['action']) : '';
40 $url = (isset ($_GET['url'])) ? htmlspecialchars($_GET['url']) : '';
42 $query = $db_handle->prepare('INSERT INTO entries ( url, title ) VALUES (?, ?)');
43 $query->execute(array($url, $title));
56 <!--[if lte IE
6]> <html
class="no-js ie6 ie67 ie678" lang
="en"> <![endif]-->
57 <!--[if lte IE
7]> <html
class="no-js ie7 ie67 ie678" lang
="en"> <![endif]-->
58 <!--[if IE
8]> <html
class="no-js ie8 ie678" lang
="en"> <![endif]-->
59 <!--[if gt IE
8]><!--> <html
class="no-js" lang
="en"> <!--<![endif]-->
62 <meta name
="viewport" content
="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
63 <meta charset
="utf-8">
64 <meta http
-equiv
="X-UA-Compatible" content
="IE=10">
65 <title
>poche
: queue
</title
>
66 <link rel
="stylesheet" href
="css/knacss.css" media
="all">
67 <link rel
="stylesheet" href
="css/style.css" media
="all">
71 <h1
>poche
, a read it later open source system
</h1
>
73 <div id
="main" class="w800p">
75 <li
><a href
="index.php">home
</a
></li
>
76 <li
><a href
="#">favorites
</a
></li
>
77 <li
><a href
="#">archive
</a
></li
>
78 <li
><a href
="javascript:(function(){var%20url%20=%20location.href;var%20title%20=%20document.title%20||%20url;window.open('http://localhost/poche/index.php?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">bookmarklet
</a
></li
>
81 $query = $db_handle->prepare("SELECT * FROM entries WHERE read=?");
82 $query->execute(array('FALSE'));
83 $entries = $query->fetchAll();
87 foreach ($entries as $entry) {
88 echo '<li><a href="readityourself.php?url='.urlencode($entry['url']).'">' . $entry['title'] . '</a> <a href="#" title="toggle delete" class="tool">✓</a> <a href="#" title="toggle favorite" class="tool">☆</a> <a href="#" title="toggle mark as read" class="tool">⨯</a></li>';
93 <footer
class="mr2 mt3">
94 <p
class="smaller">poche is a read it later open source system
, based on
<a href
="http://www.memiks.fr/readityourself/">ReadItYourself
</a
>. poche is developed by
<a href
="http://nicolas.loeuillet.org">Nicolas Lœuillet
</a
> under the
<a href
="http://www.wtfpl.net/">Do What the Fuck You Want to
Public License
</a
></p
>