?? p_list.asp
字號:
<!--#include file="open.asp" -->
<!--#include file="checkadmin.asp" -->
<%
del=Request("del")
if del<>"" then
SQL="Delete from product where id="&del
con.Execute SQL
Response.write("<script>alert('記錄刪除成功')</script>")
end if
%>
<%
dim title(5)
title(1)="新聞標題"
title(2)="公告標題"
title(3)="產品名稱"
title(4)="工程案例"
title(5)="客戶系統"
tid=Request("tid")
if tid="news" then
subject=title(1)
elseif tid="gg" then
subject=title(2)
elseif tid="product" then
subject=title(3)
elseif tid="project" then
subject=title(4)
else
subject=title(5)
end if
%>
<HTML><HEAD><TITLE>定單管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="image/myweb.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE height=30 cellSpacing=0 cellPadding=0 width=600 align=center border=0>
<TBODY>
<%
SQL="Select * from product where pro_name='"&tid&"' order by id Desc"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open SQL,con,1,1
rs.PageSize=15
count=1
if Request("count")<>"" then
count=Cint(Request("count"))
if count<1 then
count=1
end if
if count>rs.PageCount then
count=rs.PageCount
end if
end if
%>
<TR>
<TD> <P align=right><IMG height=13 src="image/rent.gif" width=18
align=absMiddle>頁數:<%=count%>/<%=rs.PageCount%> <IMG height=15
src="image/amount.gif" width=15 align=absMiddle> 數量: <%=rs.RecordCount%></P></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=1 cellPadding=4 width=600 align=center border=0>
<TBODY>
<TR align=middle>
<TD class=web_title width=60>序號</TD>
<TD class=web_title height=20><%=subject%></TD>
<TD class=web_title width=30>刪除</TD>
<TD class=web_title width=30>編輯</TD>
</TR>
<%
if not rs.Bof and not rs.Eof then
rs.ABSolutePage=count
end if
for i=0 to rs.PageSize-1
if rs.Eof then
exit for
end if
if i mod 2=0 then
Response.Write("<TR class=web_td1 >")
else
Response.Write("<TR class=web_td2 >")
end if
%>
<TD align=middle><%=(count-1)*rs.pageSize+i+1%></TD>
<TD align=left> <%=rs("title")%></TD>
<TD align=middle><A
href="javascript:del(<%=rs("id")%>)"><IMG
src="image/del.gif" border=0></A></TD>
<TD align=middle><A
href="mod_pro.asp?id=<%=rs("id")%>&tid=<%=tid%>"><IMG
src="image/edit.gif" border=0></A></TD>
</TR>
<%
rs.movenext
next
%>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=600 align=center border=0>
<TBODY>
<TR>
<TD align=right>[<a href="p_list.asp?count=1&tid=<%=tid%>">首頁</a>] [<a href="p_list.asp?count=<%=count-1%>&tid=<%=tid%>">上一頁</a>][<a href="p_list.asp?count=<%=count+1%>&tid=<%=tid%>">下一頁</a>]
[<a href="p_list.asp?count=<%=rs.PageCount%>&tid=<%=tid%>">尾頁</a>]
<DIV></DIV></TD></TR></TBODY></TABLE><BR>
<%
rs.Close
Set rs=nothing
%>
<DIV align=center></DIV></TD></TR></TABLE>
<script>
function del(id)
{
if(confirm("你真得要刪除這條記錄嗎?"))
location.href="p_list.asp?del="+id+"&count=<%=count%>&tid=<%=tid%>";
}
</script>
</BODY></HTML>
<!--#include file="close.asp" -->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -