From 8046748b424f95a92ab599ecc973f57eb05246ce Mon Sep 17 00:00:00 2001 From: nicosomb Date: Mon, 15 Apr 2013 09:38:41 +0200 Subject: =?UTF-8?q?d=C3=A9coupage=20des=20vues=20dans=20plusieurs=20fichie?= =?UTF-8?q?rs=20tpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 88 +++++---------------------------------------------------------- 1 file changed, 7 insertions(+), 81 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 8c695cd3..ef18254a 100755 --- a/index.php +++ b/index.php @@ -9,7 +9,6 @@ */ include dirname(__FILE__).'/inc/config.php'; -$db = new db(DB_PATH); $action = (isset ($_GET['action'])) ? htmlspecialchars($_GET['action']) : ''; $view = (isset ($_GET['view'])) ? htmlspecialchars($_GET['view']) : ''; @@ -19,15 +18,12 @@ $url = (isset ($_GET['url'])) ? $_GET['url'] : ''; switch ($action) { case 'add': - if ($url == '') continue; $parametres_url = prepare_url($url); - - $sql_action = 'INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'; + $sql_action = 'INSERT INTO entries ( url, title, content ) VALUES (?, ?, ?)'; $params_action = array($url, $parametres_url['title'], $parametres_url['content']); - break; case 'delete': $sql_action = "DELETE FROM entries WHERE id=?"; @@ -80,79 +76,9 @@ catch (Exception $e) die('view query error : '.$e->getMessage()); } -?> - - - - - - - - - - - poche, a read it later open source system - - - - - - - - -
-

logo pochepoche

-
-
- -
- -
- -

- -

-
- - - -
-
-
- -
-
- - - - - - - +$tpl->assign('title', 'poche, a read it later open source system'); +$tpl->assign('view', $view); +$tpl->assign('poche_url', get_poche_url()); +$tpl->assign('entries', $entries); +$tpl->assign('load_all_js', 1); +$tpl->draw('home'); \ No newline at end of file -- cgit v1.2.3