📄 delpr.asp
字号:
<html>
<head>
<title>产品管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<link href="../css/main.css" rel="stylesheet" type="text/css">
<link href="../images/style.css" rel="stylesheet" type="text/css">
</head>
<!--#include file=conn.asp-->
<!--#include file=refuse.asp-->
<%
dim prname,sql2,errormessage,sql3,sql4,rs2,sql5
prname=request("name")
if prname<>"" then
sql3="delete * from product where name='"&prname&"'"
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from product where name='"&prname&"'",conn,1,1
do while not rs2.eof
sql4="delete * from question where productid="&rs2("id")
sql5="delete * from lanmu where productid="&rs2("id")
conn.Execute(sql4)
conn.Execute(sql5)
rs2.movenext
loop
rs2.close
conn.Execute(sql3)
errormessage="成功删除!"
else errormessage="欢迎来到大类产品管理界面!"
end if
%>
<body>
<table width="500" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6B8FC8">
<!--DWLayoutTable-->
<tr>
<td width="496" height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="496" height="27" valign="middle" class="boxcontent">
<div align="center" ><font color="red" size="3"><%=errormessage%></font></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="236" valign="top" bgcolor="#E8F1FF"><div align="center">
<form name="form1" id="form1" method="post" action="delpr.asp">
<table >
<!--DWLayoutTable-->
<tr class="content">
<td height="24" colspan="3" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td width="161" height="21"> </td>
<td width="101"> </td>
<td width="120"> </td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from product ",conn,1,1
%>
<tr>
<td class="content">请造择要删除的产品:</td>
<td><div align="center">
<select name="name" class="option" id="name">
<%
do while not rs.eof and not rs.bof
%>
<option value="<%=rs("name")%>"><%=rs("name")%></option>
<%
rs.movenext
loop
rs.close
conn.close
%>
</select>
</div></td>
<td><div align="center">
<input name="bt2" type="submit" id="bt2" value="删除" />
</div></td>
</tr>
<tr>
<td height="63"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td height="34" colspan="3" valign="top">请注意:一旦删除,相关产品的所有信息都有将全被删除</td>
</tr>
<tr>
<td height="40"> </td>
<td colspan="2"> </td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -