最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442
当前位置:首页 > 编程开发 > asp教程

asp+oracle分页程序类XDOWNPAGE2.0

日期:11-02    来源:中国设计秀    作者:cnwebshow.com

先将分页类源代码发上来,随后有空会发一些实例来讲解其用法,以及如何扩展其功能。ARG中国设计秀

类原代码如下:ARG中国设计秀

< %ARG中国设计秀
'==============================================ARG中国设计秀
'XDOWNPAGE   asp版本ARG中国设计秀
'当前版本:2.0ARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'原版本   1.00ARG中国设计秀
'Code by  zykj2000ARG中国设计秀
'Email:   zykj_2000@163.netARG中国设计秀
'BBS:   http://bbs.513soft.netARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'升级版本:1.5  (asp + Oracle)ARG中国设计秀
updated by  doublelARG中国设计秀
Email:ARG中国设计秀
blog:     ttp://blog.csdn.net/doublel/ARG中国设计秀
'升级说明:ARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'升级版本:2.0 '   (asp + oracle)   ---->当前版本ARG中国设计秀
'保留原名:XDOWNPAGEARG中国设计秀
Updated by northsnow  ARG中国设计秀
'email:  northsnow@163.com ARG中国设计秀
'blog:   http://blog.csdn.net/PRecipitantARG中国设计秀
'升级说明:ARG中国设计秀
'1 , 数据查询时只查询当前页所包含的记录,大大降低了数据传输量ARG中国设计秀
'2 , 如果正常的页导航,不用每次都查询总记录数,只要第一次查询后,后来通过参数传递即可ARG中国设计秀
'3 , 支持动态更改页大小ARG中国设计秀
'4 , 支持动态排序ARG中国设计秀
'5 , 本程序只支持oracle,如果想用在sqlserver或者其他类型的数据库,请自行修改:Public Property Let GetSQL(str_sql)即可。ARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'其他程序修改者信息,请在源代码中查对!!!ARG中国设计秀
'本程序可以免费使用、修改、复制、转载、引用,希望我的程序能为您的工作带来方便ARG中国设计秀
'但请保留以上请息,特别是是原著信息。另外如果作为商业用途,请与原著和该版本升级ARG中国设计秀
'人联系以取得许可。ARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'程序特点ARG中国设计秀
'本程序主要是对数据分页的部分进行了封装,而数据显示部份完全由用户自定义,ARG中国设计秀
'支持URL多个参数ARG中国设计秀
'ARG中国设计秀
'使用说明ARG中国设计秀
'程序参数说明ARG中国设计秀
'PapgeSize      定义分页每一页的记录数ARG中国设计秀
'GetRS       返回经过分页的Recordset此属性只读ARG中国设计秀
'GetConn      得到数据库连接ARG中国设计秀
'GetSQL       得到查询语句ARG中国设计秀
'totalRecordCount   传递总记录数ARG中国设计秀

