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

📄 addbook.asp

📁 电子商务购物系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='login.asp';</script>"
response.End
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",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("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.myform.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { //这句不是很理解
             document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<body>
<br><table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
  <tr> 
    <td height="25" bgcolor="#F1F1F1"> 
      <div align="center"><font color="#000000">添加新商品</font></div>
    </td>
  </tr>
  <tr> 
    <form name="myform" method="post" action="saveaddbook.asp?action=add" onSubmit="return checkkk()" >
      <td height="126" bgcolor="#FFFFFF"> 
        <table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
          <tr> 
            <td width="8%">&nbsp;</td>
            <td width="13%">选择分类: </td>
            <td colspan="2"> 
              <%
        rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>
              大类 
              <select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)" class="wenbenkuang">
                <option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                <%      dim selclass
         selclass=rs("anclassid")
        rs.movenext
        do while not rs.eof
%>
                <option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                <%
        rs.movenext
        loop
	end if
        rs.close
%>
              </select>
               小类 
              <select name="Nclassid" class="wenbenkuang">
                <%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
                <option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                <% rs.movenext
do while not rs.eof%>
                <option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
                <% rs.movenext
loop
end if
        rs.close
        set rs = nothing
%>
              </select>
              <font color="#FF0000">&nbsp;</font></td>
          </tr>
          <tr> 
            <td rowspan="3" width="8%">&nbsp;</td>
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=1 ",conn,1,1
%>
              <input type="text" name="mch" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang">
              <%
rs_s.close
set rs_s=nothing
%>
            </td>
            <td colspan="2"> 
              <input name="bookname" class="wenbenkuang" type="text" id="bookname" size="30">
               浮动价 
              <select name="fudongjia" size=1 class="wenbenkuang">
                <%set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_fudong order by id ",conn,1,1
if rs_s.recordcount=0 then
response.write "请先添加浮动价"
else
while not rs_s.eof
%>
                <option value=<%=rs_s("id")%> ><%=rs_s("shuoming")%></option>
                <%
rs_s.movenext
wend
end if%>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=2 ",conn,1,1
%>
              <input type="text" name="pp" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang">
              <%
rs_s.close
set rs_s=nothing
%>
            </td>
            <td colspan="2"> 
              <input name="pingpai" type="text" id="pingpai" size="20" class="wenbenkuang">
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from pingpai order by pingpaiorder ",conn,1,1
%>
              <select name="select" class="wenbenkuang" onChange="(document.myform.pingpai.value=this.options[this.selectedIndex].value)">
                <option selected>请选择品牌</option>
                <%
while not rs_s.eof
%>
                <option value="<%=rs_s("pingpainame")%>"><%=rs_s("pingpainame")%></option>
                <%
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
              </select>
            </td>
          </tr>
          <tr> 
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=3 ",conn,1,1
%>
              <input type="text" name="isbn1" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang">
              <%
rs_s.close
set rs_s=nothing
%>
            </td>
            <td colspan="2"> 
              <input name="isbn" type="text" id="isbn" size="30" class="wenbenkuang">
            </td>
          </tr>
          <tr> 
            <td width="8%">&nbsp;</td>
            <td width="13%"> 
              <%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=4 ",conn,1,1
%>
              <input type="text" name="jj" size="12" value="<%=rs_s("ziduanname")%>" class="wenbenkuang">
              <%
rs_s.close
set rs_s=nothing
%>
            </td>
            <td colspan="2"> 
              <input name="bookchuban" type="text" id="bookchuban" size="10"  class="wenbenkuang">
              <%

⌨️ 快捷键说明

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