$cObj = new content($db);
require_once PATH_CORE . '/classes/template.class.php';
$templateObj = new template($db);
require_once PATH_CORE . '/classes/utilities.class.php';
$utilObj = new utilities($db);
require_once PATH_PHP . '/classes/comments.class.php';
$commentsObj = new comments($db);
/* process request variables */
if (isset($_GET['permalink'])) {
    $permalink = $_GET['permalink'];
} else {
    // go to 404 error page
    header("Location: " . URL_ROOT);
    exit;
}
$story = $cObj->getByPermalink($permalink);
// record story read by this user
if ($db->ui->isLoggedIn) {
    require_once PATH_CORE . '/classes/log.class.php';
    $logObj = new log(&$db);
    $logItem = $logObj->serialize(0, $db->ui->userid, 'readStory', $story->siteContentId);
    // note this is the local contentid
    $logObj->update($logItem);
}
/* begin building the page */
$page->setTitle($story->title);
$page->pkgStyles(CACHE_PREFIX . 'nrStory', array(PATH_PHP_STYLES . '/newsroom.css', PATH_PHP_STYLES . '/tabs.css'));
$page->pkgScripts(CACHE_PREFIX . 'nrStory', array(PATH_PHP_SCRIPTS . '/comments.js', PATH_PHP_SCRIPTS . '/voting.js', PATH_PHP_SCRIPTS . '/journal.js'));
$page->addToHeader($common->buildHeader() . $common->buildNavigation('Read Story'));
$page->addToFooter($common->buildFooter());
$page->addRSSFeed(URL_HOME . '?p=rss');
示例#2
0
$cObj = new content($db);
require_once PATH_CORE . '/classes/template.class.php';
$templateObj = new template($db);
require_once PATH_CORE . '/classes/utilities.class.php';
$utilObj = new utilities($db);
require_once PATH_PHP . '/classes/comments.class.php';
$commentsObj = new comments($db);
/* process request variables */
if (isset($_GET['permalink'])) {
    $permalink = $_GET['permalink'];
} else {
    // go to 404 error page
    header("Location: " . URL_ROOT);
    exit;
}
$story = $cObj->getByPermalink($permalink);
// record story read by this user
/*	if ($db->ui->isLoggedIn) {
		require_once(PATH_CORE.'/classes/log.class.php');
		$logObj=new log(&$db);
		$logItem=$logObj->serialize(0,$db->ui->userid,'readStory',$story->siteContentId); // note this is the local contentid
 		$logObj->update($logItem);
	}	*/
/* begin building the page */
$page->setTitle($story->title);
//$page->pkgStyles(CACHE_PREFIX.'nrStory',array(PATH_PHP_STYLES.'/newsroom.css',PATH_PHP_STYLES.'/tabs.css'));
//$page->pkgScripts(CACHE_PREFIX.'nrStory',array(PATH_PHP_SCRIPTS.'/comments.js',PATH_PHP_SCRIPTS.'/voting.js',PATH_PHP_SCRIPTS.'/journal.js'));
$page->addToHeader('');
$code = buildTop($story->url);
$page->addToFooter('');
//$page->addRSSFeed(URL_HOME.'?p=rss');