'程序方法说明ARG中国设计秀
'ShowPage      显示分页导航条,唯一的公用方法ARG中国设计秀
'ShowPageSizeChange()    显示改变页大小的列表ARG中国设计秀
'ARG中国设计秀
'例:ARG中国设计秀
'ARG中国设计秀
'   '包含文件ARG中国设计秀
'ARG中国设计秀
' Set mypage=new xdownpage   '创建对象ARG中国设计秀
' mypage.getconn=conn    '得到数据库连接ARG中国设计秀
' mypage.getsql="select * from productinfo order by id asc"ARG中国设计秀
' mypage.pagesize=5    '设置每一页的记录条数据为5条ARG中国设计秀
'mypage.totalRecordCount=rsTotalCount  设置总记录数ARG中国设计秀
' set rs=mypage.getrs()    '返回RecordsetARG中国设计秀
'mypage.GetSubmitForm="frmQuery"  ' 分页默认提交的表单,currentpage参数ARG中国设计秀
'Response.write(mypage.GetSubmitForm1())  '输出分页提交的函数ARG中国设计秀
' mypage.showpage()    '显示分页信息,这个方法可以,在set rs=mypage.getrs()以后ARG中国设计秀
'        任意位置调用,可以调用多次ARG中国设计秀
' do while not rs.eof    '接下来的操作就和操作一个普通Recordset对象一样操作ARG中国设计秀
'      response.write rs(0) & "ARG中国设计秀
'      " '这里就可以自定义显示方式了ARG中国设计秀
'      rs.movenextARG中国设计秀
' loopARG中国设计秀
'ARG中国设计秀
'添加了保存当前页面数量的提交脚本ARG中国设计秀
'函数为GetSubmitForm()ARG中国设计秀
'需要提交给函数GetSubmitForm一个表单名字ARG中国设计秀
'在这个提交的表单里面保存变量flag,currentpage,pagesize,rsTotalCount 四个参数ARG中国设计秀
'例子如下ARG中国设计秀
'flag=request("flag")ARG中国设计秀
'currentpage=request("currentpage")ARG中国设计秀
'currentpage=request("pagesize")ARG中国设计秀
'currentpage=request("rsTotalCount")ARG中国设计秀
'在提交的表单里面加入下面四个inputARG中国设计秀
'<input name="flag" type="hidden" value="< % =flag% >">ARG中国设计秀
'<input name="currentpage" type="hidden" value="< % =currentpage% >">ARG中国设计秀
'<input name="pagesize" type="hidden" value="< % =pagesize% >">ARG中国设计秀
'<input name="rsTotalCount" type="hidden" value="< % =rsTotalCount% >">ARG中国设计秀
'==============================================ARG中国设计秀

Const Btn_First="<font face=""webdings"">9</font>"  '定义第一页按钮显示样式ARG中国设计秀
Const Btn_Prev="<font face=""webdings"">3</font>"  '定义前一页按钮显示样式ARG中国设计秀
Const Btn_Next="<font face=""webdings"">4</font>"  '定义下一页按钮显示样式ARG中国设计秀
Const Btn_Last="<font face=""webdings"">:</font>"  '定义最后一页按钮显示样式ARG中国设计秀
Const XD_Align="center"     '定义分页信息对齐方式ARG中国设计秀
Const XD_Width="100%"     '定义分页信息框大小ARG中国设计秀
Const XD_Height="20"ARG中国设计秀

ARG中国设计秀
Class Xdownpage   '类 从这里开始ARG中国设计秀

'变量定义ARG中国设计秀
public  int_totalPage     '总页数ARG中国设计秀
public  int_curcount      '当前页的记录数ARG中国设计秀
public  XD_PageSize       '页大小ARG中国设计秀
Private int_curpage       '当前页号ARG中国设计秀
Private int_totalRecord   '总记录数ARG中国设计秀
Private XD_Conn           '数据库连接对象ARG中国设计秀
Private XD_Rs             '记录集对象ARG中国设计秀
Private XD_SQL            '主sql语句ARG中国设计秀
Private XD_Count_SQL      '查询总记录数的sql语句ARG中国设计秀
Private Str_errors     ARG中国设计秀
Private str_URLARG中国设计秀
Private XD_sURLARG中国设计秀
Private SubmitForm        '所需的查询表单名字(隐藏表单名字)ARG中国设计秀

 ARG中国设计秀

'=================================================================ARG中国设计秀
'PageSize 属性ARG中国设计秀
'设置每一页的分页大小ARG中国设计秀
'=================================================================ARG中国设计秀
Public Property Let PageSize(int_PageSize)ARG中国设计秀
 If IsNumeric(Int_Pagesize) ThenARG中国设计秀
    if clng(Int_Pagesize)>0 thenARG中国设计秀
        XD_PageSize=CLng(int_PageSize)ARG中国设计秀
    elseARG中国设计秀
        XD_PageSize=10ARG中国设计秀
    end ifARG中国设计秀
 ElseARG中国设计秀
    XD_PageSize=10ARG中国设计秀
 End IfARG中国设计秀
End PropertyARG中国设计秀

