| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 499 人关注过本帖
标题:ASP页面搜索功能失效,请帮我看看
只看楼主 加入收藏
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
结帖率:50%
收藏
已结贴  问题点数:40 回复次数:3 
ASP页面搜索功能失效,请帮我看看
ASP页面搜索功能失效,请帮我看看!
  我在这个页面增加了搜索功能,主要是想把符合条件的显示出来,但是目前搜索是无效的,请大家帮我看看要修改哪里?!

   这些ASP我是参考几个页面的,搜索失效可能是什么地方的写法不对应引起,但我看不出故障。求助了。。。

  <!--#include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<!--#include file="Comm/Function.asp" -->
<!--#include file="Comm/Company_Class.asp" -->
<%
If Request.Form <> "" Then
    Response.Redirect("club.asp?sheng="& Request.Form("sheng") & "&school=" & Request.Form("school") & "&zhuanye=" & Request.Form("zhuanye"))
    Response.End()
End If

Dim strMenu,PageTitle,rs
strMenu = "首页"
PagePath = ""

Set Qsite = New Site_Class

Qsite.SiteConfig()
Qsite.GotoErrPage()

PageTitle = Qsite.SiteName & " - 团队活动"
Qsite.arrMember = Qsite.Member_Info()
Set Rs = server.CreateObject("ADODB.recordset")

Dim school,zhuanye
sheng = Qsite.chgStr(Trim(Request.QueryString("sheng")))
school = Qsite.chgStr(Trim(Request.QueryString("school")))
zhuanye = Qsite.chgStr(Trim(Request.QueryString("zhuanye")))


If Qsite.arrMember(5 , Session("MemberType")) = "1" Then

    If sheng <> "" Then
        Sql = "sheng = '"& sheng &"' "
    End If
    If school <> "" Then
        Sql ="school = '"& school &"' "
    End If
    If zhuanye <> "" And zhuanye <> "不限" Then
        Sql = "zhuanye = '"& zhuanye &"' or zhuanye = '不限'"
    End If
   

End If

sql="select * from love_club order by px"
Rs.Open sql,conn,1,1

FileName = "club.asp?sheng="& sheng & "&school=" & school & "&zhuanye=" & zhuanye

%>
<title><%=PageTitle%></title>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<!--#include file="top.asp"-->
<script language="javascript" src="Comm/School_All.js"></script>
<script language="javascript" src="Comm/School_Function.js"></script>

<table width="966" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E2FFDD" style="BORDER-TOP:#33CC33 1px solid;BORDER-RIGHT:#33CC33 1px solid; BORDER-LEFT:#33CC33 1px solid; BORDER-BOTTOM:#33CC33 1px solid">
  <tr>
      <td align="center" valign="top" >
    <%
If Qsite.arrMember(5 , Session("MemberType")) = "1" Then
%>
        <table width="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E2FFDD">
            <tr>
                <td width="5" height="5"><img src="Images/Ind_News_01.jpg" width="5" height="5" /></td>
                <td width="638" height="5" background="Images/Ind_News_02.jpg"></td>
                <td width="5" height="5"><img src="Images/Ind_News_03.jpg" width="5" height="5" /></td>
            </tr>
            <tr>
                <td width="5" background="Images/Ind_News_08.jpg"></td>
                <td width="638" height="27"><form id="SearchForm" name="SearchForm" method="post" action="club.asp" style="margin:0">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="18%" rowspan="2"><img src="Images/Search_t_05.jpg" width="96" height="26" /></td>
                            <td height="30" colspan="2">
                                 <select name="Sheng" class="input_bk_D2D2D2" id="Sheng" onChange="SelChgSchool('School' , document.all.Sheng.options[document.all.Sheng.selectedIndex].value , arrSheng , arrSchool , 'Zhuanye');">
                              </select>
                                                <select name="School" class="input_bk_D2D2D2" id="School" onChange="SelChgZhuanye('Zhuanye' , document.all.School.options[document.all.School.selectedIndex].value , arrSchool , arrZhuanye);">
                                                </select>
                                                 <select name="Zhuanye" class="input_bk_D2D2D2" id="Zhuanye">
                                                </select>
                    
<script language="javascript">
    InitSchool("Sheng" , "School" , "Zhuanye" , arrSheng , arrSchool , arrZhuanye , "<%=sheng%>" , "<%=school%>" , "<%=zhuanye%>")
</script>    </td>
                     
                           
                          <td width="23%"><input type="image" name="imageField" src="Images/Search_t_02.jpg" /></td>
                        </tr>
                    </table>
                </form>                </td>
                <td width="5" background="Images/Ind_News_04.jpg"></td>
            </tr>
            <tr>
                <td width="5" height="5"><img src="Images/Ind_News_07.jpg" width="5" height="5" /></td>
                <td width="638" height="5" background="Images/Ind_News_06.jpg"></td>
                <td width="5" height="5"><img src="Images/Ind_News_05.jpg" width="5" height="5" /></td>
            </tr>
        </table>
