qh_more.asp

来自「书店的管理系统。不错的一个源程序。提供给大家。」· ASP 代码 · 共 293 行

ASP
293
字号
<%@ Language=VBScript %>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新华书店总店期货</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style type="text/css"><!--
A:link{text-decoration:none;font-size:9pt}A:visited{text-decoration:none;font-size:9pt}A:active{text-decoration:none;font-size:9pt}A:hover{text-decoration:none;color:red}body,table{font-size:9pt}tr,td{font-size:9pt}-->
</style>

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function b_go_onclick(theForm,maxPage) {
  if (theForm.GotoPageNo.value == "")
  {
    alert("请输入 \"要转到的页数\" .");
    theForm.GotoPageNo.focus();
    return (false);
  }

  if ( (theForm.GotoPageNo.value > maxPage)||(theForm.GotoPageNo.value < 1) )
  {
    alert("请重新输入 \"要转到的页数\" .");
    theForm.GotoPageNo.focus();
    return (false);
  }

  var checkOK = "0123456789";
  var checkStr = theForm.GotoPageNo.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("请重新输入 \"要转到的页数\" .");
    theForm.GotoPageNo.focus();
    return (false);
  }
return (true)
}

//-->
</SCRIPT>

</head>
<%
tet=Request.form("tet")
r1=Request.form("R1")
Mv = Request.form("Mv")
PageNo = Request.form("PageNo")
GotoPageNo = CInt(Request.form("GotoPageNo"))


set con=server.createobject("ADODB.Connection")
con.open Application("str_con")
%>

<body topmargin="5" vlink="#0000FF" alink="#FF0000" link="#0000FF">
<div align="center"><center>
  </center></div><div align="center"><center>

    <table border="0" cellPadding="0" cellSpacing="0" width="700">
      <tr> 
        <td align="center" class="chn" height="1" nowrap width="700" bgcolor="#000000"></td>
      </tr>
      <tr> 
        <td align="center" class="chn" height="1" nowrap width="700" bgcolor="#000000"></td>
      </tr>
      <tr> 
        <td align="center" class="chn" height="10" nowrap width="700"></td>
      </tr>
    </table>
</center></div><div align="center"><center>

<table border="0" width="700" cellspacing="0" cellpadding="0">
  <tr>
        <td width="94" bgcolor="#EBE9C9" valign="top" rowspan="2"> 
          <table border="0" width="100%"
    cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%" height="10"></td>
      </tr>
      <tr>
              <td width="100%"><strong><span style="font-size: 9pt"></span></strong></td>
      </tr>
      <tr>
        <td width="100%" height="10"></td>
      </tr>
      <tr>
              <td width="100%" align=center><strong>期货信息</strong></td>
      </tr>
      <tr>
        <td width="100%" height="10"></td>
      </tr>
      <tr>
              <td width="100%"><strong><font color="#FF0000"> </font></strong></td>
      </tr>
      <tr>
        <td width="100%" height="10"></td>
      </tr>
      <tr>
              <td width="100%"><strong></strong></td>
      </tr>
    </table>
    </td>
        <td width="6" rowspan="2"></td>

        <td valign="top" width="606"><br>




<div align="center"><center><p>

<form method="POST" name="form1" action="qh_more.asp">
   <input type="text" name="tet" size="21" value="<%=tet%>">
   
   <input type="submit" value="搜索" name="B1" style="font-size: 9pt">
   <input type="reset" value="重输" name="B2" style="font-size: 9pt"><br>

   <input type="radio" value="1" name="R1" <%if r1="1" then%> checked <%end if%> ><span style="font-size: 9pt">书名 
   <input type="radio" value="2" name="R1" <%if r1="2" then%> checked <%end if%> >作者 
   <input type="radio" value="3" name="R1" <%if r1="3" then%> checked <%end if%> >出版社 
</form>
      
</p></center></div>




<%
set res=server.createobject("ADODB.Recordset")
set res.ActiveConnection = con

