📄 add.asp
字号:
<!--#include file="session.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加商品</title>
<link rel="stylesheet" type="text/css" href="img/admin_style.css">
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from smallclass order by scid asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("scname"))%>","<%= trim(rs("bcid"))%>","<%= trim(rs("scid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.formadd.scid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.formadd.scid.options[document.formadd.scid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
</head>
<body>
<div align="center">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="mainmiddle">
<tr>
<td width="29" height="32"> <div align="left">
<p class="maindaohang"> </p>
</div></td>
<td width="709"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<b><font color="#000000"><span class="bigNavi">添加商品</span> </font></b></td>
<td width="8" class="mainrights"></td>
</tr>
</table>
<%
dim bcid,scid,sp_name,marprice,memprice,choice1,choice2,choice3,choice4,choice5,choice6,spsm,spms,sp_pic,tj,tejia
sql="select * from goods"
rs.open sql,conn,1,3
bcid=rs("bclassid")
scid=rs("sclassid")
sp_name=rs("sp_name")
marprice=rs("marprice")
memprice=rs("memprice")
choice1=rs("choice1")
choice2=rs("choice2")
choice3=rs("choice3")
choice4=rs("choice4")
choice5=rs("choice5")
choice6=rs("choice6")
spsm=rs("spsm")
spms=rs("spms")
sp_pic=rs("sp_pic")
tj=rs("tj")
tejia=rs("tejia")
haoid=rs("id")
rs.update
rs.close
%>
<form method="POST" name="formadd" action="addsave.asp">
<table width="95%" height="148" border="0" align="center" cellpadding="3" cellspacing="1" class="tabbgcolor">
<tr class="tabbgcolorli">
<td height="20"><div align="center">选择分类:</div></td>
<td height="20" colspan="3"><table border="0" cellspacing="1" width="100%">
<td width="85%"> 大类
<select name="bcid" onChange="changelocation(document.formadd.bcid.options[document.formadd.bcid.selectedIndex].value)" size="1">
<%
dim conclass,choosed
sql1="select * from bigclass"
rs.open sql1,conn,1,1
if rs.eof and rs.bof then
response.write"暂时还没有商品大类"
else
do while not rs.eof
if cstr(bcid)=cstr(rs("bcid")) then
choosed="selected"
conclass=rs("bcid")
else
choosed=""
end if
response.write "<option " & choosed & " value='"+CStr(rs("bcid"))+"'>"+rs("bcname")+"</option>"+chr(13)+chr(10)
rs.movenext
loop
end if
rs.close
%>
</select> 相关小类
<select name="scid" size="1">
<%
sql2="select * from smallclass where bcid="&conclass
rs.open sql2,conn,1,1
if rs.eof and rs.bof then
response.write"暂时还没有相应小类"
else
do while not rs.eof
if cstr(scid)=cstr(rs("scid")) then
choosed="selected"
else
choosed=""
end if
response.write "<option " & choosed & " value='"+CStr(rs("scid"))+"'>"+rs("scname")+"</option>"+chr(13)+chr(10)
rs.movenext
loop
end if
rs.close
%>
</select></td>
</tr>
</table>
<div align="center"></div></td>
</tr>
<tr class="tabbgcolorli">
<td width="17%" height="20"> <div align="center">商品名称</div></td>
<td height="20" colspan="3">
<input type="text" name="sp_name" size="20" class="border">
<div align="center"></div></td>
</tr>
<tr class="tabbgcolorli">
<td width="17%" height="20"> <div align="center">市场价</div></td>
<td width="31%" height="20">
<input type="text" name="marprice" size="12 " class="border">
元</td>
<td width="18%"> <div align="center">会员价</div></td>
<td width="34%">
<input type="text" name="memprice" size="12" class="border">
元</td>
</tr>
<tr class="tabbgcolorli">
<td width="17%" height="20"> <div align="center">选项1</div></td>
<td width="31%" height="20">
<input type="text" name="choice1" size="18" class="border"></td>
<td width="18%"> <div align="center">选项2</div></td>
<td width="34%">
<input type="text" name="choice2" size="18" class="border"></td>
</tr>
<tr class="tabbgcolorli">
<td width="17%" height="20"> <div align="center">选项3</div></td>
<td width="31%" height="20">
<input type="text" name="choice3" size="18" class="border"></td>
<td width="18%"> <div align="center">选项4</div></td>
<td width="34%">
<input type="text" name="choice4" size="18" class="border"></td>
</tr>
<tr class="tabbgcolorli">
<td height="20"> <div align="center">选项5</div></td>
<td height="20">
<input type="text" name="choice5" size="18" class="border"></td>
<td> <div align="center">选项6</div></td>
<td> <input type="text" name="choice6" size="18" class="border"></td>
</tr>
<tr class="tabbgcolorli">
<td height="20"> <div align="center">商品说明</div></td>
<td height="20" colspan="3"> <textarea rows="3" name="sp_intr" cols="50" class="border"></textarea>
全方位支持html语言
<div align="center"></div></td>
</tr>
<tr class="tabbgcolorli">
<td height="20"> <div align="center">商品描述</div></td>
<td height="20" colspan="3">
<textarea rows="10" name="sp_desc" cols="50" class="border"></textarea>
全方位支持html语言
<div align="center"></div></td>
</tr>
<tr class="tabbgcolorli">
<td height="20"> <div align="center">商品图片</div></td>
<td height="20" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="49%"><div align="center">
<input name="sp_pic" type="text" size="36" class="border">
</div></td>
<td width="51%"> <iframe marginwidth=0 framespacing=0 marginheight=0 frameborder=0 width='350' height=20 srcolling=no src="upload.asp">
</iframe></td>
</tr>
</table></td>
</tr>
<tr class="tabbgcolorli">
<td height="20"> <div align="center">是否推荐</div></td>
<td height="20"> <% if tj=true then %> 是 <input type="radio" name="tj" value="true" checked>
否 <input type="radio" name="tj" value="false"><%else%> 是 <input type="radio" name="tj" value="true">
否 <input type="radio" name="tj" value="false" checked><%end if%> </td>
<td> <div align="center">是否特价</div></td>
<td> <% if tejia=true then %> 是 <input name="tejia" type="radio" value="true" checked> 否 <input type="radio" name="tejia" value="false">
<%else%> 是 <input name="tejia" type="radio" value="true"> 否 <input type="radio" name="tejia" value="false" checked><%end if%></td>
</tr>
<tr class="tabbgcolorli">
<td height="20" colspan="4"> <div align="center"></div>
<div align="center">
<input type="submit" value="现在提交" name="tijiao" class="border">
<input type="reset" value="全部重写" name="chongxie" class="border">
</div></td>
</tr>
</table>
</form>
</div>
<!--#include file="copy.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -