<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>-最高权限-订单交易记录</title>
<%
call logquanxian("d1",1)
%>
<DIV>


<DIV id=main1200> 
<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {

	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
var checkflag1 = "false";
function check1(field) {
if (checkflag1 == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag1 = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag1 = "false";
return "true"; }
}

function unselectall1()
{
    if(document.myform.chkAll1.checked){
	document.myform.chkAll1.checked = document.myform.chkAll1.checked&0;
	checkflag1 = "false";
    } 	
}
</script>
<SCRIPT LANGUAGE="JavaScript">
function hebin(){

if(confirm("确定要合并订单吗？")){
	document.getElementById("ishebin").value="hebin";
	document.getElementById("isdel").value="";
	document.getElementById(myform).submit();
        return true;
}else{
        return false;
}
}
</script>

<SCRIPT LANGUAGE="JavaScript">
function ddel(){

if(confirm("确定要删除订单吗？")){
	document.getElementById("isdel").value="alldel";
	document.getElementById("ishebin").value="";
	document.getElementById(myform).submit();
        return true;
}else{
        return false;
}
}
</script>


<%
if request.QueryString("act")="fsuoding" then
id=request.QueryString("id")
sql="select ayddissuo,aydingdanid from "&adminddku&" where aydingdanid="&id&"" 
rs.open sql,conn,1,3
rs("ayddissuo")=1
rs.update
rs.close 
response.Redirect "adminddmai.asp?ddku="&adminddku&""
end if
if request.QueryString("act")="fjiesuo" then
id=request.QueryString("id")
sql="select ayddissuo,aydingdanid from "&adminddku&" where aydingdanid="&id&"" 
rs.open sql,conn,1,3
rs("ayddissuo")=0
rs.update
rs.close 
response.Redirect "adminddmai.asp?ddku="&adminddku&""
end if

if request.QueryString("act")="suo" then
suoid=request.QueryString("id")
sql="select ayddsuo,aydingdanid from "&adminddku&" where aydingdanid="&suoid&"" 
rs.open sql,conn,1,3
rs("ayddsuo")=1
rs.update
rs.close 
response.Redirect "adminddmai.asp?ddku="&adminddku&""
end if
if request.QueryString("act")="jiesuo" then
suoid=request.QueryString("id")
sql="select ayddsuo,aydingdanid from "&adminddku&" where aydingdanid="&suoid&"" 
rs.open sql,conn,1,3
rs("ayddsuo")=0
rs.update
rs.close 
response.Redirect "adminddmai.asp?ddku="&adminddku&""
end if


if request.QueryString("uid")<>"" then uid=request.QueryString("uid")
aact=request.QueryString("aact")

link="adminddmai.asp?cact=&ddku="&adminddku&""
if uid<>"" then link=link&"&uid="&uid
if aact<>"" then link=link&"&aact="&aact


ishebin=request.Form("ishebin")
if ishebin="hebin" then
call lognamecode()
list1=request.Form("list1")
ddku=request.Form("ddku")
if list1="" then call PopErr("未找到此项目")

	hebinid=split(list1,",")
	
	if Ubound(hebinid)<1 then call PopErr("请至少选择2个订单进行合并")


sql="select aydingdanid,aydingdansum,ayddzffangshi from "&ddku&" where aydingdanid="&trim(hebinid(0))&"" 
rs.open sql,conn,1,3 
if not (rs.bof and rs.eof) then
if cint(rs("ayddzffangshi"))<>1 then call PopErr("只允许合并充值卡订单")
ddd=trim(rs("aydingdansum"))
else
call PopErr("出现错误err1")
end if
rs.close
	
	For dianka=1 To Ubound(hebinid) 
	sql="select aydingdanid,aydingdansum,ayddzffangshi from "&ddku&" where aydingdanid="&trim(hebinid(dianka))&"" 
	rs.open sql,conn,1,3 
	if rs.bof and rs.eof then
	call PopErr("未找到此项目err2")
	else
	fangshi=cint(rs("ayddzffangshi"))
	ddhcard=trim(rs("aydingdansum"))
	rs.close
		
	
	end if
	next
	call logadd(request.Cookies("aynameid"),"管理-订单合并成功",0,0)
	call PopErr2("订单合并成功！","adminddmai.asp?ddku="&ddku&"")
end if


act=request.QueryString("act")

if act="one" then 
response.Cookies("dateaa")=""
response.Cookies("datebb")=""
response.Cookies("dingdan")=""
response.Cookies("shangid")=""
response.Cookies("zhuangtai")=""
response.Cookies("youhui")=""
response.Cookies("ddip")=""
end if

if act="del" then
call lognamecode()
id=request.QueryString("id")
ddh=request.QueryString("ddh")
page=request.QueryString("page")
sql="select * from "&adminddku&" where aydingdanid="&id&"" 
rs.open sql,conn,1,3
rs.delete
rs.close

call logadd(request.Cookies("aynameid"),"管理-订单删除成功"&id,0,0)
response.Redirect("adminddmai.asp?ddku="&adminddku&"&page="&page)
end if

isdel=request.Form("isdel")
if isdel="alldel" then
call lognamecode()
list1=request.Form("list1")
ddku=request.Form("ddku")
if list1="" then call PopErr("未找到此项目")
	delid=split(list1,",")
	
	For dianka=0 To Ubound(delid) 
	sql="select * from "&ddku&" where aydingdanid="&trim(delid(dianka))&"" 
	rs.open sql,conn,1,3 
	if rs.bof and rs.eof then
	call PopErr("未找到此项目")
	else
	ddhcard=trim(rs("aydingdansum"))
	rs.delete
	rs.close

	end if
	next
	call logadd(request.Cookies("aynameid"),"管理-订单多选删除成功",0,0)
	response.Redirect("adminddmai.asp?ddku="&ddku&"&page="&page&"")

end if



if act="cha" then
sqldd=""
anian=request.Form("anian")
ayue=request.Form("ayue")
ari=request.Form("ari")
bnian=request.Form("bnian")
byue=request.Form("byue")
bri=request.Form("bri")
dingdan=trim(request.Form("dingdan"))
shangid=request.Form("shangid")
zhuangtai=request.Form("zhuangtai")
youhui=request.Form("youhui")
ddip=request.Form("ddip")

adminddku=getddku(dingdan)



if anian<>0 and ayue<>0 and ari<>0 then
	response.Cookies("dateaa")=anian&"-"&ayue&"-"&ari
	if bnian<>0 and byue<>0 and bri<>0 then
	response.Cookies("datebb")=bnian&"-"&byue&"-"&bri
	if DateDiff("d",request.Cookies("dateaa"),request.Cookies("datebb"))<0 then call PopErr("时间输入有误")
	end if
else
response.Cookies("dateaa")=""
response.Cookies("datebb")=""
end if

if dingdan<>"" then
response.Cookies("dingdan")=dingdan
else
response.Cookies("dingdan")=""
end if


if ddip<>"" then
response.Cookies("ddip")=ddip
else
response.Cookies("ddip")=""
end if



if shangid<>"0" then
response.Cookies("shangid")=shangid
else
response.Cookies("shangid")=""
end if

if zhuangtai<>"99" then
response.Cookies("zhuangtai")=zhuangtai
else
response.Cookies("zhuangtai")=""
end if

if youhui<>"" then


response.Cookies("youhui")=youhui
else
response.Cookies("youhui")=""
end if

end if


if request.Cookies("dateaa")<>"" and request.Cookies("datebb")<>"" then
sqldd=sqldd&" and  datediff(day,aydingdansj,'"&request.Cookies("dateaa")&"')<=0 and datediff(day,aydingdansj,'"&request.Cookies("datebb")&"')>=0"
elseif request.Cookies("dateaa")<>"" then
sqldd=sqldd&" and  datediff(day,aydingdansj,'"&request.Cookies("dateaa")&"')<=0 and datediff(day,aydingdansj,'"&now()&"')>=0"
end if
if request.Cookies("dingdan")<>"" then sqldd=sqldd&" and aydingdansum ='"&request.Cookies("dingdan")&"'"
if request.Cookies("shangid")<>"" then sqldd=sqldd&" and ayddshangid='"&request.Cookies("shangid")&"'"
if request.Cookies("zhuangtai")<>"" then sqldd=sqldd&" and aydingdanzt="&request.Cookies("zhuangtai")&""


if request.Cookies("ddip")<>"" then sqldd=sqldd&" and aybuyipxx like '%"&request.Cookies("ddip")&"%'"

if request.Cookies("youhui")<>"" then
if request.Cookies("youhui")=1 then sqldd=sqldd&" and ayddyouhuiquanzhi<>''"
if request.Cookies("youhui")=2 then sqldd=sqldd&" and ayddyouhuiquanzhi is null"
end if

if uid<>"" then  sqldd=sqldd&" and aydingdanuser="&uid&""

if sqldd<>"" then
sqldd="where "&mid(sqldd,5,len(sqldd))  '去除and 
end if


uid=request.QueryString("uid")

%>
<DIV class=right_titleadmin>&nbsp;&nbsp;订单查询</DIV>
<DIV class=main><br>

<form action="?act=cha&ddku=<%=adminddku%>" method="post" name="chaxun" id="chaxun">
&nbsp;订单时间：
<select name="anian" id="anian">
  <option value="0" selected>年</option>
  <option value="0" >不限</option>
  <option value="2015" 
  <%if request.Cookies("dateaa")<>"" then
  if year(request.Cookies("dateaa"))="2015" then response.Write("selected")
  end if
  %>>2015</option>
  <option value="2014" 
  <%if request.Cookies("dateaa")<>"" then
  if year(request.Cookies("dateaa"))="2014" then response.Write("selected")
  end if
  %>>2014</option>
  <option value="2013" 
  <%if request.Cookies("dateaa")<>"" then
  if year(request.Cookies("dateaa"))="2013" then response.Write("selected")
  end if
  %>>2013</option>
</select>
<select name="ayue" id="ayue">
  <option value="0" selected>月</option>
  <option value="0" >不限</option>
  <%for i=1 to 12%>
  <option value="<%=i%>" 
  <%if request.Cookies("dateaa")<>"" then
  if Month(request.Cookies("dateaa"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
<select name="ari" id="ari">
  <option value="0" selected>日</option>
  <option value="0" >不限</option>
  <%for i=1 to 31%>
  <option value="<%=i%>" 
  <%if request.Cookies("dateaa")<>"" then 
  if day(request.Cookies("dateaa"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
至
<select name="bnian" id="bnian">
  <option value="0" selected>年</option>
  <option value="0" >不限</option>
  <option value="2015" 
  <%if request.Cookies("datebb")<>"" then
  if year(request.Cookies("datebb"))="2015" then response.Write("selected")
  end if
  %>>2015</option>
  <option value="2014" 
  <%if request.Cookies("datebb")<>"" then
  if year(request.Cookies("datebb"))="2014" then response.Write("selected")
  end if
  %>>2014</option>
  <option value="2013" 
  <%if request.Cookies("datebb")<>"" then
  if year(request.Cookies("datebb"))="2013" then response.Write("selected")
  end if
  %>>2013</option>
</select>
<select name="byue" id="byue">
  <option value="0" selected>月</option>
  <option value="0" >不限</option>
  <%for i=1 to 12%>
  <option value="<%=i%>" 
  <%if request.Cookies("datebb")<>"" then
  if Month(request.Cookies("datebb"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
<select name="bri" id="bri">
  <option value="0" selected>日</option>
  <option value="0" >不限</option>
  <%for i=1 to 31%>
  <option value="<%=i%>" 
  <%if request.Cookies("datebb")<>"" then 
  if day(request.Cookies("datebb"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
<br><br>
&nbsp;订单号：
<input name="dingdan" type="text" id="dingdan" value="<%if request.Cookies("dingdan")<>"" then response.Write trim(request.Cookies("dingdan"))%>" size="20" maxlength="20">
买家IP<input name="ddip" type="text" id="ddip" value="<%if request.Cookies("ddip")<>"" then response.Write trim(request.Cookies("ddip"))%>" size="20" maxlength="20">
<select name="zhuangtai" id="zhuangtai">
  <option value="99">支付状态</option>
  <option value="99">不限</option>
  <option value="0" 
  <%
    if request.Cookies("zhuangtai")<>"" then
	if cint(request.Cookies("zhuangtai"))=0 then response.Write("selected")
	end if
  %>
  >未支付</option>
  <option value="1"
    <%
    if request.Cookies("zhuangtai")<>"" then
	if cint(request.Cookies("zhuangtai"))=1 then response.Write("selected")
	end if
  %>>支付成功</option>
  <option value="2"
    <%
    if request.Cookies("zhuangtai")<>"" then
	if cint(request.Cookies("zhuangtai"))=2 then response.Write("selected")
	end if
  %>>支付失败</option>
</select>
<select name="youhui" id="youhui">
  <option value="0">优惠券</option>
  <option value="0">不限</option>
  <option value="1"
  <%
    if request.Cookies("youhui")<>"" then
	if cint(request.Cookies("youhui"))=1 then response.Write("selected")
	end if
  %>>使用</option>
  <option value="2"
  <%
    if request.Cookies("youhui")<>"" then
	if cint(request.Cookies("youhui"))=2 then response.Write("selected")
	end if
  %>>未使用</option>
</select>
&nbsp;
<input type="submit" name="Submit" value=" 订 单 查 询 ">
<br>
&nbsp;
</form>
  <table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=alldel&page=<%=page%>" method="post" name="myform" id="myform"> 
       <tr>
        <th align="center" class="border_right border_bottom" >&nbsp;</th>
        <th align="center" class="border_right border_bottom" >订单号        
        <th align="center" class="border_right border_bottom" >相关        
        <th align="center" class="border_right border_bottom" >商品
        <th align="center" class="border_right border_bottom" >商户        
        <th align="center" class="border_right border_bottom" >原价        
        <th align="center" class="border_right border_bottom" >单价    
        <th align="center" class="border_right border_bottom" >数量    
        <th align="center" class="border_right border_bottom">总价
        <th align="center" class="border_right border_bottom">订单状态
        <th align="center" class="border_right border_bottom">通道        
        <th align="center" class="border_right border_bottom">渠道        
        <th align="center" class="border_right border_bottom">联系方式        
        <th align="center" class="border_right border_bottom">时间                
        <th align="center" class="border_bottom">删       </tr>
<%
dhstr=""
zong=0
		set rs2=server.CreateObject("adodb.recordset")
		set rsgood=server.CreateObject("adodb.recordset")
		set rsuser=server.CreateObject("adodb.recordset")
		
		sql2="select top 15 aylxcon,aylxku,aylogdate,aydddsum,aylxbuyid from aybuylx where aylxbuyid="&uid&" order by aylogdate desc"
		rs2.open sql2,conn,1,1
		if not(rs2.bof and rs2.eof) then
		do while not(rs2.eof) 
		ddhstr=ddhstr&trim(rs2("aydddsum"))&","
		rs2.movenext
		loop
		else
		response.Write "还没有任何订单"
		response.end
		end if
		rs2.close

		ddhstr=mid(ddhstr,1,len(ddhstr)-1)

		aykustr=split(ddhstr,",")
		zong=Ubound(aykustr)
		if zong<0 then zong=0




		For dd=0 To zong

		sql="select * from "&getddku(trim(aykustr(dd)))&" where aydingdansum='"&trim(aykustr(dd))&"'" 
		rs.open sql,conn,1,1
		if not(rs.bof and rs.eof) then


%> 

	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
        <td align="center" class="border_right border_bottom"><input name="list1" type="checkbox" id="list1" value="<%=rs("aydingdanid")%>" onClick="unselectall1()"></td>
        <td align="center" class="border_right border_bottom">
        <%if cint(rs("ayddsuo"))=1 then%>
        <a href="adminmydingdanc.asp?id=<%=rs("aydingdanid")%>&ddku=<%=adminddku%>" style="color:#F00"><strong><%=trim(rs("aydingdansum"))%></strong></a>
        <%else%>
        <a href="adminmydingdanc.asp?id=<%=rs("aydingdanid")%>&ddku=<%=adminddku%>"><%=trim(rs("aydingdansum"))%></a>
        <%end if%>
          <input name="ddhcard" type="hidden" id="ddhcard" value="<%=trim(rs("aydingdansum"))%>">
		<a href="adminsqldd.asp?act=cha&ddname=<%=trim(rs("aydingdansum"))%>&ddku=<%=adminddku%>" target="_blank" style="color:#FF6600">[查]</a> </td>
        <td align="center" class="border_right border_bottom">
		<%
		if trim(rs("ayddyouhuiquan"))<>"" then 
		response.Write"<span style=color:#FF6600>[优惠]</span>"
		else
			if ccur(rs("aydigndanyf"))<ccur(rs("aydingdanzj")) then response.Write"<span style=font-weight: bold; color: #FF0000>异常</span>"
		end if
		if cint(rs("isalipayfz"))=1 then response.Write"<span style=color:#FF6600>[秒结]</span>"
		
		'0序号 1上级商品ID 2上级商品代理价格 3本商户ID 4上级代理ID 5上级卡密库 6上级订单库 7上级财务库 8上级代理入款 9统计利润金额
		if trim(rs("dailikuo"))<>"" then 

		dailistr=split(trim(rs("dailikuo")),"|")
		
		For sum=0 To Ubound(dailistr) 
			didstr=split(dailistr(sum),",")
			response.Write"<a style=color:#339933 href=adminuseredit.asp?id="&didstr(4)&" target=_blank>["&totruename(didstr(4))&"]</a>"
			if Ubound(dailistr)>0 then response.Write "<br>"
		next

		end if
		
		if ccur(rs("ayddquantity"))>1 then
		if ccur(rs("aydingdanjin"))<ccur(rs("aydingdanyj")) then
		response.Write"<span style=color:#FF6600>[批发]</span>"
		end if
		end if
		%>

        </td>
        <td align="center" class="border_right border_bottom">
		<%
		rsgood.open "select aygoodid,aygoodname from aygood where aygoodid="&clng(rs("ayddshangid"))&"" ,conn,1,1
		if not(rsgood.bof and rsgood.eof) then
		if len(trim(rsgood("aygoodname")))>15 then
		%>
		<a href="admingoodedit.asp?id=<%=rs("ayddshangid")%>" title="<%=trim(rsgood("aygoodname"))%>" target="_blank"><%=left(rsgood("aygoodname"),15)&"…"%></a>
		<%
		else%>
		<a href="admingoodedit.asp?id=<%=rs("ayddshangid")%>" title="<%=trim(rsgood("aygoodname"))%>" target="_blank"><%=rsgood("aygoodname")%></a>
		<%
		end if
		else
		response.Write("商品或已删除")
		end if
		rsgood.close
		%></td>
        <td align="center" class="border_right border_bottom">
		<a href="adminuseredit.asp?id=<%=rs("aydingdanuser")%>" target="_blank">
		<%
		rsuser.open "select aynameid,ayusername,aytrueuser from ayname where aynameid="&rs("aydingdanuser")&"" ,conn,1,1
		if not(rsuser.bof and rsuser.eof) then
		response.Write trim(rsuser("aytrueuser")) 
		else
		response.Write("商户或已删除")
		end if
		rsuser.close
		%></a>
        </td>
        <td align="center" class="border_right border_bottom"><%=Formatnumber(rs("aydingdanyj"),2,true,-1,0)%></td>
        <td align="center" class="border_right border_bottom"><%=Formatnumber(rs("aydingdanjin"),2,true,-1,0)%></td>
        <td align="center" class="border_right border_bottom"><%=rs("ayddquantity")%></td>
		<td align="center" class="border_right border_bottom" style="color: #FF0000; font-weight: bold"><%
		if trim(rs("aydingdanzj"))<>"" then
		response.Write Formatnumber(rs("aydingdanzj"),3,true,-1,0)
		else
		response.Write ("-")
		end if
		%></td>
        <td align="center" class="border_right border_bottom">
          <%
		
				if cint(rs("aydingdanzt"))=0 then response.Write("未付款")
				if cint(rs("aydingdanzt"))=1 then response.Write("<font color=#00CC00>支付成功</font>")
				if cint(rs("aydingdanzt"))=2 then response.Write("<font color=red>支付失败</font>")
				if cint(rs("aydingdanzt"))=4 then response.Write"<font color=red>[已支付,卡密不足]</font>"


		%>		</td>
        <td align="center" class="border_right border_bottom">
          <%
		if cint(rs("ayddzffangshi"))=99 then 
		response.Write "余额"
		elseif cint(rs("ayddzffangshi"))=10 then 
		response.Write "<span style=color:#F3C>ALIPAY</span>"
		elseif cint(rs("ayddzffangshi"))=12 then 
		response.Write "<span style=color:#F3C>TENPAY</span>"
		elseif cint(rs("ayddzffangshi"))=13 then 
		response.Write "<span style=color:#F3C>WEIXIN</span>"
		else
		response.Write trim(rs("ayddpid"))
		end if
		%>		</td>
        <td align="center" class="border_right border_bottom"><%=trim(rs("qudao"))%></td>
        <td align="center" class="border_right border_bottom"><%if trim(rs("ayddcontact"))<>"" then
		response.Write rs("ayddcontact")
		else
		response.Write("-")
		end if
		%></td>
        <td align="center" class="border_right border_bottom"><%=rs("aydingdansj")%></td>
        <td align="center" class="border_bottom">
          <a href="?act=del&id=<%=rs("aydingdanid")%>&ddh=<%=trim(rs("aydingdansum"))%>&page=<%=page%>&ddku=<%=adminddku%>" onClick="javascript:return confirm('您确定要删除吗？');"><img src="<%=ossurl%>images/ico_del.gif" alt="删除分类" border="0"></a>		</td>
	  </tr>
<%
		end if
		rs.close
		
		next

%>
	  

      <tr>
        <td colspan="15">
&nbsp;<input name="chkAll1" type="checkbox" id="chkAll1" onClick="this.value=check1(this.form.list1)" value="checkbox">全选
<input type="submit" name="Submit2" value="删除选定" onClick="return ddel();">
<input type="submit" name="Submit3" value="合并订单" onClick="return hebin();">
<input name="ishebin" type="hidden" id="ishebin" value=""><input name="isdel" type="hidden" id="isdel" value="">
<input name="uid" type="hidden" id="uid" value="<%=uid%>"><input name="ddku" type="hidden" id="ddku" value="<%=adminddku%>">
          <%if pagecount=0 then   
response.write("首页 ")
elseif page=1 then       
response.write("首页 ")
else%>                   
<a href="<%=link%>&page=1">首页</a>
<%end if

if pagecount=0 then   
response.write("上页&nbsp;")
elseif page=1 then       
response.write("上页&nbsp;")
else%>                   
<a href="<%=link%>&page=<%=page-1%>">上页</a>&nbsp;
<%end if

if pagecount>20 then
if page<=10 then 
aa=1
bb=20
aabu=""
bbbu=" … "
elseif page>=11 then 
aa=page-9
bb=page+10
aabu=" …"
bbbu=" … "
	if bb>=pagecount then 
	aa=pagecount-20
	bb=pagecount
	aabu=" … "
	bbbu=""
	end if
end if
response.Write aabu
for aa=aa to bb
if page=aa then
response.Write("<a href="&link&"&page="&aa&"><strong>"&aa&"</strong></a>&nbsp;")
else
response.Write("<a href="&link&"&page="&aa&">"&aa&"</a>&nbsp;")
end if
next
response.Write bbbu

else

for i=1 to pagecount
if page=i then
response.Write("<a href="&link&"&page="&i&"><strong>"&i&"</a></strong>&nbsp;")
else
response.Write("<a href="&link&"&page="&i&">"&i&"</a>&nbsp;")
end if
next

end if

if pagecount=0 then 
response.write("下页&nbsp;")
elseif page=pagecount then 
response.write("下页&nbsp;")
else%>                    
<a href="<%=link%>&page=<%=page+1%>">下页</a>
<%end if%>
<%if pagecount=0 then  '总页数为0 显示空
response.write("尾页 ") 
elseif page=pagecount then 
response.write("尾页 ")
else%>                    
<a href="<%=link%>&page=<%=pagecount %>">尾页</a>
<%end if

if pagecount<>0 then 
response.Write page&"/"&pagecount
end if
response.Write "&nbsp;共"&zongshu&"条"
%>		<a href="<%=link%>&aact=all">查看全部</a></td>
      </tr></form>
    </table>
</DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>
<SCRIPT>
$(function(){
$('.left_title').each(function(){
   $(this).click(function(){
	   var index=$('.left_title').index(this);
	   if($(this).next().hasClass('hide_m')){
		   $(this).next().removeClass('hide_m');
           $(this).next().show();		 
		   $(this).find('img').attr('src','<%=ossurl%>images/expansion.gif');
		   $.cookie('m_index_'+index,'',{expires:0});
	   } else {
	       $(this).next().hide();
		   $(this).next().addClass('hide_m');
		   $(this).find('img').attr('src','<%=ossurl%>images/shrank.gif');		   
		   $.cookie('m_index_'+index,'none',{expires:365});
	   }
   })
})

$('.left_title').each(function(){
	var index=$('.left_title').index(this);
    $(this).next().css('display',$.cookie('m_index_'+index) ? $.cookie('m_index_'+index) : '');
	if($.cookie('m_index_'+index)){
	    $(this).next().addClass('hide_m');
	}
	$(this).find('img').attr('src',$.cookie('m_index_'+index) ? '<%=ossurl%>images/shrank.gif' : '<%=ossurl%>images/expansion.gif');
})
})

</SCRIPT>


<!--#include virtual="/show/footadmin.asp"-->

