aboutsummaryrefslogtreecommitdiffhomepage
path: root/view.php
diff options
context:
space:
mode:
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');