Public Property Get PageSizeARG中国设计秀
 If XD_PageSize="" or (not(IsNumeric(XD_PageSize))) ThenARG中国设计秀
  PageSize=10ARG中国设计秀
 ElseARG中国设计秀
  PageSize=XD_PageSizeARG中国设计秀
 End IfARG中国设计秀
End PropertyARG中国设计秀

ARG中国设计秀
'=================================================================ARG中国设计秀
'GetRS 属性ARG中国设计秀
'返回分页后的记录集ARG中国设计秀
'=================================================================ARG中国设计秀
Public Property Get GetRs()ARG中国设计秀
 Set XD_Rs=Server.createobject("adodb.recordset")ARG中国设计秀
 'XD_Rs.PageSize=PageSizeARG中国设计秀
 XD_Rs.CursorLocation=3ARG中国设计秀
 XD_Rs.Open XD_SQL,XD_Conn,3,1ARG中国设计秀
 int_curcount=XD_Rs.RecordCountARG中国设计秀
 if int_totalRecord="" or not isNumeric(int_totalRecord) then int_totalRecord=0              '规范化int_totalRecord的值ARG中国设计秀
 if int_totalRecord=0 and (int_curcount>=PageSize or int_curpage>1) then call queryRsCount()  '查询总记录数ARG中国设计秀
 if err.number<>0 thenARG中国设计秀
 Response.Write err.ClearARG中国设计秀
 end ifARG中国设计秀
 Set GetRs=XD_RSARG中国设计秀
End PropertyARG中国设计秀

'=================================================================ARG中国设计秀
'queryRSCount 方法ARG中国设计秀
'查询总记录数ARG中国设计秀
'=================================================================ARG中国设计秀
Public sub queryRsCount()ARG中国设计秀
    '下面代码用于计算总记录数ARG中国设计秀
    if XD_Count_SQL<>"" thenARG中国设计秀
  set rs_sqlcount=server.createobject("adodb.recordset")ARG中国设计秀
  rs_sqlcount.CursorLocation=3ARG中国设计秀
  rs_sqlcount.open XD_Count_SQL,conn,3,1ARG中国设计秀
  if (rs_sqlcount.eof and rs_sqlcount.bof) thenARG中国设计秀
   int_totalRecord=0ARG中国设计秀
  elseARG中国设计秀
   int_totalRecord=rs_sqlcount(0)ARG中国设计秀
   int_totalRecord=clng(int_totalRecord)ARG中国设计秀
  end ifARG中国设计秀
  rs_sqlcount.closeARG中国设计秀
  set rs_sqlcount=nothing ARG中国设计秀
 end ifARG中国设计秀
End subARG中国设计秀

'================================================================ARG中国设计秀
'GetConn  得到数据库连接ARG中国设计秀
'ARG中国设计秀
'================================================================ARG中国设计秀
Public Property Let GetConn(obj_Conn)ARG中国设计秀
 Set XD_Conn=obj_ConnARG中国设计秀
End PropertyARG中国设计秀

'================================================================ARG中国设计秀
'GetSQL   得到查询语句ARG中国设计秀
'ARG中国设计秀
'================================================================ARG中国设计秀
Public Property Let GetSQL(str_sql)ARG中国设计秀
  if (str_sql<>"") thenARG中国设计秀
      '根据给定查询语句,生成最终的查询语句(只取当前页内容):适用于oracle数据库ARG中国设计秀
   XD_SQL=" select * from (select rownum r_n,temptable.* from ("ARG中国设计秀
   XD_SQL=XD_SQL&str_sqlARG中国设计秀
   XD_SQL=XD_SQL&" ) temptable ) where r_n between " & cstr((int_curpage -1) * XD_PageSize +1) & " and " & cstr(int_curpage * XD_PageSize)ARG中国设计秀
   '查询总记录数的查询语句ARG中国设计秀
   XD_Count_SQL="select count(*) from ("& str_sql & ")"ARG中国设计秀
   end ifARG中国设计秀
End PropertyARG中国设计秀

ARG中国设计秀
'================================================================ARG中国设计秀
'GetSubmitForm属性   设置查询条件的表单ARG中国设计秀
'ARG中国设计秀
'================================================================ARG中国设计秀

