⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add_product.asp

📁 购物系统时尚版.强大的后台文章编辑器的功能
💻 ASP
字号:
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<!--#include file="../my_lib/my_request.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet type=text/css>
<title>商品添加</title>
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from small_class order by addtime desc"
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("txt_small_class"))%>","<%= trim(rs("iid"))%>","<%= trim(rs("id"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form1.sid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.form1.sid.options[document.form1.sid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<script language="javascript">
<!--
function checkdata()
{
if (document.form1.viewhtml.checked == true)
	{
	  alert("对不起,请取消“查看HTML源代码”后再添加!")
	  document.form1.viewhtml.focus()
	  return false
	 }
}
//-->
</script>
<script src="edit.js" type="text/javascript"></script>
<SCRIPT>
function view1(url){ 
var url; window.open(url,'_blank','status=no,scrollbars=yes,top=20,left=50,width=600,height=400'); 
}
</SCRIPT>
</head>

<body>
<!--#include file="TopManu.asp"-->
<form action="save_product.asp" method="post" name="form1" onsubmit="return checkdata();">
<div align="center">
<table border="0" width="100%" id="table1" cellspacing="0" style="border-collapse: collapse" cellpadding="0">
	<tr>
		<td background="image/admintoptdbg.gif">
		<p align="left">
		<img border="0" src="image/title_arrow.bmp" width="17" height="27" align="absmiddle"><font color="#808080"><b>新商品添加</b></font></td>
	</tr>
</table>
	<table border="1" width="100%" id="table1" style="border-style:solid; border-width:1px; border-collapse: collapse; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" bordercolor="#CCCCCC" cellpadding="4">
		<tr>
			<td width="202" align="right">商品类别:</td>
			<td width="551"><select size="1" name="bid" onChange="changelocation(document.form1.bid.options[document.form1.bid.selectedIndex].value)">
		<option>≡≡请选择大类≡≡</option>
		<%sql="select id,txt_big_class from big_class order by addtime"
		set rs=conn.execute (sql)
		set id=rs("id")
		set big_class=rs("txt_big_class")
		do while not rs.eof
		%>
		<option value="<%=id%>"><%=big_class%></option>
		<%rs.movenext
		loop
		%>
		
		</select><select name="sid" onChange="change(document.form1.sid.options[document.form1.sid.selectedIndex].value)" style='width:147;background-color:white;font-size:12;color:black; height:18' size="1"> 
<option selected>≡≡请选择小类≡≡</option></select></td>
		</tr>
		<tr>
			<td width="202" align="right">商品名称:</td>
			<td width="551">
			<input type="text" name="p_name" size="32" maxlength="50"></td>
		</tr>
		<tr>
			<td width="202" align="right">商品规格:</td>
			<td width="551">
			<input type="text" name="p_spec" size="32" maxlength="50"></td>
		</tr>
		<tr>
			<td width="202" align="right">商品单位:</td>
			<td width="551"><select size="1" name="p_unit">
			<%set rss=server.createobject("adodb.recordset")
			sqls="select * from yqj_sort"
			rss.open sqls,conn,1,1
			do while not rss.eof%>
			<option value="<%=rss("yqj_class")%>"><%=rss("yqj_class")%></option>
			<%rss.movenext
			loop
			rss.close
			set rss=nothing%>
			</select></td>
		</tr>
		<tr>
			<td width="202" align="right">库存数量(销售数量):</td>
			<td width="551">
			<input type="text" name="nums" size="8" maxlength="6">(请输入数字)</td>
		</tr>
		<tr>
			<td width="202" align="right" rowspan="2">商品价格:</td>
			<td width="551">市场价格:<input type="text" name="p_cmoney" size="8" maxlength="10">元(RMB)</td>
		</tr>
		<tr>
			<td width="551">会员价格:<input type="text" name="p_mmoney" size="8" maxlength="10">元(RMB)</td>
		</tr>
		<tr>
			<td width="202" align="right" rowspan="2">商品图片:</td>
			<td width="551">商品的大图片:<input type="text" name="big_pic" size="25" readonly value="noimage.gif"><font color="#330000" size="2"><a href="javascript:openWin('upload1.asp?action=1','upload','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=410,height=230')"><img src="image/upload.gif" alt="上传图片" width="60" height="18" border="0" align="middle" style="cursor: hand;" onMouseOver="window.status='使用系统自带的上传程序上传图片';return true;" onMouseOut="window.status='';return true;"></a></font>(不上传图片请按照默认值)</td>
		</tr>
		<tr>
			<td width="551">商品的小图片:<input type="text" name="small_pic" size="25" readonly value="noimage.gif"><font color="#330000" size="2"><a href="javascript:openWin('upload1.asp?action=2','upload','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=410,height=230')"><img src="image/upload.gif" alt="上传图片" width="60" height="18" border="0" align="middle" style="cursor: hand;" onMouseOver="window.status='使用系统自带的上传程序上传图片';return true;" onMouseOut="window.status='';return true;"></a></font>(不上传图片请按照默认值)</td>
		</tr>
		<tr>
			<td width="202" align="right">商品简要说明:</td>
			<td width="551">
<!--#include file="eokedit.asp"-->
<script language="javascript">
document.write ('<iframe src="product_textbox.asp" id="message" width="450" height="250"></iframe>')
frames.message.document.designMode = "On";
</script></td>
		</tr>
		<tr>
			<td width="202" align="right" rowspan="2">
			<p>商品设置:</td>
			<td width="551" align="right">
			<p align="left"><input type="checkbox" name="flag" value="1">推荐&nbsp; <input type="checkbox" name="flag" value="2">特价&nbsp; 
			<input type="checkbox" name="flag" value="3" checked>新品</td>
		</tr>
		<tr>
			<td width="551" align="left">
			<p align="left"><input type="radio" value="1" name="issale" checked>上架&nbsp;&nbsp;&nbsp;&nbsp; 
			<input type="radio" name="issale" value="2">不上架(暂存)</td>
		</tr>
		<tr>
			<td width="744" align="right" colspan="2">
			<p align="center"><input type="submit" value="提交" name="B1" onclick="document.form1.Content.value = frames.message.document.body.innerHTML;">&nbsp; <input type="reset" value="重置" name="B2"><input type="hidden" name="Content" value></td>
		</tr>
	</table>
</div>
</form>
<div align="center">
<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
	<tr>
		<td align=right><input TYPE="button" VALUE="刷新本页" ONCLICK="location.reload()"> </td>
	</tr>
</table>
</div>
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -