<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="top.asp"-->
<!-- 
技术支持：岁月工作室
官网:www.SuiYue.com
QQ:540400100内信箱：540400100@qq.com
-->
<%
Dim theInstalledObjects(5)
theInstalledObjects(0) = "Scripting.FileSystemObject"
theInstalledObjects(1) = "adodb.connection"
theInstalledObjects(2) = "JMail.SMTPMail"
theInstalledObjects(3) = "CDONTS.NewMail"
theInstalledObjects(4) = "Microsoft.FreeThreadedXMLDOM"
theInstalledObjects(5) = "Persits.Jpeg"


'删除超过24小时未付款订单
'删除前要返还库存及积分
set rs=server.CreateObject("adodb.recordset")
rs.open "select productcount,dingdan,shopxpptid,UserName,jifen_dk,pro_color_id,pro_size_id from shopxp_action where zhuangtai=1 and actiondate<= #"&now()-1&"#",conn,1,1
while not rs.eof
set cart_jfdk=rs("jifen_dk")

	set rs_s=server.CreateObject("adodb.recordset")
	rs_s.open "select * from com_PCR where colorid="&rs("pro_color_id")&" and  sizeid="&rs("pro_size_id")&" and proid="&rs("shopxpptid"),conn,1,3
	if not(rs_s.eof or rs_s.bof) then
	rs_s("kucun")=int(rs_s("kucun"))+int(rs("productcount"))
	rs_s.update
	end if
	rs_s.close
	set rs_s=nothing
	
	set rs_s=server.CreateObject("adodb.recordset")
	rs_s.open "select kucun,id,chengjiaocount from com_books where id="&rs("shopxpptid"),conn,1,3
	if not(rs_s.eof or rs_s.bof) then
	rs_s("kucun")=int(rs_s("kucun"))+int(rs("productcount"))
	rs_s("chengjiaocount")=int(rs_s("chengjiaocount"))-int(rs("productcount"))
	rs_s.update
	end if
	rs_s.close
	set rs_s=nothing
	
	set rs_s=server.CreateObject("adodb.recordset")
	rs_s.open "select UserID,jifen from com_user where username='"&rs("UserName")&"'",conn,1,3
	if not rs_s.eof or not rs_s.bof then 
	rs_s("jifen")=int(rs_s("jifen"))+(rs("jifen_dk")*cart_jfdk)
	rs_s.update
	end if
	rs_s.close
	set rs_s=nothing
	'记录积份消费
	if cart_jfdk<>0 then
	call jifen_record(rs("UserName"),rs("jifen_dk")*cart_jfdk,0,"自动删除超过24小时未付款订单返还积分")
	end if
	
	
rs.movenext
wend
rs.close	
conn.execute "delete from shopxp_action where zhuangtai=1 and actiondate<= #"&now()-1&"#"
%>
<!--
conn.execute("Delete From shopxp_action where datediff('d',actiondate,now())>30")
-->
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print();"/></li>
</div>

<div class="tableAll titlebgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px">欢迎进入后台SuiYue网站管理系统 - 服务器信息</li>
</div>

<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px">
网站域名：<%=Request.ServerVariables("SERVER_NAME")%>&nbsp;&nbsp;&nbsp;&nbsp;服务器IP：<%=Request.ServerVariables("LOCAL_ADDR")%><br>
站点物理路径：<%=request.ServerVariables("APPL_PHYSICAL_PATH")%><br>
      XML支持：
      <%If Not IsObjInstalled(theInstalledObjects(4)) Then%>
      <font color="red"><b>×</b></font> 
      <%else%> 
      <b>√</b> 
      <%end if%>&nbsp;&nbsp;&nbsp;&nbsp;
      FSO文本读写： 
      <%If Not IsObjInstalled(theInstalledObjects(0)) Then%>
      <font color="red"><b>×</b></font> 
      <%else%> 
      <b>√</b> 
      <%end if%>&nbsp;&nbsp;&nbsp;&nbsp;
      数据库使用： 
      <%If Not IsObjInstalled(theInstalledObjects(1)) Then%>
      <font color="red"><b>×</b></font> 
      <%else%> 
      <b>√</b> 
      <%end if%><br>
      
      Jmail组件支持： 
      <%If Not IsObjInstalled(theInstalledObjects(2)) Then%>
      <font color="red"><b>×</b></font> 
      <%else%> 
      <b>√</b> 
      <%end if%>&nbsp;&nbsp;&nbsp;&nbsp;
      
      ASPJPEG组件： 
      <%If Not IsObjInstalled(theInstalledObjects(5)) Then%>
      <font color="red"><b>×</b></font> 
      <%else%> 
      <b>√</b> 
      <%end if%>&nbsp;&nbsp;&nbsp;&nbsp;
      
      CDONTS组件支持： 
      <%If Not IsObjInstalled(theInstalledObjects(3)) Then%>
      <font color="red"><b>×</b></font> 
      <%else%> 
      <b>√</b> 
      <%end if%><br>
      数据库使用空间：<b><%=ShowSpaceInfo("../db/")%></b></li>
</div>

<div class="tableAll titlebgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px"><%=admin_admin%></li>
</div>

<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px"><%=admin_admin_01%></li>
</div>
 
</div>
<!--#include file="footer.asp"-->
<%
Function IsObjInstalled(strClassString)
	On Error Resume Next
	IsObjInstalled = False
	Err = 0
	Dim xTestObj
	Set xTestObj = Server.CreateObject(strClassString)
	If 0 = Err Then IsObjInstalled = True
	Set xTestObj = Nothing
	Err = 0
End Function

function ShowSpaceInfo(drvpath)
 on error resume next
 	dim fso,d,size,showsize
 	set fso=server.createobject("scripting.filesystemobject") 		
 	drvpath=server.mappath(drvpath) 		 		
 	set d=fso.getfolder(drvpath) 		
 	size=d.size
 	showsize=size & "&nbsp;Byte" 
 	 if size>1024 then
 	  size=(Size/1024)
 	  showsize=size & "&nbsp;KB"
 	 end if
 	 if size>1024 then
 	  size=(size/1024)
 	  showsize=formatnumber(size,2) & "&nbsp;MB"		
 	 end if
 	 if size>1024 then
 	  size=(size/1024)
 	  showsize=formatnumber(size,2) & "&nbsp;GB"	   
 	 end if   
 	ShowSpaceInfo=showsize
End function	
%>