Public Property Let GetSubmitForm(frmName)ARG中国设计秀
   SubmitForm=trim(frmName)ARG中国设计秀
End PropertyARG中国设计秀

'================================================================ARG中国设计秀
'GetSubmitForm1方法  输出分页导航所需脚本ARG中国设计秀
'ARG中国设计秀
'================================================================ARG中国设计秀
public sub GetSubmitForm1()ARG中国设计秀
  '页导航的javascript函数ARG中国设计秀
  Response.Write " "+vrcrlfARG中国设计秀
  Response.Write ("<Script language=""Javascript"">") +vbcrlfARG中国设计秀
  Response.Write "      function generalSubmit(i)"+vbcrlfARG中国设计秀
  Response.Write "      {"+vbcrlfARG中国设计秀
  Response.Write  "     document."&SubmitForm&".flag.value=""query1111111155555"";"+vbcrlfARG中国设计秀
  Response.Write  "     document."&SubmitForm&".currentpage.value=i;"+vbcrlfARG中国设计秀
  Response.Write  "     "&SubmitForm&".submit();"+vbcrlfARG中国设计秀
  ARG中国设计秀
  Response.Write "      }"+vbcrlfARG中国设计秀
  ARG中国设计秀
  '改变页大小的javascript函数ARG中国设计秀
  Response.Write "    function changePageSize(ii)"+vbcrlfARG中国设计秀
  Response.Write "      {"+vbcrlfARG中国设计秀
  Response.Write  "     document."&SubmitForm&".flag.value=""query1111111155555"";"+vbcrlfARG中国设计秀
  Response.Write  "     document."&SubmitForm&".currentpage.value=1;"+vbcrlfARG中国设计秀
  Response.Write  "     document."&SubmitForm&".pagesize.value=ii;"+vbcrlfARG中国设计秀
  Response.Write  "     "&SubmitForm&".submit();"+vbcrlfARG中国设计秀

  Response.Write "      }"+vbcrlfARG中国设计秀
  Response.Write ("</Script>")+vbcrlfARG中国设计秀
  Response.Write " "+vrcrlfARG中国设计秀
end subARG中国设计秀

'==================================================================ARG中国设计秀
'totalRecordCount 属性ARG中国设计秀
'关于记录总数ARG中国设计秀
'ARG中国设计秀
'==================================================================ARG中国设计秀

Public Property Let totalRecordCount(int_totalRecordCount)ARG中国设计秀
   If IsNumeric(int_totalRecordCount) ThenARG中国设计秀
      int_totalRecord=CLng(int_totalRecordCount)ARG中国设计秀
   End IfARG中国设计秀
End PropertyARG中国设计秀

Public Property Get totalRecordCountARG中国设计秀
 If not(int_totalRecord="" or (not(IsNumeric(int_totalRecord)))) ThenARG中国设计秀
  totalRecordCount=int_totalRecordARG中国设计秀
 End IfARG中国设计秀
End PropertyARG中国设计秀
'==================================================================ARG中国设计秀
'GetRecordCount 方法ARG中国设计秀
'返回当前记录数ARG中国设计秀
'ARG中国设计秀
'==================================================================ARG中国设计秀
public function GetRecordCount()ARG中国设计秀
 GetRecordCount=int_totalRecordARG中国设计秀
end functionARG中国设计秀
'==================================================================ARG中国设计秀
'Class_Initialize 类的初始化ARG中国设计秀
'初始化当前页的值ARG中国设计秀
'ARG中国设计秀
'==================================================================ARG中国设计秀
Private Sub Class_InitializeARG中国设计秀
 '========================ARG中国设计秀
 '设定一些参数的黙认值ARG中国设计秀
 '========================ARG中国设计秀
