<div id="mod_links" class="mod" rel="drag">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
	<tr><td class="modtl" width="7">&nbsp;</td>
	<td class="modtc" nowrap><div class="modhead"><span class="modtit">文章分类</span></div></td>
	<td class="modtc" nowrap align="right"></td>
	<td class="modtr" width="7">&nbsp;</td>
	</tr></table>
  <div id="m_links" class="modbox">
<?
$sql="select * from {$tablepre}ftblog_type where userid=".$userid." and blogphoto=0 order by indate desc";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
if ($numrows!=0){
do {
?>
  <div class="item"><span style="margin-left:3px"></span><span id="linkArea"><a href="boker.php?userid=<?=$userid?>&blogtypeid=<?=$myrow["id"]?>"><?=$myrow["blogtype"]?></a>(<?=$myrow["totalnum"]?>)</span>
  </div>
  <div class="line">&nbsp;</div>
<?
   }
 while ($myrow = mysql_fetch_array($rs));
}
?>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
<tr><td class="modbl" width="7">&nbsp;</td>
<td class="modbc">&nbsp;</td>
<td class="modbr" width="7">&nbsp;</td>
</tr></table>
</div>
<div id="comm_info" rel="drag" class="mod">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
	<tr><td class="modtl" width="7">&nbsp;</td>
	<td class="modtc" nowrap><div class="modhead"><span class="modtit">文章存档</span></div></td>
	<td class="modtc" nowrap align="right"></td>
	<td class="modtr" width="7">&nbsp;</td>
	</tr></table>
<div id="m_links" class="modbox">
    <span id="linkArea">
<?
if (trim($_GET["ReqDate"])==""){
 $CurrentDate=dateFormat($getnow,'Y-m-d');
 }
else{
 $CurrentDate=trim($_GET["ReqDate"]);
}

$PreviousMonthDate=dateAdd("MONTH",-1,$CurrentDate);
$NextMonthDate=DateAdd("MONTH",1,$CurrentDate);

$PreviousMonthDate=dateFormat($PreviousMonthDate,'Y-m-d');
$NextMonthDate=dateFormat($NextMonthDate,'Y-m-d');
$arr=explode("-",$CurrentDate);
$bgnum=$arr[1];
$daynum=$arr[2];
?>
<table width="176" cellpadding="2" cellspacing="2" background="blogimages/month<?=$bgnum?>.gif" align=center>
  <tr align="LEFT"> 
                    <td width="14%" height="19" align="center"><a href="log.php?userid=<?=$userid?>&ReqDate=<?=$PreviousMonthDate?>" title="上一月">&lt;&lt;</a></td>
                    <td colspan="5" align="center"><?=$arr[0]."年".$arr[1]."月"?></td>
                    <td width="14%" align="center"><a href="log.php?userid=<?=$userid?>&ReqDate=<?=$NextMonthDate?>" title="下一月">&gt;&gt;</a></td>
  </tr>
                  <tr align="LEFT"> 
                    
    <td style="bold 11px; color:red"> 日</td>
                    <td style="bold 11px;"> 一</td>
                    <td style="bold 11px;"> 二</td>
                    <td style="bold 11px;"> 三</td>
                    <td style="bold 11px;"> 四</td>
                    <td style="bold 11px;"> 五</td>
                    <td style="bold 11px;"> 六</td>
  </tr>
<?
$ym=dateFormat($CurrentDate,'Y-m');
$ym=$ym."-";
$i=1;
while ($i<33){
 $j=0;
 echo "<tr height=19>";
 while ($j<7){
  if (isDate($ym.$i)){
   $myarr=explode("-",$ym.$i);
   $y=$myarr[0];
   $m=$myarr[1];
   $d=$myarr[2];
   $CurrentWeekDay=""; 
   $CurrentWeekDay=date("w",mktime("10","10","10",$m,$d,$y));
   //echo $j."-".$i."-".$CurrentWeekDay;
   if ($j==$CurrentWeekDay){
    if (dateDiff("D",$ym.$i,$getnow)>-1){
     $LinkText="<a href=log.php?userid=".$userid."&blogtypeid=".$blogtypeid."&NewsDate=".$ym.$i.">" .$i. "</a>";
     }
	else{
     $LinkText=$i;
     }
    if ($i!=$daynum){
     echo "<td class=\"calendar\">&nbsp;".$LinkText."</td>";
	 }
    else{
     echo "<td class=\"calendar-today\">&nbsp;".$LinkText."</td>";    
    }
    $i++;
   }
   else{
   echo "<td></td>";
   }
  }
  else{
   echo "<td></td>";
   $i++;
  }
  $j++;
 }
 echo "</tr>";
}
?>
</table>
    <div class="line">&nbsp;</div>
    </div>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
    <tr>
      <td class="modbl" width="7">&nbsp;</td>
      <td class="modbc">&nbsp;</td>
      <td class="modbr" width="7">&nbsp;</td>
    </tr>
  </table>
</div>
<div id="mod_links" class="mod" rel="drag">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
	<tr><td class="modtl" width="7">&nbsp;</td>
	<td class="modtc" nowrap><div class="modhead"><span class="modtit">最新评论</span></div></td>
	<td class="modtc" nowrap align="right">
	</td>
	<td class="modtr" width="7">&nbsp;</td>
	</tr></table>
<div id="m_links" class="modbox">
<?
$sql="select * from {$tablepre}ftblog_pl where userid=".$userid." order by pldate desc limit 0,20";
$rsx=mysql_query($sql);
$myrowx = mysql_fetch_array($rsx);
$numrows = mysql_num_rows($rsx);
if ($numrowsx!=0){
while ($myrowx = mysql_fetch_array($rsx)){
?>
	<div class="item"> <span style="margin-left:3px"></span> <span id="linkArea"><?=$myrowx["netname"]?></span> 
    <br><span style="margin-left:3px"></span><a href="myblog.php?id=<?=$myrowx["blogid"]?>&userid=<?=$myrowx["userid"]?>"><?=substr(nohtml($myrowx["plcontent"]),50)?><? if (strlen(nohtml($myrowx["plcontent"]))>200){echo  "......"; }?></a>
	</div>
	<div class="line">&nbsp;</div>
<?
  }
}
else{
echo "数据为空";
}
?>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
<tr><td class="modbl" width="7">&nbsp;</td>
<td class="modbc">&nbsp;</td>
<td class="modbr" width="7">&nbsp;</td>
</tr></table>
</div>