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

📄 add.asp

📁 if you want it,call me.
💻 ASP
字号:
<!--#include file="session.asp"-->
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加新商品</title>
<link  href="css.css" rel="stylesheet" type="text/css">
<%
'=======================================
'88red科技独立开发完成本程序,并提供免费技术支持与升级服务
'官方网站 http://www.88red.com    QQ:8375158  TEL:13964489818
'对于商业客户,本站提供细致周到的各项售后服务;对于盗版客户恕不提供,对于散播本程序者本站将追究其法律责任
'88red科技将陆续开发其他各种先进程序,例如企业网站建站系统等等,对老客户购买其他程序给予最大程度的优惠,欢迎洽谈
'=======================================
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">&nbsp;</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"><b> <span class="bigNavi">添加新商品</span>              </b></font></b></td>
          <td width="8" class="mainrights"></td>
        </tr>
      </table>
	  <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 width="98%" border="0" align="center" cellspacing="1">
            <td width="85%"> 
              <%
        sql = "select * from bigclass"
        rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else%>
               大类 
              <select name="bcid" onChange="changelocation(document.formadd.bcid.options[document.formadd.bcid.selectedIndex].value)" size="1">
                <option selected value="<%=trim(rs("bcid"))%>"><%=trim(rs("bcname"))%></option>
                <%      dim conclass
         conclass=rs("bcid")
        rs.movenext
        do while not rs.eof
%>
                <option value="<%=trim(rs("bcid"))%>"><%=trim(rs("bcname"))%></option>
                <%rs.movenext
        loop
	end if
        rs.close
%>
              </select>
               相关小类 
              <select name="scid">
                <%sql="select * from smallclass where bcid="&conclass
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
                <option selected value="<%=rs("scid")%>"><%=rs("scname")%></option>
                <% rs.movenext
do while not rs.eof%>
                <option value="<%=rs("scid")%>"><%=rs("scname")%></option>
                <% rs.movenext
loop
end if
        rs.close
        set rs = nothing%>
              </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">VIP价</div></td>
        <td width="31%" height="20">  
          <input type="text" name="vipprice" size="12" class="border">
          元</td>
        <td width="18%"> <div align="center">商品积分</div></td>
        <td width="34%">  
          <input type="text" name="jifen" size="12 " 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="spic" type="text" value="" size="30" class="border">
                </div></td>
              <td width="51%"></td>
            </tr>
          </table></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="pic" type="text" value="" size="30" class="border">
                </div></td>
              <td width="51%"></td>
            </tr>
          </table></td>
      </tr>
      <tr class="tabbgcolorli"> 
        <td height="20"> <div align="center">是否推荐</div></td>
        <td height="20">    是 
          <input type="radio" name="tj" value="true">
           否 
          <input type="radio" name="tj" value="false" checked> </td>
        <td> <div align="center">是否特价</div></td>
        <td>   是 
          <input name="tejia" type="radio" value="true"> &nbsp;&nbsp; 否 
          <input type="radio" name="tejia" value="false"  checked></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>
</body>
</html>

⌨️ 快捷键说明

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