<%
End If
%>
    <table width="95%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="5"></td>
              </tr>
        </table>
            <table cellspacing="0" cellpadding="0" width="98%" border="0" bgColor=#BBFD97>
              <tbody>
                <tr>
                  <td width="3"></td>
                  <td style="PADDING-LEFT: 5px; PADDING-TOP: 2px"
                            valign="bottom"><table cellspacing="0" cellpadding="0" width="100%"
                              border="0">
                      <tbody>
                        <tr>
                          <td
                                style="BORDER-TOP:#33CC33 1px solid; BORDER-LEFT:#33CC33 1px solid"
                                align="middle" width="65" bgcolor="#ffffff"
                                height="22"><div align="center"><strong><font color="#f16100">团队活动</font></strong></div></td>
                          <td>&nbsp;</td>
                        </tr>
                      </tbody>
                  </table></td>
                  <td width="3"></td>
                </tr>
              </tbody>
            </table>
            
<form id="ListForm" name="ListForm" method="post" action="" style="margin:0">
<%
dim a,htmlout,ChkBadWords
set rs=Server.CreateObject("ADODB.recordset")
Rs.Open "select * from love_club order by px desc",conn,1,1
IF  rs.BOF=true and rs.EOF =true THEN      
   RESPONSE.Write"<BR><BR>   暂无内容  <br>"      
ELSE
%>
   <table height="17" border=0 align=center cellpadding=5 cellspacing=1>
        <tr>
    <%
  Dim rs0,disp,Dcomid
     for a=0 to (rs.RecordCount-1) %>
          <%If a mod 3 = 0 Then
               set rs0=Server.CreateObject("ADODB.recordset")
                disp="teacher.asp"
             rs0.open"select * from CompanyTb1 where username='"&rs("manage")&"'",conn,1,1
            if not rs0.eof then                        
                 Dcomid=RS0("comid")
            end if                          
                 rs0.close
            set rs0=nothing
          %>      
         
         
        </tr>
        <tr align="center">
          <td> <table width="235" height="234" border="0" cellpadding="0" cellspacing="0" style="border:#FFAEC8 1px solid;">
              <tr>
                <td height="33" align="center" background="images/06/club_4.gif" bgcolor="F2F2F4" style="border-bottom:#CDD0DE 1px dotted;letter-spacing:2;padding-top:6px;"><b><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><font color="FF5494" size="4"><%=rs("title")%></font></a></b><br>
                <font color=#666666 ><%=rs("sheng")%>-<%=rs("School")%></font> </td>
              </tr>
              <tr>
                <td height="187" ><table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
                  <tr>
                    <td height="39" style="line-height:140%;color:#FF79AE;padding-top:7px;"> <%=left(rs("content"),50)%></td>
                  </tr>
                  <tr>
                    <td align="center" style="border-bottom:#CDD0DE 1px dotted;padding-bottom:5px;"><a href="Club_Main_Apply.asp?ClubClass=<%=rs("id")%>"><img src="images/club_1.gif" width="69" height="21" hspace="8" vspace="1" border="0" /></a><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><img src="images/club_2.gif" width="69" height="21" hspace="8" vspace="1" border="0" /></a></td>
                  </tr>
                  <tr>
                    <td style="padding-top:8px;"><font color="6269A8">领 队:</font><b><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage")%></font></a></b><br />
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage2")%></font></a> <br />
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage3")%></font></a> <br />
                        <font color="6269A8">成员数:</font><font color="#FF0000">
                          <%
                        dim rs2
                     set rs2=conn.execute("select count(id) from love_clubuser where bigkind='"&rs("id")&"'")
                     response.write rs2(0)
                     rs2.close%>
                          <font color="6269A8">人 共举办过</font><font color="#FF0000">
                            <%
                     set rs2=conn.execute("select count(id) from love_club_main where flag>0 and bigkind="&rs("id")&"")
                     response.write rs2(0)
                     rs2.close
                     %>
                          </font><font color="6269A8">次活动</font> </font></td>
                  </tr>
                  <tr>
                    <td height="25"><%
                        dim rshd
set rshd=Server.CreateObject("ADODB.recordset")
rshd.open "select top 1 * from love_club_main where flag=1 and bigkind="&rs("id")&" order by id desc",conn,1,1
If  rshd.BOF=true and rshd.EOF =true Then      
   Response.Write"<font color=999999>本团队暂无活动</font>"      
