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

📄 managebook.asp

📁 图书销售系统,页面丰富,连接数据库,多个运行.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"managebook.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"managebook.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"managebook.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0%> 
        <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
          <tr bgcolor="#DEE7FF"> 
            <td><div align="center">ID</div></td>
            <td><div align="center">图书名称</div></td>
            <td><div align="center">出版社</div></td>
            <td><div align="center">市场价</div></td>
            <td><div align="center">会员价</div></td>
            <td><div align="center">团体价</div></td>
            <td><div align="center">推荐</div></td>
            <td><div align="center">选择</div></td>
          </tr>
          <%
		  do while not rs.eof%>
          <tr bgcolor="#DEE7FF"> 
            <td ><div align="center"><%=int(rs("Bookid"))%></div></td>
            <td style="padding-left:6px"><a href=editbook.asp?id=<%=rs("bookid")%> title=<%=rs("bookname")%>> 
              <% if len(trim(rs("bookname")))>20 then
			response.write left(trim(rs("bookname")),20)&"..."
			else
			response.write trim(rs("bookname"))
			end if%>
              </a></td>
            <td><div align="center"> 
                <%if len(trim(rs("bookchuban")))>10 then
			response.write left(trim(rs("bookchuban")),10)&"..."
			else 
			response.write trim(rs("bookchuban"))
			end if%>
              </div></td>
            <td><div align="center"><%=ccur(rs("shichangjia"))%></div></td>
            <td><div align="center"><%=ccur(rs("huiyuanjia"))%></div></td>
            <td><div align="center"><%=ccur(rs("tuantijia"))%></div></td>
            <td><div align="center"> 
                <%if int(rs("BestBook"))=1 then response.Write "√" else response.Write "×" end if%>
              </div></td>
            <td> <div align="center"> 
                <input name="selectbookid" type="checkbox" id="selectbookid" value="<%=rs("bookid")%>">
              </div></td>
          </tr>
          <%i=i+1
			if i>=MaxPerPage then Exit Do
			rs.movenext
		  loop
		  rs.close
		  set rs=nothing%>
          <tr bgcolor="#DEE7FF"> 
            <td height="30" colspan="7"> <div align="right"> 
                <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1">
                  <tr> 
                    <td width="89%">&nbsp;&nbsp; <input name="zhuanyi" type="checkbox" id="zhuanyi" value="1">
                      转移图书分类: 
                      <%set rs=server.CreateObject("adodb.recordset")
        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)">
                        <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">
                        <%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
        conn.Close
        set conn = nothing
%>
                      </select> <font color="#FF0000">&nbsp; 
                      <input type="submit" name="Submit3" value="确定转移" onclick="chk1();">
&nbsp;全选
                <input type="checkbox" name="checkbox" value="Check All" onclick="mm()">
                                    </font></td>
                    <td width="11%"><div align="right"> 
                        <input type="submit" name="Submit" value="删 除" onclick="chk2();">
                      </div></td>
                  </tr>
                </table>
              </div></td>
            <td></td>
          </tr>
        </table>
        <%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If
				
				Response.Write "<p align='center' class='contents'> "  
				
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首页 上一页</font> "  
				Else  
					Response.Write "<a href="&filename&"?page=1&selectm="&selectm&"&selectkey="&selectkey&"&queshu="&queshu&"&anclassid="&anclassid&">首页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&selectm="&selectm&"&selectkey="&selectkey&"&queshu="&queshu&"&anclassid="&anclassid&" >上一页</a> "  
				End If
				
				If n-currentpage<1 Then  
					Response.Write "<font class='contents'>下一页 尾页</font>"  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&selectm="&selectm&"&selectkey="&selectkey&"&queshu="&queshu&"&anclassid="&anclassid&" class='contents'>"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&"&selectm="&selectm&"&selectkey="&selectkey&"&queshu="&queshu&"&anclassid="&anclassid&" class='contents'>尾页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"种商品 " 
					Response.Write maxperpage&"条数据/页 "
					Response.Write  "<select name=select onchange=""var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}"" ><base target=Right><option >跳转到</option>"
					dim mmm
					for mmm=1 to n
					response.write "<option value=managebook.asp?Page="&mmm&"&selectm="&selectm&"&selectkey="&selectkey&"&queshu="&queshu&"&anclassid="&anclassid&">第"&mmm&"页</option>"
					next
					response.write "</select>"
					
				End Function  
			%> </form>
  <table width="12" height="7" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td height=7></td>
          </tr>
        </table></td>
    
  </tr>
</table>
<br>
<table width="96%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#6396D6">
  <tr> 
    <td height="18" background="images/admin_bg.gif"><div align="center"><font color="#FFFFFF"><%if queshu="yes" then
	response.write "缺 书 查 讯"
	else
	response.write "图 书 查 讯"
	end if%></font></div></td>
  </tr>
  <tr><form name="form2" method="post" action="managebook.asp?queshu=<%=queshu%>">
    <td height="43" bgcolor="#DEE7FF">
        <table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">
          <tr bgcolor="#DEE7FF"> 
            <td width="35%"><div align="center"> 
                <input name="selectkey" type="text" id="selectkey" onFocus="this.value=''" value="请输入关键字">
                <br>
                填写日期格式:年-月</div></td>
            <td width="45%"><div align="center">选择查讯方式 
                <select name="selectm" id="selectm">
                  
                  <option value="name">按图书名称</option>
                  <option value="zuozhe">按图书作者</option>
                  <option value="chubanshe">按图书出版社</option>
                  <option value="isbn">按图书ISBN</option>
				  <option value="bookid">按图编号</option>
				  <option value="pubdate">出版日期</option>
                </select>
              </div></td>
            <td width="20%" height="30"><div align="center"> 
                <input type="submit" name="Submit2" value="查 讯">
              </div></td>
          </tr>
        </table>
      </td></form>
  </tr>
</table>
<br>
<!--#include file="copyright.asp"-->
</body>
</html>
<script language=javascript>
function mm()
{
   var a = document.getElementsByTagName("input");
   if(a[0].checked==true){
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}
</script>

⌨️ 快捷键说明

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