<% '----------------------确定是否有此权限---------------------- dim cls if session("admin")="" then Response.Redirect("index.asp?err=4") else if session("flag")<>"0" then cls = Instr(session("flag"), "wz") if cls <= 0 then %> <% end if end if end if '-----------------------结束----------------------------- if request("gb")<>"" then gb=request("gb") end if %> 管理中心——>
当前位置: 网站管理中心---文字栏目管理---返回上一页 栏目列表 | 栏目类别  
<% action = request("action") if request("search") = "ok" then if request("online") <> "" then session("online") = request("online") else session("online") = "" end if else end if if action="" then %>
<% if v<>1 then %> ';" value="<%= lang_1 %>"> ';" value="<%= lang_2 %>"> <% end if %>  
<%'默认显示产品列表 dim rs,msg_per_page dim sql msg_per_page = 20 '定义每页显示记录条数 set rs = server.createobject("adodb.recordset") sql = "select * from wz where gb='"&gb&"' " sql= sql+" order by wzclassid asc" '按照添加日期显示 rs.cursorlocation = 3 '使用客户端游标,可以使效率提高 rs.pagesize = msg_per_page '定义分页记录集每页显示记录数 rs.open sql,conn,1,1 if err.number<>0 then '错误处理 response.write "


数据库操作失败:" & err.description err.clear else if not (rs.eof and rs.bof) then '检测记录集是否为空 totalrec = RS.RecordCount 'totalrec:总记录条数 if rs.recordcount mod msg_per_page = 0 then '计算总页数,recordcount:数据的总记录数 n = rs.recordcount\msg_per_page 'n:总页数 else n = rs.recordcount\msg_per_page+1 end if currentpage = request("page") 'currentpage:当前页 If currentpage <> "" then currentpage = cint(currentpage) if currentpage < 1 then currentpage = 1 end if if err.number <> 0 then err.clear currentpage = 1 end if else currentpage = 1 End if if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then currentPage=1 end if rs.absolutepage = currentpage 'absolutepage:设置指针指向某页开头 rowcount = rs.pagesize 'pagesize:设置每一页的数据记录数 dim i dim k do while not rs.eof and rowcount>0 %> <%rowcount=rowcount-1 rs.movenext loop else response.write "" end if end if rs.close conn.close set rs=nothing set coon=nothing %>
编号
子栏目名称
所属大栏目 添加时间 操作
<%=rs("wzclassid")%>(<%= rs("wzid") %>) <%=rs("bigclass")%> <%=rs("date")%> &gb=<%=gb%>>修改 | ','<%=gb%>')>删除 

无满足条件商品

全选   

<% call listPages() else end if '删除产品 if action="del" then delid=replace(request("id"),"'","") call proddel() end if if action="readd" then call prodadd() end if if action="newadd" then call prodnew() end if %>
<% sub listPages() if n <= 1 then exit sub if currentpage = 1 then %> 首页 <%else%>   ?page=1&gb=<%=gb%>"> 首页   ?page=<%=currentpage-1%>&gb=<%=gb%>">上一页 <%end if%> <%if currentpage = n then%>   下一页 <%else%>   ?page=<%=currentpage+1%>&gb=<%=gb%>">下一页   ?page=<%=n%>&gb=<%=gb%>">末页 <%end if%> 总:<%=currentpage%>/<%=n%>页  共计:<%=totalrec%>条信息 [<%=msg_per_page%>条/页] <%end sub%> <%sub proddel() if delid="" or isnull(delid) then Response.write "


操作失败,没有选择合适参数!点击返回

" else conn.execute("delete from wz where wzid in ("&delid&")") if err.number<>0 then '错误处理 response.write "数据库操作失败:" & err.description err.clear else conn.close set conn=nothing Response.write "


删除成功!点击返回

" end if end if end sub %> <% sub prodadd() reid=request("reid") dim tuijian if request("edit") ="ok" then Set rs=Server.CreateObject("ADODB.Recordset") sql="select * from wz where wzid="&reid&"" rs.open sql,conn,1,3 if err.number<>0 then '错误处理 response.write "数据库操作失败:" & err.description err.clear else rs("gb")=request("gbL") if request("wzclassid")<>"" then rs("wzclassid")=request("wzclassid") else rs("wzclassid")=1 end if rs("wzname")=request("wzname") rs("wzcontain")=request("wzcontain") rs("content")=request("content") rs("zaiyao")=request("zaiyao") rs("img")=request("photo") rs("bigclass")=request("bigclass") rs("date")=now() rs("k_title")=request("k_title") rs("k_keys")=request("k_keys") rs("k_content")=request("k_content") rs.update rs.close conn.close set rs=nothing set conn=nothing ' Response.Redirect"admin_wz.asp?action=detail&id="&request.form("ProdId") response.Write "" end if else reid=request("reid") Set rs=Server.CreateObject("ADODB.Recordset") sql="select * from wz where wzid="&reid&"" rs.open sql,conn,1,3 %>    数据表序列ID :<%=rs("wzid")%>
选择语言:
所属栏目:
栏目编号: " size="5">   * 请输入数字
栏目名称: " size="50">   *
图片地址: ">
摘 要:
详细内容 [在以下编辑框要换行的话请按 Shift+Enter 组合键]
标题文字: " size="50">
关 键 字: " size="50">
描述文字: " size="50">
    [返回上一页]
<%end if end sub %> <% sub prodnew() if request("add") ="ok" then if request("wzname")="" then response.Write "" response.end end if if request("wzcontain")="" then response.Write "" response.end end if Set rs=Server.CreateObject("ADODB.Recordset") sql="select * from wz " rs.open sql,conn,1,3 if err.number<>0 then '错误处理 response.write "数据库操作失败:" & err.description err.clear else rs.addnew rs("gb")=request("gbL") if request("wzclassid")<>"" then rs("wzclassid")=request("wzclassid") else rs("wzclassid")=1 end if rs("wzname")=request("wzname") rs("wzcontain")=request("wzcontain") rs("content")=request("content") rs("zaiyao")=request("zaiyao") rs("img")=request("photo") rs("bigclass")=request("bigclass") rs("k_title")=request("k_title") rs("k_keys")=request("k_keys") rs("k_content")=request("k_content") rs("date")=now() rs.update rs.close conn.close set rs=nothing set conn=nothing ' Response.Redirect"admin_prod.asp?action=detail&id="&request.form("ProdId") response.Write "" end if else %>   添加栏目内容
选择语言:
所属栏目:
栏目编号:   * 请输入数字
栏目名称:   *
图片地址:
摘 要:
详细内容 [在以下编辑框要换行的话请按 Shift+Enter 组合键]
标题文字:
关 键 字:
描述文字:
    [返回上一页]
<%end if end sub%> <% '处理数组函数 function checkreal(v) dim w if not isnull(v) then w=replace(v,",","|") w=replace(w," ","") checkreal=w end if end function function checkrea2(v) dim w if not isnull(v) then w=replace(v,":","") w=replace(w," ","") checkrea2=w end if end function function checkrea3(v) dim w if not isnull(v) then w=replace(v,"-","") w=replace(w," ","") checkrea3=w end if end function %>