大虾!请教!

阿土sap 2003-08-23 09:44:14
http://cnbook.ckxp.net/Class.asp
这个页面的分页样式!
我有两个表格来做,将maxperpager设成14
有7行,并且显示不正常,显示的商品数比实际的要多出好多!并且当数据库中为单数时,也会出现问题!
有搞了好久,也没有方法!
希望可以将中间的代码给出来!
不胜感激!
等待中!!!
在这先谢了!
...全文
41 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
阿土sap 2003-08-23
  • 打赏
  • 举报
回复
可以在线上聊一聊吗!
QQ:25131353
Jaron 2003-08-23
  • 打赏
  • 举报
回复
偶以前写,里面有你要的东西,修改一下就好了。
Jaron 2003-08-23
  • 打赏
  • 举报
回复
function cms_picture_show(byval sortid,line_cols,line_coms,is_default_size,width,height,display_title,max_length,currentpage)
' by jaron , 2003-06-16
'分类_是否为默认大小_宽_高_显示标题_标题长度
Set Rs=Server.CreateObject("ADODB.Recordset")
' sql = "sp_sitemanager_picture_show " & sortid
if line_coms=0 then line_coms=1
if line_cols=0 then line_cols=1
maxrecords = line_cols*line_coms
if sortid>0 then
sql = "SELECT top " & maxrecords & " tblArticles.id,tblArticles.news_title,tblArticles.title_color,tblArticles.images,tblArticles.img_width,tblArticles.img_height,tblArticles.date_time,tblArticles.class_id,tblCategory.PHYSICAL_PATH,tblArticles.news_content FROM tblArticles LEFT OUTER JOIN tblCategory ON tblArticles.class_id = tblCategory.class_id where images<>'' and tblArticles.admincheck=1 and tblArticles.class_id=" & sortid & " order by id desc"
else
sql = "SELECT top " & maxrecords & " tblArticles.id,tblArticles.news_title,tblArticles.title_color,tblArticles.images,tblArticles.img_width,tblArticles.img_height,tblArticles.date_time,tblArticles.class_id,tblCategory.PHYSICAL_PATH,tblArticles.news_content FROM tblArticles LEFT OUTER JOIN tblCategory ON tblArticles.class_id = tblCategory.class_id where images<>'' and tblArticles.admincheck=1 order by id desc"
end if
if is_default_size=0 then picture_size = "width=" & height & " height=" & height & "" else picture_size = ""
table_start = "<table width=""98%"" border=""0"" align=""center"" cellPadding=""0"" cellSpacing=""0"">"
rs.Open sql,Conn,1,1
i=0
TotalPages = rs.PageCount
rs.PageSize = 5 * line_cols
rs.AbsolutePage = currentpage
Do While Not rs.EOF and i<rs.pagesize
if i mod line_cols = 0 then table_data = table_data & "<tr>"
LINK_URL = getHTMLFileName(rs(6),rs(0),rs(7),rs(8))
table_data = table_data & "<td width= height= align=middle title=><a href=" & LINK_URL & "><img border=0 " & picture_size & " src="&rs(3)&"></a><br>"&rs(1)&"</td><td width=5> </td>"
'if i mod line_cols then response.Write "</tr>"
i = i + 1
rs.movenext
loop
rs.close
set rs=nothing
table_end = "</tr></table>"
cms_picture_show = table_start & table_data & table_end
end function

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