<?php
//v1.4 www.exoops.info 2006/03 
// $Id: news_bigstory.php,v 1.3 2003/03/19 07:01:09 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
// ------------------------------------------------------------------------- //
function b_news_bigstory_show() {
global $db, $myts;
$block  = array();
$tdate  = mktime(0, 0, 0, date("n"), date("j"), date("Y"));
$result = $db->query("SELECT storyid, title FROM ".$db->prefix("stories")." WHERE (published > ".$tdate." AND published < ".time().") ORDER BY counter DESC", 1, 0);
list($sid, $title) = $db->fetchRow($result);
$block['title'] = _MB_NEWS_TITLE1;
if ( !$sid && !$title ) {
	$block['content'] = _MB_NEWS_NOTYET;
	} else {
		$block['content'] = _MB_NEWS_TMRSI."<br /><br />";
		$block['content'] .= "<a href='".XOOPS_URL."/modules/news/article.php?storyid=$sid'>".$myts->makeTboxData4Show($title)."</a>";
	}
return $block;
}
?>
