<%@ LANGUAGE="VBSCRIPT" %> <%=ForumName%>--管理页面 <% if not master then Errmsg=Errmsg+"
"+"
  • 本页面为管理员专用,请登陆后进入。" call Error() else dim body dim rs,sql,sql1 set rs = server.CreateObject ("adodb.recordset") call main() set rs=nothing conn.close set conn=nothing end if sub main() %> align=center>
    >
    欢迎<%=session("mastername")%>进入管理页面
    <%call leftmenu()%> <% if Request("action")="add" then call savemsg() elseif request("action")="del" then call del() elseif request("action")="delall" then call delall() else call sendmsg() end if %>

    <%=body%>

    <% end sub sub savemsg() dim sendtime,sender sendtime=Now() sender="动网小精灵" sql1 = "select username from [user]" rs.Open sql1,conn,1,1 do while not rs.EOF sql="insert into message(incept,sender,title,content,sendtime,flag) values('" sql=sql&(rs("username"))&"','" sql=sql&(sender)&"','" sql=sql&(TRim(Request("title")))&"','" sql=sql&(Trim(Request("message")))&"','" sql=sql&(sendtime)&"','" sql=sql&(0)&"')" conn.Execute(sql) rs.MoveNext Loop rs.Close body=body+"
    "+"操作成功!请继续别的操作。" end sub sub sendmsg() %>
    height="7">

    系统消息发布
    注意:这里您将向该论坛的所有注册用户发送短消息!

    消息标题

    消息内容

    (HTML代码支持)

    height="20">

    批量删除:

    批量删除某用户短消息(主要用于删除系统批量信息:动网小精灵):
    >删除所有用户短消息
    <% end sub sub del() if request("username")="" then body=body+"
    "+"请输入要批量删除的用户名。" exit sub end if sql="delete from message where sender='"&request("username")&"'" conn.Execute(sql) body=body+"
    "+"操作成功!请继续别的操作。" end sub sub delall() sql="delete from message where id>0" conn.Execute(sql) body=body+"
    "+"操作成功!请继续别的操作。" end sub %>