Else
%>
                        <img src="images/new.gif" width="31" height="16" align="absmiddle" /><a href=Club_hd.asp?Classid=<%=rshd("id")%>&ClubClass=<%=rs("id")%>&PartyTitle=<%=rs("title")%> target="_blank"><b><font color="red"><%=rshd("title")%></font></b></a>
                      <%
End if
rshd.close
%>                    </td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          <%Else%>
          <td> <table width="235" height="220" border="0" cellpadding="0" cellspacing="0" style="border:#FFAEC8 1px solid;">
              <tr>
                <td height="33" align="center" background="images/06/club_4.gif" bgcolor="F2F2F4" style="border-bottom:#CDD0DE 1px dotted;letter-spacing:2;padding-top:6px;"><b><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><font color="FF5494" size="4"><%=rs("title")%></font></a></b><br>
                <font color=#666666 ><%=rs("sheng")%>-<%=rs("School")%></font> </td>
              </tr>
              <tr>
                <td height="86" > <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
                    <tr>
                      <td height="40" style="line-height:140%;color:#FF79AE;padding-top:7px;"> <%=left(rs("content"),50)%></td>
                    </tr>
                    <tr>
                      <td align="center" style="border-bottom:#CDD0DE 1px dotted;padding-bottom:5px;"><a href="Club_Main_Apply.asp?ClubClass=<%=rs("id")%>"><img src="images/club_1.gif" width="69" height="21" hspace="8" vspace="1" border="0"></a><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><img src="images/club_2.gif" width="69" height="21" hspace="8" vspace="1" border="0"></a></td>
                    </tr>
                    <tr>
                      <td style="padding-top:8px;"><font color="6269A8">领 队:</font><b><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage")%></font></a></b><br>
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage2")%></font></a>
                        <br> <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage3")%></font></a>
                        <br>
                        <font color="6269A8">会员数:</font><font color="#FF0000"><%
                     set rs2=conn.execute("select count(id) from love_clubuser where bigkind='"&rs("id")&"'")
                     response.write rs2(0)
                     rs2.close
                     %><font color="6269A8">人 共举办过</font><font color="#FF0000"><%
                     set rs2=conn.execute("select count(id) from love_club_main where flag>0 and bigkind="&rs("id")&"")
                     response.write rs2(0)
                     rs2.close
                     set rs2=nothing%></font><font color="6269A8">次活动</font> </font></td>
                    </tr>
                    <tr>
                      <td height="25">
                        <%
set rshd=Server.CreateObject("ADODB.recordset")
rshd.open "select top 1 * from love_club_main where flag=1 and bigkind="&rs("id")&" order by id desc",conn,1,1
If  rshd.BOF=true and rshd.EOF =true Then      
   Response.Write"<font color=999999>本团队暂无活动</font>"      
Else
%>
                        <img src="images/new.gif" width="31" height="16" align="absmiddle"><a href=Club_hd.asp?Classid=<%=rshd("id")%>&Clubclass=<%=rs("id")%>&PartyTitle=<%=rs("title")%> target="_blank"><b><font color="red"><%=rshd("title")%></font></b></a>
                        <%
End if
rshd.close
%>
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
          <%End If%>
          <%
rs.movenext                                                   
if rs.eof then exit for                                                   
next
%>
        </tr>
      </table>
      <%
End If
rs.close:set rs=nothing%><br>
</form>
</tr>
</table>


<%
Qsite.Bottom()
%>
</body>
</html>
搜索更多相关主题的帖子: 搜索 include sheng 
2011-10-04 21:18
scilent
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
帖 子:285
专家分:1399
注 册:2011-8-9
收藏
得分:40 
  <!--#include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<!--#include file="Comm/Function.asp" -->
<!--#include file="Comm/Company_Class.asp" -->
<%
If Request.Form <> "" Then  是不是应该改为等号
    Response.Redirect("club.asp?sheng="& Request.Form("sheng") & "&school=" & Request.Form("school") & "&zhuanye=" & Request.Form("zhuanye"))
    Response.End()
End If

Dim strMenu,PageTitle,rs
strMenu = "首页"
PagePath = ""

Set Qsite = New Site_Class

Qsite.SiteConfig()
Qsite.GotoErrPage()

PageTitle = Qsite.SiteName & " - 团队活动"
Qsite.arrMember = Qsite.Member_Info()
Set Rs = server.CreateObject("ADODB.recordset")

Dim school,zhuanye
sheng = Qsite.chgStr(Trim(Request.QueryString("sheng")))
school = Qsite.chgStr(Trim(Request.QueryString("school")))
zhuanye = Qsite.chgStr(Trim(Request.QueryString("zhuanye")))


