Location: PHPKode > projects > ProjectPress > projectpress/news/read_news.php
<?php 
/**
 * ProjectPress news/announcement page
 *
 * @package ProjectPress
 * @since 2.0
 */

// Starts the session.
session_start();

define('access',true);

include(dirname(dirname(__FILE__)) . '/config.inc.php');
include(PM_DIR . 'pm-includes/global.inc.php');
require(PM_DIR . 'pm-includes/functions.php');
include(PM_DIR . 'pm-includes/header.php');

// Enable for error checking and troubleshooting.
//display_errors();

$query = pmdb::connect()->query("SELECT * FROM ". DB ."news WHERE newsid = '" . $_GET['id'] . "'");
$rm = $query->fetch_object();

	/**
	 * Creates a new template for the news page.
	 */
	$readnews = new Template(PM_DIR . "pm-includes/tpl/read_news.tpl");
	$readnews->set("pmurl", get_pm_option('siteurl'));
	$readnews->set("newstitle", $rm->title);
	$readnews->set("newsdate", date('F d, Y h:i A',strtotime($rm->dtime)));
	$readnews->set("newstext", clickable_link(nl2br($rm->text)));
	
	/**
	 * Outputs the page with full news/announcement.
	 */
	echo $readnews->output();

include(PM_DIR . 'pm-includes/footer.php');
Return current item: ProjectPress