站長交流版須知:討論網站建設經驗、網站發展交流、最新IT動態等。 |
|
![]() ![]() ![]() ![]()
|
樓主Time:2014/7/3 17:55:15 | |
![]() ![]()
|
V3.0sp1的會員中心里的自己發表的文章不能分頁
關鍵字:文章
V3.0sp1的會員中心里的自己發表的文章不能分頁,我一個小站玩下,突然發現v3.0版本的這個bug,可是內容很多升級就全部重來了,這個我發表的文章很多,但是進入會員中心查看時,不能分頁啊,老Y能否給個解決方案啊,萬分感謝
|
[Top] |
2 樓Time:2014/7/3 18:01:11 | |
![]() ![]()
|
RE:V3.0sp1的會員中心里的自己發表的文章不能分頁
<%
sub List() dim currentpage,page_count,Pcount dim totalrec,endpage currentPage=LaoYRequest(request("page")) A_Class=LaoYRequest(request("Class")) hits=LaoYRequest(request("hits")) if hits="" then hits=0 end if keyword=CheckStr(request("keyword")) if currentpage="" or not IsNumeric(currentpage) then currentpage=1 else currentpage=clng(currentpage) if err then currentpage=1 err.clear end if end if set rs = server.CreateObject ("adodb.recordset") sql="select * from "&tbname&"_Article where UserName= '"& LaoYName &"' And UserID<>0 order by id desc" rs.open sql,conn,1,1 if rs.eof and rs.bof then Response.Write("<div class=""scj_top"">我的名片") Response.Write("</div>") Response.Write("你還沒有信息推廣!") else %> <div class="scj_top">我的文章</div> <form name="myform" method="POST" action="?action=delAll" class="glzx_buju"> <table width="90%" border="1" align="center" bordercolor="#EBEBEB" cellpadding="3" cellspacing="0" bgcolor="ffffff" style="border-collapse: collapse;" class="admintable"> <tr style="font-weight:bold;"> <td height="40" align="center" class="ButtonList" style="display:none;"> </td> <td height="40" align="center" class="ButtonList">公司名稱</td> <td width="28%" height="40" align="center" class="ButtonList">發布時間</td> <td height="40" align="center" class="ButtonList">瀏覽</td> <td height="40" align="center" class="ButtonList">管理</td> </tr> <% rs.PageSize = 15 rs.AbsolutePage=currentpage page_count=0 totalrec=rs.recordcount NoI=0 while (not rs.eof) and (not page_count = rs.PageSize) NoI=NoI+1 %> <tr onMouseOver="this.style.backgroundColor='#f8f8f8';this.style.color='red'" onMouseOut="this.style.backgroundColor='';this.style.color=''"> <td width="3%" height="40" style="display:none;"><input type="checkbox" value="<%=rs("ID")%>" name="ID" onClick="unselectall(this.form)" style="border:0;" /></td> <td width="36%" height="40" align="left" style="padding:8px 0;"><%=NoI%> .<a href="<%=SitePath%><%If html=1 then Response.Write("List.asp?ID="&rs("ID")&"") else Response.Write("Html/?"&rs("ID")&".html") end if%>" target="_blank"><%=rs("Title")%></a> <%if rs("IsTop")=1 then Response.Write("<font color=red>[頂]</font>") end if%><%if rs("IsHot")=1 then Response.Write("<font color=green>[薦]</font>") end if%><%if rs("Images")<>"" then Response.Write("<font color=blue>[圖]</font>") end if%></td> <td height="40" align="center"><%=rs("DateAndTime")%></td> <td width="7%" height="40" align="center"><%=rs("Hits")%></td> <td width="26%" height="40" align="center" class="wdmp_gl"> <a href="?action=del&id=<%=rs("ID")%>" onClick="JavaScript:return confirm('確認刪除嗎?')" style="background:#CC0000;">刪除</a> <a href="?action=edit&id=<%=rs("ID")%>" style="background:#666600;">編輯</a></td> </tr> <% page_count = page_count + 1 rs.movenext wend %> <tr><td colspan="6" height="40" align="CENTER">分頁: <%Pcount=rs.PageCount if currentpage > 4 then response.write "<a href=""?page=1"">[1]</a> ..." end if if Pcount>currentpage+3 then endpage=currentpage+3 else endpage=Pcount end if dim i for i=currentpage-3 to endpage if not i<1 then if i = clng(currentpage) then response.write " <font color=red>["&i&"]</font>" else response.write " <a href=""?page="&i&""">["&i&"]</a>" end if end if next if currentpage+3 < Pcount then response.write "... <a href=""?page="&Pcount&""">["&Pcount&"]</a>" end if %> </td></tr></table> </form> |
[Top] |
3 樓Time:2014/7/3 23:04:55 | |
![]() ![]()
|
RE:V3.0sp1的會員中心里的自己發表的文章不能分頁
可參考新版修改
升級并不影響原有內容! |
[Top] |
4 樓Time:2014/7/4 15:17:01 | |
![]() ![]()
|
RE:V3.0sp1的會員中心里的自己發表的文章不能分頁
搞定,謝謝
|
[Top] |
5 樓Time:2014/7/4 15:17:32 | |
![]() ![]()
|
RE:V3.0sp1的會員中心里的自己發表的文章不能分頁
我稍作改版了,如果覆蓋的話之前就白費了
|
[Top] |