' XD_PageSize=10  '设定分页的默认值为10ARG中国设计秀
 '========================ARG中国设计秀
 '获取当前面的值ARG中国设计秀
 '========================ARG中国设计秀
 If Request("currentpage")="" ThenARG中国设计秀
  int_curpage=1ARG中国设计秀
 ElseIf not(IsNumeric(Request("currentpage"))) ThenARG中国设计秀
  int_curpage=1ARG中国设计秀
 ElseIf CInt(Trim(Request("currentpage")))<1 ThenARG中国设计秀
  int_curpage=1ARG中国设计秀
 ElseARG中国设计秀
  Int_curpage=CInt(Trim(Request("currentpage")))ARG中国设计秀
 End IfARG中国设计秀

End SubARG中国设计秀

'=============================================ARG中国设计秀
'ShowPage  创建分页导航条ARG中国设计秀
'有首页、前一页、下一页、末页、还有数字导航ARG中国设计秀
'ARG中国设计秀
'=============================================ARG中国设计秀
Public Sub ShowPage()ARG中国设计秀
 Dim str_tmpARG中国设计秀
 XD_sURL = GetUrl()ARG中国设计秀
' int_totalRecord=XD_Rs.RecordCountARG中国设计秀
 If int_totalRecord<=0 ThenARG中国设计秀
  str_error=str_error & "总记录数为零,请输入数据"ARG中国设计秀
  Call ShowError()ARG中国设计秀
 End IfARG中国设计秀
 If int_totalRecord="" thenARG中国设计秀
     int_TotalPage=1ARG中国设计秀
 ElseARG中国设计秀

'modify by wls 041215 For the right pages display---------------ARG中国设计秀
  If int_totalRecord mod PageSize =0 ThenARG中国设计秀
   int_TotalPage = CLng(int_TotalRecord XD_PageSize * -1)*-1ARG中国设计秀
  ElseARG中国设计秀
   int_TotalPage = CLng(int_TotalRecord XD_PageSize * -1)*-1+1ARG中国设计秀
  End IfARG中国设计秀

 End IfARG中国设计秀

 If Int_curpage>int_Totalpage ThenARG中国设计秀
  int_curpage=int_TotalPageARG中国设计秀
 End IfARG中国设计秀

 '========================================================ARG中国设计秀
 '显示分页信息,各个模块根据自己要求更改显求位置ARG中国设计秀
 '========================================================ARG中国设计秀
 'response.write " "ARG中国设计秀
 str_tmp=ShowFirstPrvARG中国设计秀
 response.write str_tmpARG中国设计秀
 str_tmp=showNumBtnARG中国设计秀
 response.write str_tmpARG中国设计秀
 str_tmp=ShowNextLastARG中国设计秀
 response.write str_tmpARG中国设计秀
 str_tmp=ShowPageInfoARG中国设计秀
 response.write str_tmpARG中国设计秀
 Response.write "&nbsp;"ARG中国设计秀
 ShowGotoARG中国设计秀

End SubARG中国设计秀

ARG中国设计秀
'=============================================ARG中国设计秀
'ShowFirstPrv  显示首页、前一页ARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'=============================================ARG中国设计秀
Private Function ShowFirstPrv()ARG中国设计秀
 Dim Str_tmp,int_prvpageARG中国设计秀

 If int_curpage=1 ThenARG中国设计秀
  str_tmp=Btn_First&" "&Btn_PrevARG中国设计秀
 Elseif int_curpage=0 thenARG中国设计秀
  str_tmp=Btn_First&" "&Btn_PrevARG中国设计秀
 elseARG中国设计秀
  int_prvpage=int_curpage-1ARG中国设计秀
  str_tmp="<a href=""#"" onclick=""javascript:generalSubmit('1')"" alt=""第一页"">" & Btn_First&"</a> <a href=""#"" onclick=""javascript:generalSubmit('"&int_prvpage&"')"" alt=""前一页"">" & Btn_Prev&"</a>"ARG中国设计秀
 End IfARG中国设计秀
 ShowFirstPrv=str_tmpARG中国设计秀
End FunctionARG中国设计秀

