<?php
include("../../common.php");
include("../common.php");
//include("../../../include/sec_master.php");
$num = $_REQUEST["num"];
$catID = $_REQUEST["catID"];
$dot = $_REQUEST["dot"];
$len = $_REQUEST["len"];
$linkStr = "";
if(!$num)
	$num = 7;
if($catID)
	$condStr = " and catID='$catID'";
else
	$condStr = "";
if($dot=="dot")
	$dotStr = "<img src='/images/cool/dot1.jpg' align='absmiddle' border='0'>";
else
	$dotStr = "<img src='/images/cool/dot1.jpg' align='absmiddle' border='0'>";
if($len){
	$len = $len;
	$linkStr = "class='link_title'";
}	
else
	$len = 0;					
$t = mysql_query("select d.*,c.title from {$_tpre}blog_details d inner join {$_tpre}blog_cats c on(d.catID=c.ID) where d.parentID=0 $condStr order by d.ID desc limit 0,$num");
echo "<ul>";
$swapC = "";
$c1 = 0;
$bgcolorC = 0;
$caching_date = "";
$width = 126;
while ($i = mysql_fetch_array($t)) {
	if($c1 % 2 ==0) $swapC = "";else $swapC="";
	$c1++;
	$ID = $i["ID"];
	$subject = $i["subject"];
	$user = $i["user"];$user = "Author: $user";
	$pDate = "<font class='small'>".date_mysql_au(substr($i["postDate"],0,10))."</font>";  
	$hotnet = BLOG_PATH.hotnet_url($ID,$subject);
	if(strlen($subject)>$width)
		$subject = substr($subject,0,$width)." ...";
	$subject = "<a href='$hotnet'>$subject</a>";
	//---------------------------------------
	/*$postDate = substr($i["postDate"],0,10);
	$postDate = date("l M d, Y",strtotime($postDate));
	if($caching_date!=$postDate){
		$caching_date = $postDate;
		$dis_date = "<div>".$caching_date."</div>";
	}
	else{
		$dis_date = "";
	}*/
	//---------------------------------------
	echo "<li><span>$pDate</span> [".$i["title"]."] $subject</li>";
	$bgcolorC++;   
}		
echo "</ul>";
?>