addbook.asp

来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 333 行 · 第 1/2 页

ASP
333
字号

  <%dim rs22,rs33
    set rs=server.CreateObject("adodb.recordset")
        rs.open "select * from shop_anclass order by anclassidorder",conn,1,1

    set rs22=server.CreateObject("adodb.recordset")
        rs22.open "select * from shop_Nclass order by nclassidorder",conn,1,1

    set rs33=server.CreateObject("adodb.recordset")
        rs33.open "select * from shop_publish order by pubjian",conn,1,1%>

      <table width="98%" border="1"  align=center cellspacing="0" cellpadding="0" bordercolordark="#eeeeee" bordercolorlight="#666666">
         <form name="myform" method="post" action="saveaddbook.asp?action=add">
            <tr><td>
                  <table width="100%" border="1"  align=center cellspacing="0" cellpadding="0">
                     <tr><td>
                       <table width="100%" border="0"  align=center cellspacing="1" cellpadding="3" bgcolor="#ffffff">
                          <tr>
                          <td bgcolor="#ece9d8" width="10%" align=right>选择分类&nbsp;</td>
                          <td bgcolor="#ece9d8" colspan="2"><select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
                          <option value=0 selected>-请选择-</option>
                          <%do while not rs.eof%>
                          <option value=<%=rs("anclassid")%>>
                          <%response.Write trim(rs("anclass"))&"</option>"
                            rs.movenext
                            loop
                            response.Write "</select>"
                            rs.close
                            set rs=nothing%>

                            小类&nbsp;<select name="Nclassid" size="1" id="nclassid">
                          <option value=0 selected>-请选择-</option>
                          </select></td>
                          </tr>
                          <tr> 
                            <td bgcolor="#eeeeee" align=right>书名&nbsp;</td>
                            <td bgcolor="#eeeeee" colspan="2"><input name="bookname" type="text" id="bookname" size="30"></td>
                          </tr>
                          <tr> 
                            <td bgcolor="#eeeeee" align=right>书号&nbsp;</td>
                            <td bgcolor="#eeeeee" colspan="2"><input name="isbn" type="text" id="isbn" size="30"></td>
                          </tr>
                          <tr> 
                            <td bgcolor="#eeeeee" align=right>作者&nbsp;</td>
                            <td bgcolor="#eeeeee" colspan="2"><input name="bookzz" type="text" id="bookzz" size="30"></td>
                          </tr>
                          <tr> 
                            <td bgcolor="#eeeeee" align=right>出版社&nbsp;</td>
                            <td bgcolor="#eeeeee" colspan="2"><input name="bookchuban" type="text" id="bookchuban" size="30" value="--请选择--" onfocus='showpub()'>
                                                             
                         
                          <br>
                            <div id='add_publish' name='add_publish' style='display:none'>

                            <select name="publish" size="2" id="publish" style="width:222px;height=80px" onChange="changepub(document.myform.publish.options[document.myform.publish.selectedIndex].value)">
                          <option value="" selected>--请选择--</option>
                          <%do while not rs33.eof%>
                          <option value=<%=trim(rs33("bookchuban"))%>>
                          <%response.Write trim(rs33("bookchuban"))&"</option>"
                            rs33.movenext
                            loop
                            response.Write "</select>"
                            rs33.close
                            set rs33=nothing%></div></td>
                          </tr>
                          <tr> 
                            <td bgcolor="#eeeeee" align=right height="20">出版日期&nbsp;</td>
                            <td bgcolor="#eeeeee" colspan="2"><select name="bookdateyear" id="bookdateyear">
                          <%dim i,ii
                            for i=1996 to 2010 
                                response.write "<option value="&i&">"&i&"</option>"
                            next%></select>&nbsp;年

                            <select name="bookdatemonth" id="bookdatemonth"><%
                            for ii=1 to 12
                                response.write "<option value="&ii&">"&ii&"</option>"
                            next%></select>&nbsp;月</td> 
                            </tr>
                            <tr> 
                              <td bgcolor="#eeeeee" align=right>价格&nbsp;</td>
                              <td bgcolor="#eeeeee" colspan="2">市场价&nbsp;<input name="shichangjia" type="text" id="shichangjia" size="6" onkeypress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" 
		                                    onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
		                                    ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))">&nbsp;元,
                                              会员价&nbsp;<input name="huiyuanjia" type="text" id="huiyuanjia" size="6" onkeypress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" 
		                                    onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
		                                    ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))">&nbsp;元</td>
                             </tr>
                             <tr> 
                                <td bgcolor="#eeeeee" align=right>其它资料&nbsp;</td>
                                <td bgcolor="#eeeeee" colspan="2">开本&nbsp;<select name="kaiben" id="kaiben">
                                                       <option value="16" selected>16</option>
                                                       <option value="32">32</option>
                                                       <option value="小32">小32</option>
                                                       </select>,
                                                版次&nbsp;<input name="banci"  size="4" type="text" onkeypress	= "return regInput(this,	/^[0-9]*$/,		String.fromCharCode(event.keyCode))"
		                                    onpaste		= "return regInput(this,	/^[0-9]*$/,		window.clipboardData.getData('Text'))"
		                                    ondrop		= "return regInput(this,	/^[0-9]*$/,		event.dataTransfer.getData('Text'))">&nbsp;次,
                                                页数&nbsp;<input name="yeshu" type="text" id="yeshu" size="4" onkeypress	= "return regInput(this,	/^[0-9]*$/,		String.fromCharCode(event.keyCode))"
		                                    onpaste		= "return regInput(this,	/^[0-9]*$/,		window.clipboardData.getData('Text'))"
		                                    ondrop		= "return regInput(this,	/^[0-9]*$/,		event.dataTransfer.getData('Text'))">&nbsp;页</td>
                             </tr>
                             <tr> 
                                <td bgcolor="#eeeeee" align=right>装帧方式&nbsp;</td>
                                <td bgcolor="#eeeeee" colspan="2"><select name="zhuang" id="zhuang">
                                                       <option value="简装" selected>简装</option>
                                                       <option value="精装">精装</option>
                                                       <option value="特殊">特殊</option>
                                                       </select>&nbsp;主荐此书&nbsp;
                                                                  <select name="bbestbook" id="bbestbook">
                                                       <option value="0" selected>否</option>
                                                       <option value="1">是</option>
                                                       </select>&nbsp;推荐此书&nbsp;
                                                                  <select name="bestbook" id="bestbook">
                                                       <option value="0" selected>否</option>
                                                       <option value="1">是</option>
                                                                  </select>
                  
                             </tr>
                             <tr> 
                               <td bgcolor="#eeeeee" align=right height="18">封面&nbsp;</td>
                               <td height="18" bgcolor="#eeeeee" colspan="2"><%if upictemp="" then%>
                                                                                  <input name="bookpic" type="text" id="bookpic" size="40">
                                                                             <%else%>
                                                                                  <input name="bookpic" type="text" id="bookpic" size="40" value=<%=upictemp%>>
                                                                             <%end if%>  
                               &nbsp;<input type='checkbox' name='bkpicadd' onclick='showedit()'><font color=#800000>上传</font></a></td>
                             </tr>
                             <tr> 
                                <td bgcolor="#eeeeee" align=right valign="center">内容简介&nbsp;</td>
                                <td bgcolor="#eeeeee" colspan="2"><textarea name="bookcontent" cols="46" rows="8" id="bookcontent"></textarea></td>
                             </tr>
                             <tr> 
                                <td bgcolor="#eeeeee" align=right valign="center">图书目录&nbsp;</td>
                                <td bgcolor="#eeeeee" colspan="2"><textarea name="bookmulu" cols="46" rows="8" id="bookmulu"></textarea></td>
                             </tr>
                             <tr> 
                                <td bgcolor="#ece9d8"  colspan="3" align="center"><div id='add_bookpicok' name='add_bookpicok' style='display:""'><input type="submit" name="Submit1" value="增 加" onClick="return check();"></td>
                             </tr></div>
                           </form>
                        </table>
                                                
                      <div id='add_bookpicup' name='add_bookpicup' style='display:none'>
                        <table width="100%" border="0" align=center cellspacing="1" cellpadding="3" bgcolor="#ffffff">
                           <form name="form1" method="post" action="upfile.asp?action=addbkpic" enctype="multipart/form-data" onsubmit="checkImage('file1')">
                              <input type="hidden" name="act" value="upload">  
                              <tr height=35><td bgcolor="#eeeeee" width="10%" align=right><input type="hidden" name="filepath" value="../bookpic/">封面位置&nbsp;
                                            <td bgcolor="#eeeeee"><input type="file" name="file1" style="width:415" class="tx1" value="">&nbsp;&nbsp;&nbsp;
                              <input type="submit" name="Submit2" value="上 传">
                        &nbsp;<input type="reset"  name="Submit3" value="清 除"></td>
                              </tr>
                           </form>
                        </table> 
                      </div>

                      <br>
                   </tr>
                </table>
        
            </tr>
         </table>
   </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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