📄 pmpmcjc.asp
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
SqlDatabaseName = "paimai" '数据库名
SqlUsername = "sa" '用户名
SqlPassword = " " '用户密码
Dim Conn,ConnStr
Set Conn = Server.CreateObject("ADODB.Connection")
ConnStr = "Provider = Sqloledb; Persist Security Info=false; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & ";"
Conn.Open ConnStr
if request("action")="del" then '判断是否执行数据删除
conn.execute("delete from [bidpm] where pdtid="&request("pdtid")&"") '根据取得的商品 ID 进行删除
response.Write("<script>alert('删除成功!');window.location.href='pmpmcj.asp';</script>")
end if
%>
<table border="0" width="675" height="480" id="table1">
<tr>
<td bgcolor="#C0C0C0" align="center" valign="top">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="799AE1" id="table2">
<tr height="20" bgcolor="#FFFFFF" align="center">
<td width="196"><font color="#FF0000" size="1" face="幼圆">商品名称</font></td>
<td width="240"><font color="#FF0000" size="1" face="幼圆">当前价格</font></td>
<td width="136"><font color="#FF0000" size="1" face="幼圆">出价者ID</font></td>
<td width="78"><font color="#FF0000" size="1" face="幼圆">删除</font></td>
</tr>
<%
SqlDatabaseName = "paimai" '数据库名
SqlUsername = "sa" '用户名
SqlPassword = " " '用户密码
Dim Con,ConStr
Set Con = Server.CreateObject("ADODB.Connection")
ConStr = "Provider = Sqloledb; Persist Security Info=false; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & ";"
Con.Open ConnStr
sql="select * from [bidpm] where pdtid='"&request("pdtid")&"';"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,con,1,1 '以写入方式打开
if rs.eof and rs.bof then
Response.Write "<p align='center' class='contents'> 对不起,暂无出价!</p>"
else
rs.pagesize=10
'SafeRequest(request("page"))
page=clng(request("page"))
if page<1 then page=1
if page>rs.pagecount then page=rs.pagecount
show rs,page
sub show(rs,page)
rs.absolutepage=page
for i=1 to rs.pagesize
%>
<tr height="20" bgcolor="#FFFFFF" align="center">
<td><font size="1" face="幼圆" color="#FF0000"><%=rs("pdtname")%></a></font></td>
<td><font size="1" face="幼圆" color="#FF0000"><%=rs("bidprice")%></font></td>
<td><a href="owner8.asp?userid=<%=rs("userid")%>">
<font size="1" face="幼圆" color="#FF0000"><%=rs("userid")%></font></td>
<td><a href="pmpmcjc.asp?action=del&pdtid=<%=rs("pdtid")%>">
<font size="1" face="幼圆" color="#FF0000">删除</font></a></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
end sub
%>
<tr height="20" bgcolor="#FFFFFF" align="center">
<form name="form" action="?" method="get">
<td colspan="4">
<font face="幼圆"><font size="1" color="#FF0000">
<%
if page<>1 then
response.Write(" <a href="&path&"?page=1>第一页</a>")
response.Write(" <a href="&path&"?page="&(page-1)&" >上一页</a>")
end if
response.Write(" 当前 <font color='#FF0000'>"&page&"</font> 页")
response.Write(" 条 <font color='#FF0000'>"&rs.recordcount&"</font>/<font color='#FF0000'>"&rs.pagecount&"</font> 页")
if page<>rs.pagecount then
response.Write(" <a href="&path&"?page="&(page+1)&">下一页</a>")
response.Write(" <a href="&path&"?page="&rs.pagecount&">最末页</a>")
end if
'response.Write(" 跳转到<input type='text' size='2' name='page'>页<input type='submit' value='GO'>")
end if
rs.close
set rs=nothing
%>
</font>
<font color="#FF0000"><a href="pmpm.asp"><font color="#FF0000">
<span style="text-decoration: none"><font size="1">返回>></font></span></font></a></font></font></td>
</form>
</tr>
</table>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -