解决ASPCMS首页调用留言排序问题

9月 12, 2013 0 条评论 1.68k 次阅读 0 人点赞

默认aspcms首页调用留言(不是评论哦)是无法进行排序,它是按照ID的顺序排序的,不是显示最新的留言信息。要改成倒叙排列,不然这列表意义也不是很大的了。修改方法如下:

找到文件\inc\AspCms_MainClass.asp,找到如下代码:

elseif str="gbook" then
if SwitchFaqStatus=0 then
sql="select FaqID,FaqTitle,Contact,ContactWay,Content,Reply,AddTime,ReplyTime,
FaqStatus,AuditStatus from AspCms_GuestBook order by AddTime"
else
sql="select FaqID,FaqTitle,Contact,ContactWay,Content,Reply,AddTime,ReplyTime,
FaqStatus,AuditStatus from AspCms_GuestBook where FaqStatus order by AddTime"
end if

修改为

elseif str="gbook" then
if SwitchFaqStatus=0 then
sql="select FaqID,FaqTitle,Contact,ContactWay,Content,Reply,AddTime,ReplyTime,
FaqStatus,AuditStatus from AspCms_GuestBook order by AddTime desc"
else
sql="select FaqID,FaqTitle,Contact,ContactWay,Content,Reply,AddTime,ReplyTime,
FaqStatus,AuditStatus from AspCms_GuestBook where FaqStatus order by AddTime desc"
end if

孑愁

一个Microsoft、Google、Apple的爱好者综合体,喜欢一切和数码科技有关的东西,也希望能及时的把这些分享给关注它们的人。现就职于某互联网公司,担任前端

文章评论(0)