药福医药招商网 > 医药新闻
<%
ss=trim(request.QueryString("ss"))
key=trim(request.QueryString("key"))
yf_uid="yaofu"
if key<>"" then
if ss="mingch" then
yf_Where=" and tit like '%"&key&"%'"
elseif ss="" then
yf_Where=" and lei like '"&key&"'"
end if
else
yf_Where=""
end if
Set Page = new Cls_Page '创建对象
Set Page.Conn = conn '得到数据库连接对象
With Page
.PageSize = 16 '每页记录条数
.PageParm = "zslist" '页参数
'.PageIndex = 10 '当前页,可选参数,一般是生成静态时需要
.Database = "AC" '数据库类型,AC为access,MSSQL为sqlserver2000存储过程版,MYSQL为mysql,PGSQL为PostGreSql
.Pkey="ID" '主键
.Field="id,lei,tit,addtime,vip" '字段
.Table="yf_new" '表名
.Condition="uid='"&yf_uid&"' and tg=1"&yf_Where&"" '条件,不需要where
.OrderBy="vip desc,id desc" '排序,不需要order by,需要asc或者desc
' .OrderBy="id desc" '排序,不需要order by,需要asc或者desc
.RecordCount = 0 '总记录数,可以外部赋值,0不保存(适合搜索),-1存为session,-2存为cookies,-3存为applacation
.NumericJump =3 '数字上下页个数,可选参数,默认为3,负数为跳转个数,0为显示所有
'.Template = "总记录数:{$RecordCount} 总页数:{$PageCount} 每页记录数:{$PageSize} 当前页数:{$PageIndex} {$FirstPage} {$PreviousPage} {$NumericPage} {$NextPage} {$LastPage} {$InputPage} {$SelectPage}" '整体模板,可选参数,有默认值
.Template = "{$FirstPage} {$PreviousPage} {$NumericPage} {$NextPage} {$LastPage} " '整体模板,可选参数,有默认值
.FirstPage = "首页" '可选参数,有默认值
.PreviousPage = "上一页" '可选参数,有默认值
.NextPage = "下一页" '可选参数,有默认值
.LastPage = "尾页" '可选参数,有默认值
.NumericPage = " {$PageNum} " '数字分页部分模板,可选参数,有默认值
End With
rs = Page.ResultSet() '记录集
'rc = Page.RowCount() '可选,输出总记录数
nav = Page.Nav() '分页样式
Page = Null
Set Page = Nothing
If IsNull(rs) Then
%>
- 暂无信息
<%
Else
For i=0 To Ubound(Rs,2)
%>
- <%=key%><%=trim(left(rs(2,i),37))%><%=rs(3,i)%>
<%
next
end if
%>
<%Response.Write nav%>