<?php 
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_ArcTj');
$dsql = new DedeSql(false);
$row1 = $dsql->GetOne("Select count(*) as dd From #@__archives");
$row2 = $dsql->GetOne("Select count(*) as dd From #@__feedback");
$row3 = $dsql->GetOne("Select count(*) as dd From #@__member");

function GetArchives($dsql,$ordertype)
{
	$starttime = mytime() - (24*3600*30);
	if($ordertype=='monthFeedback'
	||$ordertype=='monthHot') $swhere = " where senddate>$starttime ";
	else $swhere = "";
	if(eregi('feedback',$ordertype)) $ordersql = " order by postnum desc ";
	else $ordersql = " order by click desc ";
	$query = "Select ID,title,click,postnum From #@__archives $swhere $ordersql limit 0,20 ";
	$dsql->SetQuery($query);
	$dsql->Execute('ga');
	while($row = $dsql->GetObject('ga')){
		if(eregi('feedback',$ordertype)) $moreinfo = "[<a target='_blank' href='".$GLOBALS['cfg_plus_dir']."/feedback.php?arcID={$row->ID}'><u>ÆÀÂÛ£º{$row->postnum}</u></a>]";
		else $moreinfo = "[µã»÷£º{$row->click}]";
		echo "¡¤<a href='archives_do.php?aid={$row->ID}&dopost=viewArchives' target='_blank'>";
		echo cn_substr($row->title,30)."</a>{$moreinfo}<br/>\r\n";
	}
}

require_once(dirname(__FILE__)."/templets/content_tj.htm");

$dsql->Close();

?>