您现在的位置:首页 >> 老y讨论区 >> 站长交流 >> V3.0sp1的会员中心里的自己发表的文章不能分页
站长交流版须知:讨论网站建设经验、网站发展交流、最新IT动态等。
 程序讨论  站长交流  链接交换  商业用户区
 
楼主Time:2014/7/3 17:55:15
/aiq終ゼ攺變ぶ81731
  • 等级:Vip会员
  • 注册:2014-07-03
  • Y币:21 元
V3.0sp1的会员中心里的自己发表的文章不能分页
关键字:文章
V3.0sp1的会员中心里的自己发表的文章不能分页,我一个小站玩下,突然发现v3.0版本的这个bug,可是内容很多升级就全部重来了,这个我发表的文章很多,但是进入会员中心查看时,不能分页啊,老Y能否给个解决方案啊,万分感谢

[Top]
2 楼Time:2014/7/3 18:01:11
/aiq終ゼ攺變ぶ81731
  • 等级:Vip会员
  • 注册:2014-07-03
  • Y币:21 元
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
老y
  • 等级:管理员
  • 注册:2008-09-06
  • Y币:6816 元
RE:V3.0sp1的会员中心里的自己发表的文章不能分页
可参考新版修改
升级并不影响原有内容!

[Top]
4 楼Time:2014/7/4 15:17:01
/aiq終ゼ攺變ぶ81731
  • 等级:Vip会员
  • 注册:2014-07-03
  • Y币:21 元
RE:V3.0sp1的会员中心里的自己发表的文章不能分页
搞定,谢谢

[Top]
5 楼Time:2014/7/4 15:17:32
/aiq終ゼ攺變ぶ81731
  • 等级:Vip会员
  • 注册:2014-07-03
  • Y币:21 元
RE:V3.0sp1的会员中心里的自己发表的文章不能分页
我稍作改版了,如果覆盖的话之前就白费了

[Top]

 
  标题:  
内容:
  3.141.100.120

购买咨询

QQ:97065691
商业技术支持

QQ:22862559

QQ:3978698