'=============================================ARG中国设计秀
'ShowNextLast  下一页、末页ARG中国设计秀
'ARG中国设计秀
'ARG中国设计秀
'=============================================ARG中国设计秀
Private Function ShowNextLast()ARG中国设计秀
 Dim str_tmp,int_NextpageARG中国设计秀

 If Int_curpage>=int_totalpage ThenARG中国设计秀
  str_tmp=Btn_Next & " " & Btn_LastARG中国设计秀
 ElseARG中国设计秀
  Int_NextPage=int_curpage+1ARG中国设计秀
  str_tmp="<a href=""#"" onclick=""javascript:generalSubmit('"&int_nextpage&"')"" alt=""后一页"">" & Btn_Next&"</a> <a href=""#"" onclick=""javascript:generalSubmit('"&int_totalpage&"')"" alt=""最后一页"">" &  Btn_Last&"</a>"ARG中国设计秀
 End IfARG中国设计秀
 ShowNextLast=str_tmpARG中国设计秀
End FunctionARG中国设计秀

'End FunctionARG中国设计秀
'=============================================ARG中国设计秀
'ShowNumBtn 修改后的数字导航ARG中国设计秀
'ARG中国设计秀
'=============================================ARG中国设计秀
Function showNumBtn()ARG中国设计秀
 Dim i,str_tmp,end_page,start_pageARG中国设计秀

 start_page=1ARG中国设计秀
 'add by sll 2005.05.20 int_curpage=0ARG中国设计秀
 if int_curpage=0 thenARG中国设计秀
  str_tmp=str_tmp&"0"ARG中国设计秀
elseARG中国设计秀
 if int_curpage>1 thenARG中国设计秀
  start_page=int_curpageARG中国设计秀
  if (int_curpage<=5) thenARG中国设计秀
   start_page=1ARG中国设计秀
  end ifARG中国设计秀
  if (int_curpage>5) thenARG中国设计秀
   start_page=int_curpage-2ARG中国设计秀
  end ifARG中国设计秀
  end ifARG中国设计秀
   end_page=start_page+5ARG中国设计秀
  if end_page>int_totalpage thenARG中国设计秀
  end_page=int_totalpageARG中国设计秀
  end ifARG中国设计秀
  For i=start_page to end_pageARG中国设计秀
    strTemp=XD_sURL & CStr(i)ARG中国设计秀
    str_tmp=str_tmp & "[<a href=""#"" onclick=""javascript:generalSubmit('"&i&"')"">"&i&"</a>] "ARG中国设计秀
  NextARG中国设计秀
end ifARG中国设计秀
 showNumBtn=str_tmpARG中国设计秀
End FunctionARG中国设计秀

'=============================================ARG中国设计秀
'ShowGoto 页面跳转ARG中国设计秀
'页面自动跳转ARG中国设计秀
'add by sll 2005.05.20ARG中国设计秀
'=============================================ARG中国设计秀
Private Function ShowGoto()ARG中国设计秀
'response.write int_totalPageARG中国设计秀
 dim intiARG中国设计秀
 if int_totalPage<=0 thenARG中国设计秀

  response.write "<select name='goto' disabled>"ARG中国设计秀
   Response.Write "<option value='0'>0</option>"ARG中国设计秀
  response.write "</select>"ARG中国设计秀
elseARG中国设计秀

 response.write "<select name='goto' onchange='javascript:generalSubmit(this.value)'>"ARG中国设计秀

  for inti=1 to int_totalPageARG中国设计秀

   Response.Write "<option value='"&inti&"'"ARG中国设计秀
   if cstr(inti)=cstr(int_curpage) thenARG中国设计秀
    response.write "selected"ARG中国设计秀
   end ifARG中国设计秀
    response.write" >"&inti&"</option>"ARG中国设计秀
 nextARG中国设计秀
response.write "</select>"ARG中国设计秀
end ifARG中国设计秀
End FunctionARG中国设计秀

ARG中国设计秀
'=============================================ARG中国设计秀
'ShowPageInfo  分页信息ARG中国设计秀
'根据要求自行修改ARG中国设计秀
'ARG中国设计秀
'=============================================ARG中国设计秀
Private Function ShowPageInfo()ARG中国设计秀
 Dim str_tmpARG中国设计秀
 str_tmp=" [页次:<font color=red>"&int_curpage&"</font>/"&int_totalpage&"页] [共"&int_totalrecord&"条] ["&XD_PageSize&"条/页]"ARG中国设计秀
 ShowPageInfo=str_tmpARG中国设计秀
