2013-04-12 10:25:58 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* poche, a read it later open source system
|
|
|
|
*
|
|
|
|
* @category poche
|
|
|
|
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
|
|
|
* @copyright 2013
|
|
|
|
* @license http://www.wtfpl.net/ see COPYING file
|
|
|
|
*/
|
|
|
|
|
|
|
|
include dirname(__FILE__).'/inc/config.php';
|
|
|
|
|
2013-04-15 07:58:34 +00:00
|
|
|
$id = (isset ($_GET['id'])) ? htmlspecialchars($_GET['id']) : '';
|
2013-04-12 10:25:58 +00:00
|
|
|
|
2013-04-15 07:58:34 +00:00
|
|
|
if(!empty($id)) {
|
2013-04-12 10:25:58 +00:00
|
|
|
|
2013-04-15 07:58:34 +00:00
|
|
|
$entry = get_article($id);
|
2013-04-12 10:25:58 +00:00
|
|
|
|
2013-04-12 11:13:21 +00:00
|
|
|
if ($entry != NULL) {
|
2013-04-15 07:38:41 +00:00
|
|
|
$tpl->assign('id', $entry[0]['id']);
|
|
|
|
$tpl->assign('url', $entry[0]['url']);
|
|
|
|
$tpl->assign('title', $entry[0]['title']);
|
|
|
|
$tpl->assign('content', $entry[0]['content']);
|
|
|
|
$tpl->assign('is_fav', $entry[0]['is_fav']);
|
|
|
|
$tpl->assign('is_read', $entry[0]['is_read']);
|
|
|
|
$tpl->assign('load_all_js', 0);
|
2013-04-15 12:09:58 +00:00
|
|
|
$tpl->assign('token', $_SESSION['token_poche']);
|
2013-04-15 07:38:41 +00:00
|
|
|
$tpl->draw('view');
|
2013-04-12 11:13:21 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
die('error in view call');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
die('error in view call');
|
2013-04-12 10:25:58 +00:00
|
|
|
}
|