If Qsite.arrMember(5 , Session("MemberType")) = "1" Then

    If sheng <> "" Then
        Sql = "sheng = '"& sheng &"' "
    End If
    If school <> "" Then
        Sql ="school = '"& school &"' "
    End If
    If zhuanye <> "" And zhuanye <> "不限" Then
        Sql = "zhuanye = '"& zhuanye &"' or zhuanye = '不限'"
    End If
   

End If

sql="select * from love_club order by px"
Rs.Open sql,conn,1,1

FileName = "club.asp?sheng="& sheng & "&school=" & school & "&zhuanye=" & zhuanye

%>
<title><%=PageTitle%></title>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<!--#include file="top.asp"-->
<script language="javascript" src="Comm/School_All.js"></script>
<script language="javascript" src="Comm/School_Function.js"></script>

<table width="966" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E2FFDD" style="BORDER-TOP:#33CC33 1px solid;BORDER-RIGHT:#33CC33 1px solid; BORDER-LEFT:#33CC33 1px solid; BORDER-BOTTOM:#33CC33 1px solid">
  <tr>
      <td align="center" valign="top" >
    <%
If Qsite.arrMember(5 , Session("MemberType")) = "1" Then
%>
        <table width="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E2FFDD">
            <tr>
                <td width="5" height="5"><img src="Images/Ind_News_01.jpg" width="5" height="5" /></td>
                <td width="638" height="5" background="Images/Ind_News_02.jpg"></td>
                <td width="5" height="5"><img src="Images/Ind_News_03.jpg" width="5" height="5" /></td>
            </tr>
            <tr>
                <td width="5" background="Images/Ind_News_08.jpg"></td>
                <td width="638" height="27"><form id="SearchForm" name="SearchForm" method="post" action="club.asp" style="margin:0">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="18%" rowspan="2"><img src="Images/Search_t_05.jpg" width="96" height="26" /></td>
                            <td height="30" colspan="2">
                                 <select name="Sheng" class="input_bk_D2D2D2" id="Sheng" onChange="SelChgSchool('School' , document.all.Sheng.options[document.all.Sheng.selectedIndex].value , arrSheng , arrSchool , 'Zhuanye');">
                              </select>
                                                <select name="School" class="input_bk_D2D2D2" id="School" onChange="SelChgZhuanye('Zhuanye' , document.all.School.options[document.all.School.selectedIndex].value , arrSchool , arrZhuanye);">
                                                </select>
                                                 <select name="Zhuanye" class="input_bk_D2D2D2" id="Zhuanye">
                                                </select>
                    
<script language="javascript">
    InitSchool("Sheng" , "School" , "Zhuanye" , arrSheng , arrSchool , arrZhuanye , "<%=sheng%>" , "<%=school%>" , "<%=zhuanye%>")
</script>    </td>
                     
                           
                          <td width="23%"><input type="image" name="imageField" src="Images/Search_t_02.jpg" /></td>
                        </tr>
                    </table>
                </form>                </td>
                <td width="5" background="Images/Ind_News_04.jpg"></td>
            </tr>
            <tr>
                <td width="5" height="5"><img src="Images/Ind_News_07.jpg" width="5" height="5" /></td>
                <td width="638" height="5" background="Images/Ind_News_06.jpg"></td>
                <td width="5" height="5"><img src="Images/Ind_News_05.jpg" width="5" height="5" /></td>
            </tr>
        </table>
<%
End If
%>
    <table width="95%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="5"></td>
              </tr>
        </table>
            <table cellspacing="0" cellpadding="0" width="98%" border="0" bgColor=#BBFD97>
              <tbody>
                <tr>
                  <td width="3"></td>
                  <td style="PADDING-LEFT: 5px; PADDING-TOP: 2px"
                            valign="bottom"><table cellspacing="0" cellpadding="0" width="100%"
                              border="0">
                      <tbody>
                        <tr>
                          <td
                                style="BORDER-TOP:#33CC33 1px solid; BORDER-LEFT:#33CC33 1px solid"
                                align="middle" width="65" bgcolor="#ffffff"
                                height="22"><div align="center"><strong><font color="#f16100">团队活动</font></strong></div></td>
                          <td>&nbsp;</td>
                        </tr>
                      </tbody>
                  </table></td>
                  <td width="3"></td>
                </tr>
              </tbody>
            </table>
            
<form id="ListForm" name="ListForm" method="post" action="" style="margin:0">
<%
dim a,htmlout,ChkBadWords
set rs=Server.CreateObject("ADODB.recordset")
Rs.Open "select * from love_club order by px desc",conn,1,1
IF  rs.BOF=true and rs.EOF =true THEN      
   RESPONSE.Write"<BR><BR>   暂无内容  <br>"      