End FunctionARG中国设计秀
'=============================================ARG中国设计秀
'ShowPageSizeChange  改变页大小ARG中国设计秀
'根据要求自行修改ARG中国设计秀
'ARG中国设计秀
'=============================================ARG中国设计秀
public sub ShowPageSizeChange()ARG中国设计秀
 Dim str_tmpARG中国设计秀
 str_tmp="页大小:<select name='sssssPageSize' onchange='changePageSize(this.value)'>"ARG中国设计秀
 str_tmp=str_tmp & "<option"ARG中国设计秀
 if XD_PageSize=10 then str_tmp =str_tmp & " selected "ARG中国设计秀
 str_tmp=str_tmp & " value='10'>10</option>"ARG中国设计秀
 str_tmp=str_tmp & "<option"ARG中国设计秀
 if XD_PageSize=20 then str_tmp =str_tmp & " selected "ARG中国设计秀
 str_tmp=str_tmp & " value='20'>20</option>"ARG中国设计秀
 str_tmp=str_tmp & "<option"ARG中国设计秀
 if XD_PageSize=50 then str_tmp =str_tmp & " selected "ARG中国设计秀
 str_tmp=str_tmp & " value='50'>50</option>"ARG中国设计秀
 str_tmp=str_tmp & "<option"ARG中国设计秀
 if XD_PageSize=int_totalRecord then str_tmp =str_tmp & " selected "ARG中国设计秀
 str_tmp=str_tmp & " value='" & int_totalRecord & "'>all</option>"ARG中国设计秀
 str_tmp=str_tmp & "</select>"ARG中国设计秀
 response.Write str_tmpARG中国设计秀
End subARG中国设计秀

'=============================================ARG中国设计秀
'修改后的获取当前Url参数的函数ARG中国设计秀
'Codeing by RedsunARG中国设计秀
'northsnow注释:不知道用在何处,但是保留ARG中国设计秀
'=============================================ARG中国设计秀
Private Function GetUrl()ARG中国设计秀
 Dim ScriptAddress, M_ItemUrl, M_itemARG中国设计秀
 ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME"))&"?"  '取得当前地址ARG中国设计秀
 If (Request.QueryString <> "") ThenARG中国设计秀
  M_ItemUrl = ""ARG中国设计秀
  For Each M_item In Request.QueryStringARG中国设计秀
   If InStr("page",M_Item)=0 ThenARG中国设计秀
    M_ItemUrl = M_ItemUrl & M_Item &"="& Server.URLEncode(Request.QueryString(""&M_Item&"")) & "&"ARG中国设计秀
   End IfARG中国设计秀
  NextARG中国设计秀
  ScriptAddress = ScriptAddress & M_ItemUrl   '取得带参数地址ARG中国设计秀
 End IfARG中国设计秀
 GetUrl = ScriptAddress '& "page="ARG中国设计秀
End FunctionARG中国设计秀

ARG中国设计秀
'=============================================ARG中国设计秀
' 设置 Terminate 事件。ARG中国设计秀
'=============================================ARG中国设计秀
Private Sub Class_TerminateARG中国设计秀
 'XD_RS.closeARG中国设计秀
 'Set XD_RS=nothingARG中国设计秀
End SubARG中国设计秀

ARG中国设计秀
'=============================================ARG中国设计秀
'ShowError  错误提示ARG中国设计秀
'=============================================ARG中国设计秀
Private Sub ShowError()ARG中国设计秀
 If str_Error <> "" ThenARG中国设计秀
  Response.Write("" & SW_Error & "")ARG中国设计秀
  Response.EndARG中国设计秀
 End IfARG中国设计秀
End SubARG中国设计秀

End classARG中国设计秀

ARG中国设计秀
% >ARG中国设计秀

本文引用地址:/bc/article_46520.html
网站地图 | 关于我们 | 联系我们 | 网站建设 | 广告服务 | 版权声明 | 免责声明