www.gusucode.com > ASP+ACCESS医药公司网站建设毕业设计(源代码+论文+答辩PPT) > ASP+ACCESS医药公司网站建设毕业设计(源代码+论文+答辩PPT)\ASP医药网站042\医药网站代码\result.asp

    <%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn.asp" -->
<!--#include file="dividepage.asp"-->
<!--#include file="inc.html"-->
<%
	Dim jj
	Dim item1,item2,item3,item4,sql,page
	Dim Recordset3
	Dim Recordset3_numRows
%>
<%
	if request("action")="search" then
		response.redirect "result.asp?search=yes&DrugCategory="&request.form("DrugCategory")&"&Jixing="&request.form("Jixing")&"&yibao="&request.form("yibao")&"&chufang="&request.form("chufang")&""
	end if

	if request("search")="yes" then
		if request("DrugCategory")="D0" then 
			item1="cDrugCategory like '%%'"
		else
			item1="cDrugCategory='"&request("DrugCategory")&"'"
		end if
		if request("Jixing")="M0" then
			item2="cJixing like '%%'"
		else
			item2="cJixing='"&request("Jixing")&"'"
		end if
		if request("yibao")=0 then 
			item3="cYibao like '%%'"
		else 
			if request("yibao")=1 then
				item3="cYibao='ê?'"
		else
			if request("yibao")=2 then
				item3="cYibao='·?'"
			end if
			end if
		end if
		if request("chufang")=0 then 
			item4="cChufang like '%%'"
		else 
			if request("chufang")=1 then
				item4="cChufang='ê?'"
		else
			if request("chufang")=2 then
				item4="cChufang='·?'"
			end if
			end if
		end if
	end if
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECT * FROM dbo.DrugCategory"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_conn_STRING
Recordset2.Source = "SELECT * FROM dbo.MeidCategory"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<HTML>
<HEAD>
<TITLE>天乐药业有限公司</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {	color: #FF0000;
	font-weight: bold;
}
-->
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (psd.jpg) -->
<TABLE WIDTH=1000 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD COLSPAN=5>
			<IMG SRC="images/register_1.jpg" WIDTH=179 HEIGHT=49 ALT=""></TD>
	    <TD ROWSPAN=10 valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr valign="top">
            <td height="43" colspan="3"><img src="images/result_title.jpg" width="620" height="42"></td>
          </tr>
          <tr>
            <td width="13%" height="57" align="center"><img src="images/ben.jpg" width="31" height="40"></td>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td height="270">&nbsp;</td>
            <td width="78%" valign="top"><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" class="td" bordercolor="#999999">
                <tr>
                  <td width="50%" align="center" height="25" bgcolor="#E7D17E" colspan="2"><span class="style2">查询结果</span></td>
                </tr>
                <%
		sql="select * from Medica where "&item1&" and "&item2&" and "&item4&" and "&item4&""
		Set Recordset3 = Server.CreateObject("ADODB.Recordset")
		Recordset3.ActiveConnection = MM_conn_STRING
		Recordset3.Source = sql
		Recordset3.CursorType= 1
		Recordset3.CursorLocation = 2
		Recordset3.LockType = 1
		Recordset3.Open()

		Recordset3_numRows = 0 
	 	if Recordset3.bof and Recordset3.eof then
      	page=1
      	pagecount=1
      	response.write "<tr><td width=100% align=center height=25>没有内容</td></tr>"
      else
     	 Recordset3.pagesize=10
      	pagecount=Recordset3.pagecount
       page=request("page")
      if page="" or isnumeric(page)=false then
      	page=1
      	Recordset3.absolutepage=1
      elseif cint(page)<1 or cint(page)>pagecount then
      	page=pagecount
      	Recordset3.absolutepage=cint(pagecount)
      else
      	Recordset3.absolutepage=cint(page)
      end if
      a=0
      do while not Recordset3.eof and a<Recordset3.pagesize
      if i mod 2=0 then bg="#F5F5F5" else bg="#FFFFFF"
%>
                <tr>
                  <td width="100%" align="center" height="25"><a href="disMedicainfo.asp?cMedicaName=<%= Recordset3("cMedicaName")%>"><%= Recordset3("cMedicaName")%></a></td>
                </tr>
                <%
 	  i=i+1
      Recordset3.movenext
	  a=a+1
      loop
      end if
	  response.write "<tr><td colspan=5 align=""center"">"
      call divide("result.asp?search="&request("search")&"&DrugCategory="&request("DrugCategory")&"&Jixing="&request("Jixing")&"&yibao="&request("yibao")&"&chufang="&request("chufang"),page,pagecount)
      response.write "</td></tr>"
%>
              </table>
                <%