select case r1
	case "1"
		title_name=Request.form("tet")
		res.source="select A1,A2 from QHsm where A2 like '%"&title_name&"%'"

	case "2"
		author=Request.form("tet")
		res.source="select A1,A2 from QHsm where A4 like '%"&author&"%'"

	case "3"
		pub_name=Request.form("tet")
		res.source="select A1,A2 from QHsm where A6 like '%"&pub_name&"%'"

	case else
		res.source="select A1,A2 from QHsm"

end select

res.pagesize=50
res.cursorlocation=3
res.open ,,adOpenStatic

PageCount = res.PageCount

if res.eof=true then
	response.write "没有满足条件的图书 !"
	Response.End
else
	If PageNo = "" Then
		PageNo = 1
	End If

	Select Case Mv
		Case "首页"
			PageNo = 1

		Case "上一页"
			If PageNo > 1 Then
	       		PageNo = PageNo - 1
			Else
				PageNo = 1
			End If

		 Case "下一页"
			If res.AbsolutePage < PageCount Then
				PageNo = PageNo + 1
			Else
				PageNo = PageCount
			End If

		Case "尾页"
			PageNo = PageCount

		Case "go!"
			PageNo = GotoPageNo

	    Case  Else
			PageNo = 1
	End Select
	
	res.AbsolutePage = PageNo
	
End If
%>





   <form Action="qh_more.asp" Method="POST" name="form4">
	  <input type="hidden" name="tet" value="<%=tet%>">
	  <input type="hidden" name="R1" value="<%= R1 %>">
      <input type="hidden" name="PageNo" value="<%=PageNo%>">

	  <input TYPE="submit" Name="Mv" Value="首页" style="font-size: 9pt" <%If PageNo = 1 Then %>disabled<%End If %>> 
 
	  <input TYPE="submit" Name="Mv" Value="上一页" style="font-size: 9pt" <%If PageNo <= 1 Then %>disabled<%End If %>> 
 
	  <input TYPE="submit" Name="Mv" Value="下一页" style="font-size: 9pt" <%If PageNo >= PageCount Then %>disabled<%End If %>>

	  <input TYPE="submit" Name="Mv" Value="尾页" style="font-size: 9pt" <%If PageNo = PageCount Then %>disabled<%End If %>> 

	  &nbsp;&nbsp;&nbsp;&nbsp;
	  转到第<input name="GotoPageNo" size="4" value="<%=GotoPageNo%>">页
	  <input TYPE="submit" Name="Mv" Value="go!" style="font-size: 9pt" id=b_go LANGUAGE=javascript onclick="return b_go_onclick(form4,<%=PageCount%>)"> 


	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第<%=PageNo%>页;共<%=PageCount%>页;共<%=res.recordcount%>条书目

   </form>


		<% For j = 1 to res.PageSize %>
          <img src="redarow.gif" width="8" height="8" alt="redarow.gif (160 字节)">
          <a href="qh_detail.asp?A1=<%=res("A1")%>" target="_blank">  <%=res("A2")%></a>
          <br><br>

		<% res.movenext
		   If res.EOF Then
		      Exit For
	       End If
           Next 

		   res.Close 
		   con.Close 
		%>




        </p>
        </td>
  </tr>
  <tr>
        <td width="606" valign="top" height="2"> 
          <p> </td>
  </tr>
</table>
  </center>
</div>

<div align="center"><center>

<table border="0" width="99%" cellspacing="0" cellpadding="0" height="1">
  <tr>
    <td width="100%" bgcolor="#E2E0B1"></td>
  </tr>
</table>
</center></div>

<p align="center"><font color="#C0BB56"><span ></span style="font-size: 9pt">版权所有:新华书店总店<span
></span><br>
<span style="font-size: 9pt">新华通力图书信息技术有限公司<br>
电话:(010)68351133-2017<br>
传真:(010)68351133-2016</span></font><span style="font-size: 9pt"><font color="#B6B043"><br>
  </font></span><a href="mailto:webmaster@bookbbc.com"><font color="#B6B043"><span style="font-size: 9pt">电</span></font><font color="#B6B043">子<span ></span>邮件<span
style="font-size: 9pt">:webmaster@bookbbc.com</span></font></a><font color="#B6B043"><span
style="font-size: 9pt"><br>
  </span></font></p>

</body>
</html>

⌨️ 快捷键说明

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