<%@ LANGUAGE="VBSCRIPT" %> <%=ForumName%>--管理页面 <% if not master then Errmsg=Errmsg+"
"+"
  • 本页面为管理员专用,请登陆后进入。" call Error() else dim body 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 addlink() elseif request("action")="edit" then call editlink() elseif request("action")="savenew" then call savenew() elseif request("action")="savedit" then call savedit() elseif request("action")="del" then call del() elseif request("action")="orders" then call orders() elseif request("action")="updateorders" then call updateorders() else call linkinfo() end if %>

    <%=body%>

    <% end sub sub addlink() %>
    论坛名称:
    连接URL:
    论坛简介:
    <% end sub sub editlink() sql = "select * from bbslink where id="+cstr(Request("id")) rs.open sql,conn,1,1 %>
    >
    论坛名称: >
    连接URL: >
    论坛简介: >
    <% rs.close end sub sub linkinfo() %>
    注意事项:
    在下面,您将看到目前所有的联盟论坛。您可以编辑联盟论坛名或是增加一个新的联盟论坛。 也可以编辑或删除目前存在的联盟论坛。您可以对目前的联盟重新进行排列。
    <% sql = " select * from bbslink order by id" rs.open sql,conn,1,1 %>
    增加新的联盟论坛
    <% do while not rs.eof %>
    联盟论坛名称:<%=rs("boardname")%>
    联盟论坛 URL:<%=rs("url")%>
    联盟论坛简介:<%=rs("readme")%>
    ">编辑此联盟论坛 | ">删除此联盟论坛 | ">联盟论坛重新排序
    <% rs.movenext loop rs.Close %>
    >
    增加新的联盟论坛


    <% end sub sub savenew() if Request("url")<>"" and Request("readme")<>"" and request("name")<>"" then dim linknum sql = "select * from bbslink" rs.Open sql,conn,1,3 linknum=rs.recordcount rs.AddNew rs("id")=linknum+1 rs("boardname") = Trim(Request.Form ("name")) rs("readme") = Trim(Request.Form ("readme")) rs("url") = Request.Form ("url") rs.Update rs.Close body=body+"
    "+"更新成功,请继续其他操作。" else body=body+"
    "+"请输入完整联盟论坛信息。" end if end sub sub savedit() sql = "select * from bbslink where id="+Cstr(request("id")) rs.Open sql,conn,1,3 if rs.eof and rs.bof then body=body+"
    "+"错误,没有找到联盟论坛。" else rs("boardname") = Trim(Request.Form ("name")) rs("readme") = Trim(Request.Form ("readme")) rs("url") = Request.Form ("url") rs.Update end if rs.Close body=body+"
    "+"更新成功,请继续其他操作。" end sub sub del id = request("id") sql="delete from bbslink where id="+id conn.Execute(sql) body=body+"
    "+"删除成功,请继续其他操作。" end sub sub orders() %>
    联盟论坛重新排序
    注意:请在相应论坛的排序表单内输入相应的排列序号,注意不能和别的联盟论坛有相同的排列序号。
    增加新的联盟论坛
    <% sql="select * from bbslink where id="&cstr(request("id")) rs.open sql,conn,1,1 if rs.eof and rs.bof then response.write "没有找到相应的联盟论坛。" else response.write "
    " response.write ""&rs("boardname")&" " response.write "" response.write "
    " end if rs.close %>
    增加新的联盟论坛
    <% end sub sub updateorders() sql="update bbslink set id="&request("newid")&" where id="&cstr(request("id")) conn.execute(sql) response.write "

    更新成功!

    " end sub %>