if (!isset($_SESSION['c_time'.$aid])) // 如果第一次访问,设定时间戳,并允许增加
{
$_SESSION['c_time'.$aid] = time();
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery("Update dede_archives set click=click+1 where ID='$aid'");
if(!empty($mid)){
$dsql->ExecuteNoneQuery("Update dede_member set pageshow=pageshow+1 where ID='$mid'");
}
if(!empty($view)){
$row = $dsql->GetOne("Select click From dede_archives where ID='$aid'");
echo "document.write('".$row[0]."');\r\n";
}
$dsql->Close();
exit();