X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=39990d55a7c59292f1a7ba78caa5dcbc146189e3;hb=e38e46ecdbb522d3ff296b36a46167c8fbfb501d;hp=e32996fab206758cd519961be13bdc429f62b29f;hpb=c44908ddd02eb5fd63c292bb7e0fa99a52f73222;p=github%2Fwallabag%2Fwallabag.git diff --git a/index.php b/index.php index e32996fa..39990d55 100755 --- a/index.php +++ b/index.php @@ -1,102 +1,22 @@ * @copyright 2013 - * @license http://www.wtfpl.net/ see COPYING file + * @license http://opensource.org/licenses/MIT see COPYING file */ -/** - * TODO - * gestion des erreurs sqlite (duplicate tout ça) - * gérer si url vide - * traiter les variables passées en get - * récupérer le titre de la page pochée (cf readityourself.php) - * actions archive, fav et delete à traiter - * bookmarklet - * améliorer présentation des liens - * améliorer présentation d'un article - * aligner verticalement les icones d'action - * afficher liens mis en favoris et archivés - * tri des liens - */ - -try -{ - $db_handle = new PDO('sqlite:poche.sqlite'); - $db_handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -} -catch (Exception $e) -{ - die('error : '.$e->getMessage()); -} - -$action = (isset ($_GET['action'])) ? htmlspecialchars($_GET['action']) : ''; +define ('POCHE', '1.8.0'); +require 'check_essentials.php'; +require 'check_setup.php'; +require_once 'inc/poche/global.inc.php'; -switch ($action) { - case 'add': - $url = (isset ($_GET['url'])) ? htmlspecialchars($_GET['url']) : ''; - $title = $url; - $query = $db_handle->prepare('INSERT INTO entries ( url, title ) VALUES (?, ?)'); - $query->execute(array($url, $title)); - break; - case 'archive': - break; - case 'fav' : - break; - case 'delete': - break; - default: - break; -} +// Start session +Session::$sessionName = 'wallabag'; +Session::init(); -function url(){ - $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; - return $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; -} -?> - - - - - - - - - - - poche : queue - - - - -
-

poche, a read it later open source system

-
-
- - prepare("SELECT * FROM entries WHERE read=?"); - $query->execute(array('FALSE')); - $entries = $query->fetchAll(); - ?> - -
- - - \ No newline at end of file +// Let's rock ! +$wallabag = new Poche(); +$wallabag->run(); \ No newline at end of file