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

📄 admin_club.asp

📁 ASP整套的建站源代码
💻 ASP
字号:
<!-- #include file="setup.asp" -->
<%
if adminpassword<>session("pass") then
response.redirect "admin.asp?menu=login"
end if
%>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<link href=images/bbs.css rel=stylesheet>
<br><center>
<p></p>
<body background=images/bei.gif>
<%

select case Request("menu")

case "affiche"
affiche

case "afficheok"
afficheok

case "message"
message

case "broadcast"
broadcast

case "messageok"
if request("TimeLimit")="" then
error2("您没有选择日期!")
end if
conn.execute("delete from [message] where DateDiff('d',time,now)>"&request("TimeLimit")&" ")
error2("已经将"&request("TimeLimit")&"天以前的短讯息删除了!")


end select


sub message
%>


<form method="post" action="?menu=messageok">
数据库共有 <%=conn.execute("Select count(id)from message")(0)%> 条短讯息
<br><br>
删除 <select name=TimeLimit>
<option value="7">7</option>
<option value="15" selected>15</option>
<option value="30">30</option>
</select> 天以前的短讯息
<input type="submit" value="确定">
</form>

<form method="post" action="?menu=broadcast">
<fieldset style="WIDTH:600">  <legend>系统广播</legend>
<br>接收对象:在线会员<br><textarea name="content" rows="5" cols="50"></textarea>
<br><input type="submit" value=" 发 送 " name="submit">
<input type="reset" value=" 重 填 " name="Submit2"><br> </fieldset></form>
<%
end sub

sub broadcast

if Request("content")="" then
error2("请填写广播内容!")
end if
sql="select * from online where username<>''"
rs.Open sql,Conn
do while not rs.eof
Count=Count+1
rs1.Open "message",conn,1,3
rs1.addnew
rs1("author")=""&Request.Cookies("username")&""
rs1("incept")=""&rs("username")&""
rs1("content")="【系统广播】:"&Request("content")&""
rs1("time")=now
rs1.update
rs1.close
conn.execute("update [user] set newmessage=newmessage+1 where username='"&rs("username")&"'")
rs.movenext
loop
rs.close

%>
发布成功
<br><br>
共发送给 <%=Count%> 位在线用户<br><br>
<a href=javascript:history.back()>返 回</a>
<%
end sub


sub affiche
%>
<form method="post" action="?menu=afficheok">
<fieldset style="WIDTH:600">  <legend>发布公告</legend><br>
标题:<input type="text" name="affichetitle" size="46" value="<%=affichetitle%>"><br>
<textarea name="affichecontent" cols="50" rows="5"><%=replace(affichecontent,"<br>",vbCrlf)%></textarea>
<br><input type="submit" value=" 发 送 " name="submit">
<input type="reset" value=" 重 填 " name="Submit2">
支持HTML代码<br>
 </fieldset></form>
<%
end sub

sub afficheok
rs.Open "clubconfig",Conn,1,3
rs("affichetitle")=Request("affichetitle")
rs("affichecontent")=replace(Request("affichecontent"),vbCrlf,"<br>")
rs("affichetime")=now
rs("afficheman")=Request.Cookies("username")
rs.update
rs.close
%> 发布成功<br><br><a href=javascript:history.back()>返 回</a>
<%
end sub

htmlend

%>

⌨️ 快捷键说明

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