www.gusucode.com > 云枫企业网站源代码第二版 2.0源码程序 > admin/lxwm/manage.asp
<!--#include file="../inc/admin.asp"--> <!--#include file="../inc/conn.asp"--> <SCRIPT language=javascript> function ConfirmDel() { if(confirm("确定要删除选中的记录吗?一旦删除将不能恢复!")) return true; else return false; } </SCRIPT> <%if Request.QueryString("no")="eshop" then dim SQL, Rs, contentID,CurrentPage CurrentPage = request("Page") contentID=request("ID") set rs=server.createobject("adodb.recordset") sqltext="delete from lxwm where Id="& contentID rs.open sqltext,conn,3,3 set rs=nothing conn.close response.redirect "manage.asp" end if %> <% D_type=request("D_type") set rs=server.createobject("adodb.recordset") if D_type<>"" then sqltext="select * from lxwm where D_type="&D_type&" order by id" else sqltext="select * from lxwm order by id " end if rs.open sqltext,conn,1,1 dim MaxPerPage MaxPerPage=20 dim text,checkpage text="0123456789" Rs.PageSize=MaxPerPage for i=1 to len(request("page")) checkpage=instr(1,text,mid(request("page"),i,1)) if checkpage=0 then exit for end if next If checkpage<>0 then If NOT IsEmpty(request("page")) Then CurrentPage=Cint(request("page")) If CurrentPage < 1 Then CurrentPage = 1 If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount Else CurrentPage= 1 End If If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if Else CurrentPage=1 End if call showpages call list If Rs.recordcount > MaxPerPage then call showpages end if '显示帖子的子程序 Sub list()%> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="../Admin_Style.css" rel="stylesheet" type="text/css"></head> <p> </p> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"> <br> <table width="787" border="0" cellspacing="0" cellpadding="0" class="border"> <tr> <td height="26" align="center" style="background-image: url('../Images/topbg1.gif')"> <strong><font color="#FFFFFF">网站信息管理</font></strong></td> </tr> <tr> <td><div align="center"> <table width="100%" border="0" cellspacing="2" cellpadding="3"> <tr bgcolor="#C0C0C0"> <td width="8%" height="25" align="center" bgcolor="#E1F4EE"> ID</td> <td width="72%" align="center" bgcolor="#E1F4EE"> 网站信息名称 </td> <td width="10%" align="center" bgcolor="#E1F4EE"> 操作</td> <td width="10%" align="center" bgcolor="#E1F4EE">操作</td> </tr> <% if not rs.eof then i=0 do while not rs.eof %> <tr bgcolor="#E3E3E3"> <td height="22" align="center" bgcolor="#E1F4EE"> <%=rs("id")%></td> <td align="center" bgcolor="#E1F4EE"><%=rs("title")%> </td> <td align="center" bgcolor="#E1F4EE"> <a href="edit.asp?id=<%=rs("id")%>">修改</a></td> <td align="center" bgcolor="#E1F4EE"><a href="manage.asp?id=<%=rs("id")%>&no=eshop" onClick="return ConfirmDel();">删除</a></td> </tr> <% i=i+1 if i >= MaxPerpage then exit do rs.movenext loop end if %> <tr bgcolor="#C0C0C0"> <td height="25" colspan="6" bgcolor="#E1F4EE"> <% Response.write "<strong><font color='#000000'>-> 全部-</font>" Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条产品</font></strong> " Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong> " If currentpage > 1 Then response.write "<strong><a href='?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>" Response.write "<strong><a href='?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>" Else Response.write "<strong><font color='#000000'>上一页 </font></strong>" End if If currentpage < Rs.PageCount Then Response.write "<strong><a href='?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>" Response.write "<a href='?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong> " Else Response.write "" Response.write "<strong><font color='#000000'>下一页</font></strong> " End if %></td> </tr> </table> <% End sub rs.close %> </div></td> </tr> </table> <br> <br> </td> </tr> </table>