aboutsummaryrefslogtreecommitdiffhomepage
path: root/view.php
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-15 09:38:41 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-15 09:38:41 +0200
commit8046748b424f95a92ab599ecc973f57eb05246ce (patch)
treee3a2a66569337662a58cf8eba71125f7154c799a /view.php
parent3e188a7c8de484a57c05126072f76860c7746b39 (diff)
downloadwallabag-8046748b424f95a92ab599ecc973f57eb05246ce.tar.gz
wallabag-8046748b424f95a92ab599ecc973f57eb05246ce.tar.zst
wallabag-8046748b424f95a92ab599ecc973f57eb05246ce.zip
découpage des vues dans plusieurs fichiers tpl
Diffstat (limited to 'view.php')
-rwxr-xr-xview.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/view.php b/view.php
index 75e6c3a9..0ee8957b 100755
--- a/view.php
+++ b/view.php
@@ -8,11 +8,7 @@
8 * @license http://www.wtfpl.net/ see COPYING file 8 * @license http://www.wtfpl.net/ see COPYING file
9 */ 9 */
10 10
11header('Content-type:text/html; charset=utf-8');
12
13include dirname(__FILE__).'/inc/config.php'; 11include dirname(__FILE__).'/inc/config.php';
14require_once dirname(__FILE__).'/inc/rain.tpl.class.php';
15$db = new db(DB_PATH);
16 12
17if(isset($_GET['id']) && $_GET['id'] != '') { 13if(isset($_GET['id']) && $_GET['id'] != '') {
18 14
@@ -32,7 +28,14 @@ if(isset($_GET['id']) && $_GET['id'] != '') {
32 } 28 }
33 29
34 if ($entry != NULL) { 30 if ($entry != NULL) {
35 generate_page($entry[0]); 31 $tpl->assign('id', $entry[0]['id']);
32 $tpl->assign('url', $entry[0]['url']);
33 $tpl->assign('title', $entry[0]['title']);
34 $tpl->assign('content', $entry[0]['content']);
35 $tpl->assign('is_fav', $entry[0]['is_fav']);
36 $tpl->assign('is_read', $entry[0]['is_read']);
37 $tpl->assign('load_all_js', 0);
38 $tpl->draw('view');
36 } 39 }
37 else { 40 else {
38 die('error in view call'); 41 die('error in view call');