load($parms)->toArray(); /* $query = "SELECT n.*, c.*, u.user_id, u.user_name FROM `#news` AS n LEFT JOIN `#news_category` AS c ON n.news_category = c.category_id LEFT JOIN `#user` AS u ON n.news_author = u.user_id WHERE n.news_id = " . intval($parms); //$sql->db_Select("news", "*", "news_id='{$parms}'"); $sql = e107::getDb(); $sql->gen($query); $row = $sql->fetch(); */ $newsUrl = e107::getUrl()->create('news/view/item', $row, 'full=1'); // extract($row); // define("e_PAGETITLE", $news_title); //$news_body = $tp->toHTML($news_body, TRUE, 'BODY'); /* $news_extended = $tp->toHTML($news_extended, TRUE, 'BODY'); if ($news_author == 0) { $a_name = "e107"; $category_name = "e107 welcome message"; } else { $sql->db_Select("news_category", "category_id, category_name", "category_id='{$news_category}'"); list($category_id, $category_name) = $sql->db_Fetch('num'); $sql->db_Select("user", "user_id, user_name", "user_id='{$news_author}'"); list($a_id, $a_name) = $sql->db_Fetch('num'); } $news_datestamp = $con->convert_date($news_datestamp, "long"); $print_text = "

".LAN_PRINT_135.$news_title."


(".LAN_CATEGORY." ".$tp->toHTML($category_name,FALSE,"defs").")
".LAN_POSTED_BY." ".$a_name."
".$news_datestamp."

". $news_body; if (!empty($news_extended)){ $print_text .= "

".$news_extended; } if (!empty($news_extended)){ $print_text .= "

".$news_extended; } if (!empty($news_source)){ $print_text .= "

".$news_source; } if (!empty($news_url)){ $print_text .= "
".$news_url; } */ $tmp = e107::getTemplate('news', 'news', 'view'); if(empty($tmp)) { $newsViewTemplate = !empty($row['news_template']) ? $row['news_template'] : 'default'; $tmp = e107::getTemplate('news', 'news_view', $newsViewTemplate); } $template = $tmp['item']; unset($tmp); // ob_start(); require_once(e_HANDLER."news_class.php"); $ix = new news; $print_text = $ix->render_newsitem($row, 'return', '', $template, null); //$print_text = ob_get_flush(); $print_text .= "


". LAN_PRINT_303."".SITENAME."
".$newsUrl." "; } if(defined("TEXTDIRECTION") && TEXTDIRECTION == "rtl"){ $align = 'right'; }else{ $align = 'left'; } // Header down here to give us a chance to set a page title require_once(HEADERF); //temporary solution - object of future cahges if(is_readable(THEME.'print_template.php')) { include_once(THEME.'print_template.php'); echo $tp->parseTemplate($PRINT_TEMPLATE); } else { echo "
".$tp->parseTemplate("{LOGO: h=100}", TRUE)."

".$print_text."


"; } require_once(FOOTERF); ?>