ELSE
%>
   <table height="17" border=0 align=center cellpadding=5 cellspacing=1>
        <tr>
    <%
  Dim rs0,disp,Dcomid
     for a=0 to (rs.RecordCount-1) %>
          <%If a mod 3 = 0 Then
               set rs0=Server.CreateObject("ADODB.recordset")
                disp="teacher.asp"
             rs0.open"select * from CompanyTb1 where username='"&rs("manage")&"'",conn,1,1
            if not rs0.eof then                        
                 Dcomid=RS0("comid")
            end if                          
                 rs0.close
            set rs0=nothing
          %>      
         
         
        </tr>
        <tr align="center">
          <td> <table width="235" height="234" border="0" cellpadding="0" cellspacing="0" style="border:#FFAEC8 1px solid;">
              <tr>
                <td height="33" align="center" background="images/06/club_4.gif" bgcolor="F2F2F4" style="border-bottom:#CDD0DE 1px dotted;letter-spacing:2;padding-top:6px;"><b><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><font color="FF5494" size="4"><%=rs("title")%></font></a></b><br>
                <font color=#666666 ><%=rs("sheng")%>-<%=rs("School")%></font> </td>
              </tr>
              <tr>
                <td height="187" ><table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
                  <tr>
                    <td height="39" style="line-height:140%;color:#FF79AE;padding-top:7px;"> <%=left(rs("content"),50)%></td>
                  </tr>
                  <tr>
                    <td align="center" style="border-bottom:#CDD0DE 1px dotted;padding-bottom:5px;"><a href="Club_Main_Apply.asp?ClubClass=<%=rs("id")%>"><img src="images/club_1.gif" width="69" height="21" hspace="8" vspace="1" border="0" /></a><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><img src="images/club_2.gif" width="69" height="21" hspace="8" vspace="1" border="0" /></a></td>
                  </tr>
                  <tr>
                    <td style="padding-top:8px;"><font color="6269A8">领 队:</font><b><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage")%></font></a></b><br />
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage2")%></font></a> <br />
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage3")%></font></a> <br />
                        <font color="6269A8">成员数:</font><font color="#FF0000">
                          <%
                        dim rs2
                     set rs2=conn.execute("select count(id) from love_clubuser where bigkind='"&rs("id")&"'")
                     response.write rs2(0)
                     rs2.close%>
                          <font color="6269A8">人 共举办过</font><font color="#FF0000">
                            <%
                     set rs2=conn.execute("select count(id) from love_club_main where flag>0 and bigkind="&rs("id")&"")
                     response.write rs2(0)
                     rs2.close
                     %>
                          </font><font color="6269A8">次活动</font> </font></td>
                  </tr>
                  <tr>
                    <td height="25"><%
                        dim rshd
set rshd=Server.CreateObject("ADODB.recordset")
rshd.open "select top 1 * from love_club_main where flag=1 and bigkind="&rs("id")&" order by id desc",conn,1,1
If  rshd.BOF=true and rshd.EOF =true Then      
   Response.Write"<font color=999999>本团队暂无活动</font>"      
Else
%>
                        <img src="images/new.gif" width="31" height="16" align="absmiddle" /><a href=Club_hd.asp?Classid=<%=rshd("id")%>&ClubClass=<%=rs("id")%>&PartyTitle=<%=rs("title")%> target="_blank"><b><font color="red"><%=rshd("title")%></font></b></a>
                      <%
End if
rshd.close
%>                    </td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          <%Else%>
          <td> <table width="235" height="220" border="0" cellpadding="0" cellspacing="0" style="border:#FFAEC8 1px solid;">
              <tr>
                <td height="33" align="center" background="images/06/club_4.gif" bgcolor="F2F2F4" style="border-bottom:#CDD0DE 1px dotted;letter-spacing:2;padding-top:6px;"><b><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><font color="FF5494" size="4"><%=rs("title")%></font></a></b><br>
                <font color=#666666 ><%=rs("sheng")%>-<%=rs("School")%></font> </td>
              </tr>
              <tr>
                <td height="86" > <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
                    <tr>
                      <td height="40" style="line-height:140%;color:#FF79AE;padding-top:7px;"> <%=left(rs("content"),50)%></td>
                    </tr>
                    <tr>
                      <td align="center" style="border-bottom:#CDD0DE 1px dotted;padding-bottom:5px;"><a href="Club_Main_Apply.asp?ClubClass=<%=rs("id")%>"><img src="images/club_1.gif" width="69" height="21" hspace="8" vspace="1" border="0"></a><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><img src="images/club_2.gif" width="69" height="21" hspace="8" vspace="1" border="0"></a></td>
                    </tr>
                    <tr>
                      <td style="padding-top:8px;"><font color="6269A8">领 队:</font><b><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage")%></font></a></b><br>
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage2")%></font></a>
                        <br> <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage3")%></font></a>
                        <br>
                        <font color="6269A8">会员数:</font><font color="#FF0000"><%
                     set rs2=conn.execute("select count(id) from love_clubuser where bigkind='"&rs("id")&"'")
                     response.write rs2(0)
                     rs2.close
                     %><font color="6269A8">人 共举办过</font><font color="#FF0000"><%
                     set rs2=conn.execute("select count(id) from love_club_main where flag>0 and bigkind="&rs("id")&"")
                     response.write rs2(0)
                     rs2.close
                     set rs2=nothing%></font><font color="6269A8">次活动</font> </font></td>
                    </tr>
                    <tr>
                      <td height="25">
                        <%
set rshd=Server.CreateObject("ADODB.recordset")
rshd.open "select top 1 * from love_club_main where flag=1 and bigkind="&rs("id")&" order by id desc",conn,1,1
If  rshd.BOF=true and rshd.EOF =true Then      
   Response.Write"<font color=999999>本团队暂无活动</font>"      
Else
%>
                        <img src="images/new.gif" width="31" height="16" align="absmiddle"><a href=Club_hd.asp?Classid=<%=rshd("id")%>&Clubclass=<%=rs("id")%>&PartyTitle=<%=rs("title")%> target="_blank"><b><font color="red"><%=rshd("title")%></font></b></a>
                        <%
End if
rshd.close
%>
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
          <%End If%>
          <%
rs.movenext                                                   
if rs.eof then exit for                                                   
next
%>
        </tr>
      </table>
      <%
End If
rs.close:set rs=nothing%><br>
</form>
</tr>
</table>


<%
Qsite.Bottom()
%>
</body>
</html>

在没有路的地方走一条路,让别人有路可走
2011-10-05 08:24
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
收藏
得分:0 
我这样改,就可以了,但我又想加入分行功能,每行3个,每页4行。
但目前是每行1个,不会换行,请教。。。。

<!--#include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<!--#include file="Comm/Function.asp" -->
<!--#include file="Comm/Company_Class.asp" -->
<%
If Request.Form <> "" Then
    Response.Redirect("club.asp?sheng="& Request.Form("sheng") & "&school=" & Request.Form("school") & "&zhuanye=" & Request.Form("zhuanye"))
    Response.End()
End If

Dim strMenu,PageTitle,rs
strMenu = "首页"
PagePath = ""

Set Qsite = New Site_Class

Qsite.SiteConfig()
Qsite.GotoErrPage()

PageTitle = Qsite.SiteName & " - 团队活动"
Qsite.arrMember = Qsite.Member_Info()
Set Rs = server.CreateObject("ADODB.recordset")

Dim school,zhuanye
sheng = Qsite.chgStr(Trim(Request.QueryString("sheng")))
school = Qsite.chgStr(Trim(Request.QueryString("school")))
zhuanye = Qsite.chgStr(Trim(Request.QueryString("zhuanye")))

Sql = "px = '0' "

If Qsite.arrMember(5 , Session("MemberType")) = "1" Then

    If sheng <> "" Then
        Sql = Sql & " and sheng = '"& sheng &"' "
    End If
    If school <> "" Then
        Sql = Sql & " and school = '"& school &"' "
    End If
    If zhuanye <> "" And zhuanye <> "不限" Then
        Sql = Sql & " and (zhuanye = '"& zhuanye &"' or zhuanye = '不限') "
    End If

End If

Sql = "select * from love_club where "& Sql &" order by px desc"

FileName = "club.asp?sheng="& sheng & "&school=" & school & "&zhuanye=" & zhuanye

%>
<title><%=PageTitle%></title>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<!--#include file="top.asp"-->
<script language="javascript" src="Comm/School_All.js"></script>
<script language="javascript" src="Comm/School_Function.js"></script>
<script language="javascript">
    function selAll()
    {
        var selobj = document.getElementsByName("ComId");
        for(var i = 0; i < selobj.length; i++)
        {
            selobj[i].checked = true;
        }
    }
   
    function removeAll()
    {
        var selobj = document.getElementsByName("ComId");
        for(var i = 0; i < selobj.length; i++)
        {
            selobj[i].checked = false;
        }
    }
   
    function onclicksel()
    {
        var chkobj = document.all("SelAllComId");
        if(chkobj.checked == true)
        {
            selAll();
        }
        else
        {
            removeAll();
        }
    }
   
    function GotoPage()
    {
        var Fn = ListForm.FileName.value;
        var Cp = ListForm.CurPage.value;
        location.href = Fn + "&page=" + Cp;
    }
</script>

