diff options
Diffstat (limited to 'view.php')
-rwxr-xr-x | view.php | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 | ||
11 | header('Content-type:text/html; charset=utf-8'); | ||
12 | |||
13 | include dirname(__FILE__).'/inc/config.php'; | 11 | include dirname(__FILE__).'/inc/config.php'; |
14 | require_once dirname(__FILE__).'/inc/rain.tpl.class.php'; | ||
15 | $db = new db(DB_PATH); | ||
16 | 12 | ||
17 | if(isset($_GET['id']) && $_GET['id'] != '') { | 13 | if(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'); |