⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 right.asp

📁 C2C二手交易网SMRUC v2.0 全部实现了C2C电子商务功能。 特别适合高校、组织、社区实现自己的C2C电子商务。 C2C二手交易网SMRUC v2.0具有强大的用户自主发布和管理信息功能
💻 ASP
字号:
<%
if session("admin_name")="" then
    response.write "<script LANGUAGE='javascript'>alert('对不起,登陆超时!');</script>"
	response.end
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="../function.asp"-->
<%
action=request.QueryString("action")
if action="del_data_user" then

set rs=server.createobject("adodb.recordset")
sql="select webconfig_userday from config"
rs.open sql,conn,1,1
ud=rs("webconfig_userday")
rs.close

sql="select user_name,user_lastlogintime from [user]"

rs.open sql,conn,1,1
i=0
do while not rs.eof

if datediff("d",rs("user_lastlogintime"),now())>=ud then
sql="delete from [user] where user_name='"&rs("user_name")&"'"
sql2="delete from [info] where info_user='"&rs("user_name")&"'"
sql3="delete from [piece] where piece_reciever='"&rs("user_name")&"'"
conn.execute(sql)
conn.execute(sql2)
conn.execute(sql3)
i=i+1
end if
rs.movenext
loop
message="共清除 "&i&" 个用户"
rs.close
end if

if action="update_data_info" then
sql="select info_id,info_expiredays,info_date from [info]"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
i=0
do while not rs.eof

if rs("info_expiredays")-datediff("d",rs("info_date"),date())<0 then
sql="update info set info_status='已过期' where info_id="&rs("info_id")&" and info_status='有效'"
conn.execute(sql)
i=i+1
end if
rs.movenext
loop
message="共有 "&i&" 条信息已被设置为已过期!"
rs.close
end if

if action="del_data_info" then

sql="select * from info where info_status<>'有效'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
file=rs("info_pic")
FiLePaTh=Server.MapPath(".")&"\..\"&file 
deletefiles(FiLePaTh)
rs.movenext
loop
rs.close

sql="delete from info where info_status<>'有效'"
conn.execute(sql)

message="数据库中非有效信息(包括其图片)已全部清除!<br>左上角的文件不存在仅表示有的信息无图片"

end if

if action="del_data_piece" then

sql="delete from piece where piece_isread='是'"
conn.execute(sql)

message="数据库中已读小纸条已全部清除!"

end if

if action="del_sys_piece" then
sql="delete from piece where piece_sender='system' and piece_isread='是'"
conn.execute(sql)
message="信息推送服务的已读小纸条已全部清除!"
end if
%>

<html>
<head>
<link href=../css.css rel=STYLESHEET type=text/css>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>

<body>
<div align="center">
  <table width="504" border="0" cellpadding="0" cellspacing="0" >
    <!--DWLayoutTable-->
    <tr> 
      <td width="56" height="66">&nbsp;</td>
      <td width="386">&nbsp;</td>
      <td width="62">&nbsp;</td>
    </tr>
    <tr>
      <td height="200">&nbsp;</td>
      <td valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1"  bgcolor="#66CCFF">
          <!--DWLayoutTable-->
          <tr> 
            <td width="382" height="24" valign="middle" bgcolor="#00FFFF"> <div align="center">欢迎使用</div></td>
          </tr>
          <tr> 
            <td height="90" valign="top" bgcolor="#FFFFFF"><p align="center">&nbsp;</p>
              <p align="center"><font size="4"><strong>中国人民大学二手交易网</strong></font></p>
              <p align="center"><strong><font size="4">后台管理系统</font></strong></p>
              <p align="center">&nbsp;</p></td>
          </tr>
          <tr> 
            <td height="61" valign="top" bgcolor="#FFFFFF"><p>请首先执行下列日常任务:(建议周期为2周)</p>
              <p>1.<a href=right.asp?action=del_data_user>批量删除过期用户</a></p>
              <p>2.<a href=right.asp?action=update_data_info>批量处理信息过期</a></p>
              <p>3.<a href=right.asp?action=del_data_info>批量清理非有效信息(同时删除相关图片)</a></p>
              <p>4.<a href=right.asp?action=del_sys_piece>批量清理System发送的已读小纸条</a></p>
			  <p>5.<a href=right.asp?action=del_data_piece>批量清理已读小纸条</a></p>			  
              <p><font color=red><%=message%></font></p></td>
          </tr>
          <tr> 
            <td height="24" valign="middle" bgcolor="#00FFFF"> <div align="center">版权所有:中国人民大学二手交易网</div></td>
          </tr>
        </table></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="120">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -