| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1000 人关注过本帖
标题:分页功能中数据竖排,如何使得每行按3个排列
取消只看楼主 加入收藏
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
结帖率:50%
收藏
已结贴  问题点数:20 回复次数:4 
分页功能中数据竖排,如何使得每行按3个排列
<!--#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
    Rs.MoveNext
    If i >= Rs.PageSize Then Exit Do
    If i Mod 2 = 0 Then
        tdcss = "td_line_col_FFFFFF"
    Else
        tdcss = "td_line_col_FBFBFB"
    End If
    Loop
%>   

            <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>
   </table>
</form>
</tr>
</table>


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

请大家帮帮忙看看要改哪里的?我改来改去都不行。谢谢大家啦!!!
2011-10-05 20:28
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
收藏
得分:0 
哎呀,最近没人来论坛吗?
2011-10-05 22:49
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
收藏
得分:0 
版主们,恳请支援哦,实在弄不好哦
2011-10-06 11:03
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
收藏
得分:0 
目前的程序是可以分页,只是每行显示一个,每页12行,就是竖排的。
我让一个一个这样的表格(table)按顺序一行三个。

恳请版主出面支援,感谢啊~~~~ ~
2011-10-06 14:07
快速回复:分页功能中数据竖排,如何使得每行按3个排列
数据加载中...
 
   



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

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