<table width="966" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E2FFDD" style="BORDER-TOP:#33CC33 1px solid;BORDER-RIGHT:#33CC33 1px solid; BORDER-LEFT:#33CC33 1px solid; BORDER-BOTTOM:#33CC33 1px solid">
  <tr>
   <td width="225" align="center" valign="top"><!--#include file="dl.asp" --><br><script language="javascript" src="Ad/per_01.asp"></script></td>
    <td align="center" valign="top" >
    <%
If Qsite.arrMember(5 , Session("MemberType")) = "1" Then
%>
        <table width="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E2FFDD">
            <tr>
                <td width="5" height="5"><img src="Images/Ind_News_01.jpg" width="5" height="5" /></td>
                <td width="638" height="5" background="Images/Ind_News_02.jpg"></td>
                <td width="5" height="5"><img src="Images/Ind_News_03.jpg" width="5" height="5" /></td>
            </tr>
            <tr>
                <td width="5" background="Images/Ind_News_08.jpg"></td>
                <td width="638" height="27"><form id="SearchForm" name="SearchForm" method="post" action="club.asp" style="margin:0">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="18%" rowspan="2"><img src="Images/Search_t_05.jpg" width="96" height="26" /></td>
                            <td height="30" colspan="2">
                                 <select name="Sheng" class="input_bk_D2D2D2" id="Sheng" onChange="SelChgSchool('School' , document.all.Sheng.options[document.all.Sheng.selectedIndex].value , arrSheng , arrSchool , 'Zhuanye');">
                              </select>
                                                <select name="School" class="input_bk_D2D2D2" id="School" onChange="SelChgZhuanye('Zhuanye' , document.all.School.options[document.all.School.selectedIndex].value , arrSchool , arrZhuanye);">
                                                </select>
                                                 <select name="Zhuanye" class="input_bk_D2D2D2" id="Zhuanye">
                                                </select>
                    
<script language="javascript">
    InitSchool("Sheng" , "School" , "Zhuanye" , arrSheng , arrSchool , arrZhuanye , "<%=sheng%>" , "<%=school%>" , "<%=zhuanye%>")
</script>    </td>
                     
                           
                          <td width="23%"><input type="image" name="imageField" src="Images/Search_t_02.jpg" /></td>
                        </tr>
                    </table>
                </form>                </td>
                <td width="5" background="Images/Ind_News_04.jpg"></td>
            </tr>
            <tr>
                <td width="5" height="5"><img src="Images/Ind_News_07.jpg" width="5" height="5" /></td>
                <td width="638" height="5" background="Images/Ind_News_06.jpg"></td>
                <td width="5" height="5"><img src="Images/Ind_News_05.jpg" width="5" height="5" /></td>
            </tr>
        </table>
<%
End If
%>
    <table width="95%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="5"></td>
              </tr>
        </table>
            <table cellspacing="0" cellpadding="0" width="98%" border="0" bgColor=#BBFD97>
              <tbody>
                <tr>
                  <td width="3"></td>
                  <td style="PADDING-LEFT: 5px; PADDING-TOP: 2px"
                            valign="bottom"><table cellspacing="0" cellpadding="0" width="100%"
                              border="0">
                      <tbody>
                        <tr>
                          <td
                                style="BORDER-TOP:#33CC33 1px solid; BORDER-LEFT:#33CC33 1px solid"
                                align="middle" width="65" bgcolor="#ffffff"
                                height="22"><div align="center"><strong><font color="#f16100">团队活动</font></strong></div></td>
                          <td>&nbsp;</td>
                        </tr>
                      </tbody>
                  </table></td>
                  <td width="3"></td>
                </tr>
              </tbody>
            </table>
            
<form id="ListForm" name="ListForm" method="post" action="" style="margin:0">
<%
Rs.Open Sql , Conn , 1 , 1
Dim rs0,disp,Dcomid
dim a,htmlout,ChkBadWords
If Rs.Eof Then
RESPONSE.Write"<BR><BR>   暂时还没有团队信息...  <br>"
%>

<%
Else
    Rs.PageSize = 12
    CurrentPage = Clng(Request("page"))
    If CurrentPage < 1 Then CurrentPage = 1
    If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
    Rs.AbsolutePage = CurrentPage
    i = 0
    tdcss = "td_line_col_FFFFFF"
    Do While Not Rs.Eof
   