Recordset3.Close()
Set Recordset3 = Nothing
%></td>
            <td width="9%">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></TD>
	    <TD ROWSPAN=10 valign="top">
			<IMG SRC="images/register_3.jpg" WIDTH=200 HEIGHT=618 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=49 ALT=""></TD>
	</TR>
	<TR>
		<TD COLSPAN=5 align="right" background="images/register_4.jpg"><input name="" type="text" size="12" maxlength="12">&nbsp;&nbsp;<br>
		  <input name="" type="password" size="12" maxlength="12">
      &nbsp;</TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=62 ALT=""></TD>
	</TR>
	<TR>
		<TD COLSPAN=2 ROWSPAN=2>			<img src="images/register_5.jpg" width=123 height=19 alt=""></TD>
		<TD COLSPAN=2>
			<IMG SRC="images/register_6.jpg" WIDTH=45 HEIGHT=16 ALT=""></TD>
		<TD ROWSPAN=2>
			<IMG SRC="images/register_7.jpg" WIDTH=11 HEIGHT=19 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=16 ALT=""></TD>
	</TR>
	<TR>
		<TD COLSPAN=2>
			<IMG SRC="images/register_8.jpg" WIDTH=45 HEIGHT=3 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=3 ALT=""></TD>
	</TR>
	<TR>
		<TD COLSPAN=5>
			<IMG SRC="images/register_9.jpg" WIDTH=179 HEIGHT=50 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=50 ALT=""></TD>
	</TR>
	<TR>
	  <TD COLSPAN=5 rowspan="3"  valign="top" background="images/register_10.jpg">
		<form name="form1" method="post" action="result.asp?action=search">
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">          
		  <tr>
            <td width="42%" height="34">&nbsp;</td>
            <td width="58%" valign="bottom"><select name="DrugCategory" size="1" id="DrugCategory">
              <option value="D0">==请选择==</option>
              <%
While (NOT Recordset1.EOF)
%>
              <option value="<%=(Recordset1.Fields.Item("cDrugId").Value)%>"><%=(Recordset1.Fields.Item("cDrugName").Value)%></option>
              <%
  Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
  Recordset1.MoveFirst
Else
  Recordset1.Requery
End If
%>
            </select></td>
          </tr>
          <tr>
            <td height="33">&nbsp;</td>
            <td valign="bottom"><select name="Jixing" size="1" id="Jixing">
              <option value="M0">==请选择==</option>
              <%
While (NOT Recordset2.EOF)
%>
              <option value="<%=(Recordset2.Fields.Item("cMedId").Value)%>"><%=(Recordset2.Fields.Item("cMediaName").Value)%></option>
              <%
  Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
  Recordset2.MoveFirst
Else
  Recordset2.Requery
End If
%>
            </select></td>
          </tr>
          <tr>
            <td height="28">&nbsp;</td>
            <td valign="bottom"><select name="chufang" size="1">
              <option value="0">==请选择==</option>
              <option value="1">是</option>
              <option value="2">否</option>
            </select></td>
          </tr>
          <tr>
            <td height="30">&nbsp;</td>
            <td valign="bottom"><select name="yibao" size="1" id="yibao">
              <option value="0">==请选择==</option>
              <option value="1">是</option>
              <option value="2">否</option>
            </select></td>
          </tr>
          <tr>
            <td height="28" width="42%">&nbsp;</td>
            <td align="left" valign="bottom"><input name="submit" type="submit" style="background-image:url('images/register_12.jpg');border:0;width:54;height:19" value=""></td>
          </tr>
        </table> 
		</form>
	  </TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=139 ALT=""></TD>
	</TR>
	<TR>
	  <TD>
		  <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=19 ALT=""></TD>
	</TR>
	<TR>
		<TD height="8">
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=8 ALT=""></TD>
	</TR>
	<TR>
		<TD COLSPAN=5>
			<IMG SRC="images/register_15.jpg" WIDTH=179 HEIGHT=158 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=158 ALT=""></TD>
	</TR>
	<TR>
		<TD COLSPAN=5 ROWSPAN=2>
			<IMG SRC="images/register_16.jpg" WIDTH=179 HEIGHT=169 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=114 ALT=""></TD>
	</TR>
	<TR>
		<TD>
			<IMG SRC="images/register_17.jpg" WIDTH=621 HEIGHT=55 ALT=""></TD>
		<TD>
			<IMG SRC="images/register_18.jpg" WIDTH=200 HEIGHT=55 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=55 ALT=""></TD>
	</TR>
	<TR>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=76 HEIGHT=1 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=47 HEIGHT=1 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=7 HEIGHT=1 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=38 HEIGHT=1 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=11 HEIGHT=1 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=621 HEIGHT=1 ALT=""></TD>
		<TD>
			<IMG SRC="images/spacer.gif" WIDTH=200 HEIGHT=1 ALT=""></TD>
		<TD></TD>
	</TR>
</TABLE>
<!-- End ImageReady Slices -->
</BODY>
</HTML>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>