<% if session("admin")="" then conn.close set conn = nothing response.Write "" response.End end if if FormatSQL(SafeRequest("action",0))="del" then conn.execute "delete from Notice where id in ("&request.form("selectdel")&")" response.Redirect "announcements.asp" end if call flagstr("常规管理","../error.htm") if request("action")="html" then set rs1=conn.execute("select * from notice") do while not rs1.eof call HtmlAout("/templets/about.html",rs1(0)&"") rs1.movenext loop rs1.close set rs1=nothing end if set rs=conn.execute("select max(topid) as a from notice") if not rs.eof then topid=rs(0) end if rs.close set rs=nothing if request("action")="top" then conn.execute("update notice set topid=topid+1 where id="&request("id")) end if if request("action")="down" then conn.execute("update notice set topid=topid-1 where id="&request("id")) end if %> 文章信息管理
  基本信息


添加基本信息 更新模板


<% Const MaxPerPage=20 dim totalPut dim CurrentPage dim TotalPages dim j dim sql if Not isempty(SafeRequest("page",1)) then currentPage=Cint(SafeRequest("page",1)) else currentPage=1 end if set rs=server.createobject("adodb.recordset") sorts=request("sorts") sql="select * from Notice order by adddate desc" rs.open sql,conn,1,1 if err.number<>0 then response.write "数据库中暂时无数据" end if if rs.eof And rs.bof then Response.Write "

您还没有添加公告!

" else totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"announcements.asp" else if (currentPage-1)*MaxPerPage

<%do while not rs.eof%> <%i=i+1 if i>=MaxPerPage then Exit Do rs.movenext loop rs.close set rs=nothing%>
标题 排序 浏览 发布时间 选 择
"> <%if len(rs("title"))>15 then%> <%=left(rs("title"),15)%>... <%else%> <%=rs("title")%> <%end if%> [顶↑][降↓] <% =rs("topid")%> 浏览 <%=rs("adddate")%> >
全选

<% End Sub Function showpage(totalnumber,maxperpage,filename) Dim n If totalnumber Mod maxperpage=0 Then n= totalnumber \ maxperpage Else n= totalnumber \ maxperpage+1 End If Response.Write "

" Response.Write "

" If CurrentPage<2 Then Response.Write "首 页 上一页 " Else Response.Write "首 页 " Response.Write "上一页 " End If If n-currentpage<1 Then Response.Write "下一页 末 页" Else Response.Write "" Response.Write "下一页 末 页" End If Response.Write " 页次:"&CurrentPage&"/"&n&"页 " Response.Write " 共有"&totalnumber&"条信息 " Response.Write "转到:" Response.Write " " End Function %>

 

搜索:

 


powered by <%=CompanyUrl%>, you can contact us.