📄 wh_xx.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
on error resume next
set rs1=server.createobject("adodb.recordset")
sql="select * from hw where hw_id="&Request("id")
rs1.open sql,conn,3,3
if rs1.eof then
response.write "由于一定的原因,目前数据库中不存在此商品"
response.End
else
if session("user_name")="" then
response.write "<font color=red>目前您尚未登陆。</font>"
end if
session("admintuijian")=rs1("admintuijian")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>商品详细信息</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<script language="javascript">
function cha(form)
{
if(form.quantity.value<1)
{
alert("数目不能小于1");
return (false);
}
return(true);
}</script>
</head>
<body>
<div align="center">
<table width="353" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="53" rowspan="5"><a href="<%=(rs1.Fields.Item("hw_pic").Value)%>" target="_blank"><img src="<%=(rs1.Fields.Item("hw_pic").Value)%>" height="100" border="0"></a><br>
点图放大</td>
<td width="178" valign="bottom"><div align="left">商品名称:<%=(rs1.Fields.Item("hw_name").Value)%></div></td>
</tr>
<tr>
<td valign="bottom"><div align="left">厂家:<%=(rs1.Fields.Item("lei").Value)%></div></td>
</tr>
<tr>
<td valign="bottom"><div align="left">现价:<%=(rs1.Fields.Item("hw_cash").Value)%></div></td>
</tr>
<tr>
<td height="35" valign="top"><div align="left">备注:<%=(rs1.Fields.Item("hw_content").Value)%></div></td>
</tr>
<tr>
<td valign="top"><form name="form" method="post" action="savebuy.asp" onSubmit="return cha(form)">
<div align="right">
数量:
<input name="quantity" type="text" id="quantity" value="1" size="5" maxlength="5"<%if session("user_name")="" then response.write "disabled=false"else if session("user_yes")=0 and session("admintuijian")=true then response.write "disabled=false" end if%>>
<input type="submit" name="Submit" value="放入购物车"<%if session("user_name")="" then response.write "disabled=false"else if session("user_yes")=0 and session("admintuijian")=true then response.write "disabled=false" end if%>>
<input type="hidden" name="hw_id" value="<%=(rs1.Fields.Item("hw_id").Value)%>">
<input type="hidden" name="hw_name" value="<%=(rs1.Fields.Item("hw_name").Value)%>">
<input type="hidden" name="hw_cash" value="<%=(rs1.Fields.Item("hw_cash").Value)%>">
</div>
</form>
<%if session("user_name")="" then response.write "<font color=red>目前您尚未登陆"else if(session("user_yes")=0 and session("admintuijian")=true) then response.write "<font color=red>您不是高级会员,不可以购买该商品" end if%>
</td>
</tr>
</table>
<%
end if%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -