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

📄 edit_book.asp

📁 很好的网上书店源码 适合企业个人使用 很好的网络书城
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.reload('login.asp')</script>"
response.End
end if
dim bookid
bookid=request.QueryString("id")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/css.css" rel="stylesheet" type="text/css">
</head>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1

set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_xclass order by xpx ",conn,1,1
%>
<script language='javascript'>
function change(a)
{
var a;
switch (a)
{

case 'auto': 
a=parseFloat(document.myform.shichangjia.value);
a*=parseFloat(document.myform.hyzk.value);
document.myform.huiyuanjia.value=a;

a=parseFloat(document.myform.shichangjia.value);
a*=parseFloat(document.myform.vipzk.value);
document.myform.vip.value=a;
break;

}

} 
function dengyu(a)
{ 
myform.radio2.value=a
}


--> 
</script>
<script language = "JavaScript">
var onecount;
var threecount;
onecount=0;
threecount=0

subcat3=new Array();
<%
   count = 0
   do while not rs2.eof 
%>
subcat3[<%=count%>] = new Array("<%= trim(rs2("xclass"))%>","<%= rs2("nclassid")%>","<%= rs2("id")%>");
<%
        count = count + 1
        rs2.movenext
        loop
        rs2.close
%>
threecount=<%=count%>;

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]);
            }        
        }
     changelocation3(document.myform.nclassid.options[document.myform.nclassid.selectedIndex].value)
            
    }    
    
function changelocation3(locationid)
    {
    document.myform.xclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < threecount; i++)
        {
            if (subcat3[i][1] == locationid)
            { 
             document.myform.xclassid.options[document.myform.xclassid.length] = new Option(subcat3[i][0], subcat3[i][2]);
            }        
        }
        
    } 
//-->
</script>
<body><!--#include file="menu.asp"-->
<div align="center">
<table width="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="#BCD7E0">
  <tr> 
    <td bgcolor="#BCD7E0" background="../images/manage/line_all.gif"><div align="center"><font color="#000000">添加新图书</font></div></td>
  </tr>
  <tr><form name="myform" method="post" action="saveaddbook.asp?action=edit&id=<%=bookid%>">
    <td height="126" bgcolor="#F8FCFD">
			<table width="12" height="7" border="0" cellpadding="0" cellspacing="0" id="table4">
          <tr> 
            <td height=7></td>
          </tr>
        </table> 
			<table width="12" height="7" border="0" cellpadding="0" cellspacing="0" id="table5">
          <tr> 
            <td height=7></td>
          </tr>
        </table> 
			<table width="12" height="7" border="0" cellpadding="0" cellspacing="0" id="table6">
          <tr> 
            <td height=7></td>
          </tr>
        </table> 
		<div align="center">
        <table width="90%" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #BCD7E0">
          <tr> 
            <td width="17%" align="center" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">选择分类:</td>
            <td colspan="2">&nbsp;大类:
      <%
	  dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from shop_books where bookid="&bookid,conn,1,1
        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)">
        <%      dim selclass
         selclass=rs("anclassid")
        
        do while not rs.eof

  response.write  "<option value="&rs("anclassid")
  if rs1("anclassid")=rs("anclassid") then response.write " selected "
  response.write ">"&trim(rs("anclass"))&"</option>"    
        rs.movenext
        loop
	end if
        rs.close
%>
      </select>
&nbsp;&nbsp; 小类:
<select name="nclassid" size="1" id="nclassid" onChange="changelocation3(document.myform.nclassid.options[document.myform.nclassid.selectedIndex].value)">
  <%rs.open "select * from shop_Nclass where anclassid="&rs1("anclassid"),conn,1,1
if not(rs.eof and rs.bof) then
%>
  <% 
                                 dim selclass3
 				 selclass3=rs("nclassid")
do while not rs.eof
  response.write  "<option value="&rs("nclassid")
  if rs1("nclassid")=rs("nclassid") then response.write " selected "
  response.write ">"&trim(rs("nclass"))&"</option>"  
rs.movenext
loop
end if
        rs.close
        set rs = nothing
        
%>
</select>
<font color="#FF0000">&nbsp;&nbsp;&nbsp; </font> 子类:
<select name="xclassid">
  <%
		rs2.open "select * from shop_xclass where nclassid="&rs1("nclassid"),conn,1,1
if not(rs2.eof and rs2.bof) then
do while not rs2.eof%>
  <option value="<%=rs2("id")%>"<%if rs1("xclassid")=rs2("id") then %> selected <%end if %> ><%=rs2("xclass")%></option>
  <% rs2.movenext
loop


end if
        rs2.close
        set rs2= nothing
%>
</select>
    </td>
          </tr>
          <tr> 
            <td align="center" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">图书名称:</td>
            <td colspan="2">&nbsp;<input name="bookname" type="text" id="bookname" size="30" value="<%=trim(rs1("bookname"))%>"> 
			关键字:<input name="k" type="text" id="k" size="14" value="<%=trim(rs1("k"))%>"></td>
          </tr>
			<tr>
            <td align="center" style="border-left-width: 1px; border-right-style: solid; border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px">书本编号:</td>
            <td colspan="2">
			&nbsp;<input name="bh" type="text" id="bh" size="30" value="<%=trim(rs1("bh"))%>"><font color="#666666"><img border="0" src="../images/bit2.gif" width="20" height="12">可以留空</font></td>

⌨️ 快捷键说明

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