%>

   <table height="17" border=0 align=center cellpadding=5 cellspacing=1>
        <tr>

          <%
               set rs0=Server.CreateObject("ADODB.recordset")
                disp="teacher.asp"
             rs0.open"select * from CompanyTb1 where username='"&rs("manage")&"'",conn,1,1
            if not rs0.eof then                        
                 Dcomid=RS0("comid")
            end if                          
                 rs0.close
            set rs0=nothing
          %>      
         
         
        </tr>
        <tr align="center">
          <td> <table width="235" height="234" border="0" cellpadding="0" cellspacing="0" style="border:#FFAEC8 1px solid;">
              <tr>
                <td height="33" align="center" background="images/06/club_4.gif" bgcolor="F2F2F4" style="border-bottom:#CDD0DE 1px dotted;letter-spacing:2;padding-top:6px;"><b><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><font color="FF5494" size="4"><%=rs("title")%></font></a></b><br>
                <font color=#666666 ><%=rs("sheng")%>-<%=rs("School")%></font> </td>
              </tr>
              <tr>
                <td height="187" ><table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
                  <tr>
                    <td height="39" style="line-height:140%;color:#FF79AE;padding-top:7px;"> <%=left(rs("content"),50)%></td>
                  </tr>
                  <tr>
                    <td align="center" style="border-bottom:#CDD0DE 1px dotted;padding-bottom:5px;"><a href="Club_Main_Apply.asp?ClubClass=<%=rs("id")%>"><img src="images/club_1.gif" width="69" height="21" hspace="8" vspace="1" border="0" /></a><a href="Club_Main.asp?clubclass=<%=rs("id")%>" target="_blank"><img src="images/club_2.gif" width="69" height="21" hspace="8" vspace="1" border="0" /></a></td>
                  </tr>
                  <tr>
                    <td style="padding-top:8px;"><font color="6269A8">领 队:</font><b><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage")%></font></a></b><br />
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage2")%></font></a> <br />
                        <font color="6269A8">副领队:</font><a href="../<%=disp%>?ComId=<%=DComId%>" target="_blank"><font color=#666666 ><%=rs("manage3")%></font></a> <br />
                        <font color="6269A8">成员数:</font><font color="#FF0000">
                          <%
                        dim rs2
                     set rs2=conn.execute("select count(id) from love_clubuser where bigkind='"&rs("id")&"'")
                     response.write rs2(0)
                     rs2.close%>
                          <font color="6269A8">人 共举办过</font><font color="#FF0000">
                            <%
                     set rs2=conn.execute("select count(id) from love_club_main where flag>0 and bigkind="&rs("id")&"")
                     response.write rs2(0)
                     rs2.close
                     %>
                          </font><font color="6269A8">次活动</font> </font></td>
                  </tr>
                  <tr>
                    <td height="25"><%
                        dim rshd
set rshd=Server.CreateObject("ADODB.recordset")
rshd.open "select top 1 * from love_club_main where flag=1 and bigkind="&rs("id")&" order by id desc",conn,1,1
If  rshd.BOF=true and rshd.EOF =true Then      
   Response.Write"<font color=999999>本团队暂无活动</font>"      
Else
%>
                        <img src="images/new.gif" width="31" height="16" align="absmiddle" /><a href=Club_hd.asp?Classid=<%=rshd("id")%>&ClubClass=<%=rs("id")%>&PartyTitle=<%=rs("title")%> target="_blank"><b><font color="red"><%=rshd("title")%></font></b></a>
                      <%
End if
rshd.close
%>                    </td>
                  </tr>
                </table></td>
              </tr>
            </table></td>

        </tr>
<%
    i = i + 1
    If i Mod 3 = 0 Then Response.Write("</tr></tr>")
    Rs.MoveNext
    If i >= Rs.PageSize Then Exit Do
    If i Mod 3 = 0 Then
        tdcss = "td_line_col_FFFFFF"
    Else
        tdcss = "td_line_col_FBFBFB"
    End If
    Loop
%>
      </table>

            <tr>
                <td height="35" colspan="9" align="right">
                <%
                Qsite.Page_Cn CurrentPage , Rs.PageCount , Rs.RecordCount , FileName
                %>
                 &nbsp;转到
                    <input name="CurPage" type="text" class="input_bk_D2D2D2" id="CurPage" value="<%=CurrentPage%>" size="4" />
                    
                    <input name="GoPage" type="button" class="input_bk_D2D2D2" value="跳转" onClick="javascript:GotoPage();" />
                    <input name="FileName" type="hidden" id="FileName" value="<%=FileName%>" /></td>
              </tr>

      <%
         End If
         Rs.Close
       %><br>

</form>
</tr>
</table>


<%
Qsite.Bottom()
%>
</body>
</html>
2011-10-05 13:57
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
收藏
得分:0 
目前的程序是可以分页,但是每行显示一个,每页12行,就是竖排的。
我期待的是每行3个,每页4行,共12个显示在同一页。

请大家帮帮忙看看要改哪里的?我改来改去都不行。谢谢大家啦!!!
2011-10-05 17:17
快速回复:ASP页面搜索功能失效,请帮我看看
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024620 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved