<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
//v1.6 www.exoops.info 2006/03 
// $Id: print.php,v 1.5 2003/03/19 07:01:24 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: The Xoops Project
// Author Website : http://www.xoops.org
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
include_once("./header.php");
if ( empty($storyid) ) {
	redirect_header("index.php");
	} else {
		$storyid = intval($storyid);
	}
include_once(XOOPS_ROOT_PATH."/modules/".$xoopsModule->dirname()."/class/class.newsstory.php");
//---------------------------------------------------------------------------------------//
/**
* Description
*
* @param type $var description
* @return type description
*/
function PrintPage($storyid) {
global $xoopsModule, $bcoosConfig, $myts;
?>
<?php echo '<?xml version="1.0" encoding="'._CHARSET.'"?>';?>
<html>
<head>
<title><?php echo $bcoosConfig['title'];?></title>
<meta http-equiv="content-type" content="text/html; charset=<?php echo _CHARSET;?>">
<meta name="generator" content="<?php echo XOOPS_VERSION;?>">
<meta name="description" content="<?php echo $bcoosConfig['description'];?>">
<?php readfile(XOOPS_ROOT_PATH . "/modules/system/cache/header.php");?>
<link rel="icon" href="<?php echo XOOPS_URL."/icon.png";?>" type="image/png">
<link rel="shortcut icon" href="<?php echo XOOPS_URL."/icon.png";?>" type="image/png">
</head>
<body bgcolor='#ffffff' text='#000000'>
<table align='center' border='0' width='640' cellpadding='0' cellspacing='1' bgcolor='#000000'><tr><td>
<table border='0' width='640' cellpadding='20' cellspacing='1' bgcolor='#FFFFFF'><tr><td>
<div align='center'>
<?php
if (@file_exists(XOOPS_URL."/themes/".$bcoosConfig['default_theme']."/images/logo.png")) {
	echo "<img src='".XOOPS_URL."/themes/".$bcoosConfig['default_theme']."/images/logo.png' border='0' alt='".$myts->makeTboxData4Show($bcoosConfig['title'])."' />";
	} else {
		echo "<img src='".XOOPS_URL."/images/logo.png' border='0' alt='".$myts->makeTboxData4Show($bcoosConfig['title'])."' />";
	}
$story    = new NewsStory($storyid);
$datetime = formatTimestamp($story->published(), 's');
echo "</div>
<br /><br />
<font size='+2'><b>".$story->title()."</b></font><br />
<font size='2'><b>"._NW_TOPICC."</b>&nbsp;".$story->topic_title()." <b>"._NW_DATE.":</b>&nbsp;".$datetime."</font>
<br /><br />".$story->hometext();
if ($bodytext = $story->bodytext()) {
	$bodytext = str_replace("[pagebreak]", "", trim($story->bodytext()));
	echo $bodytext."<br /><br />";
}
echo "
<br /><br />
<hr size='1' noshade='noshade' />";
echo printf(_NW_THISCOMESFROM, $bcoosConfig['title'])."
<br /><a href=".XOOPS_URL.">".XOOPS_URL."</a>
<br /><br />"._NW_URLFORSTORY."<br />
<a href='".XOOPS_URL."/modules/".$xoopsModule->dirname()."/article.php?storyid=".$story->storyid()."'>".XOOPS_URL."/article.php?storyid=".$story->storyid()."</a>
</td></tr></table>
</td></tr></table>
</body>
</html>";
}
PrintPage($storyid);
?>
