<?php
// $Id: news_bigstory.php,v 1.1 2004/07/11 10:28:40 Farsus Exp $
// -------------------------------------------------------------------------//
//			                 RUNCMS                                         //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// 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->fetch_row($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;
}
?>
