<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 495,  comments - 11,  trackbacks - 0

    package com.zh.util;

    import com.zh.conpool.Condata;
    import java.sql.ResultSet;
    import java.sql.SQLException;

    public class page
    {

    ???? ResultSet rs;
    ???? ResultSet rst;
    ???? private int intCountTopic;
    ???? public int intPageSize;
    ???? public int intPageCount;
    ???? public int intPage;
    ???? private String Countsql;
    ???? private String Pagisql;
    ???? private String str;
    ???? private String str_where;
    ???? private String str_parameter;
    ???? private String nowPage;
    ???? private String HttpFile;
    ???? Condata db;

    ???? public page()
    ???? {
    ???????? rs = null;
    ???????? rst = null;
    ???????? intCountTopic = 0;
    ???????? intPage = 0;
    ???????? Countsql = null;
    ???????? Pagisql = null;
    ???????? str = null;
    ???????? str_where = null;
    ???????? str_parameter = "";
    ???????? db = new Condata();
    ???? }

    ???? public static void main(String args[])
    ???? {
    ?????
    ???? }

    ???? public void setPages(int i)
    ???? {
    ???????? intPageSize = i;
    ???? }

    ???? public String getPagisql()
    ???? {
    ???????? return Pagisql;
    ???? }

    ???? public ResultSet setQuerysql(String s, String s1, String s2, String s3)
    ???????? throws SQLException
    ???? {
    ???????? ResultSet resultset = null;
    ???????? nowPage = s3;
    ???????? HttpFile = s2;
    ???????? Countsql = "select count(*) from " + s + " " + s1;
    ???????? Pagisql = "select * from " + s + " " + s1 + " order by id desc";
    ???????? try
    ???????? {
    ???????????? Condata _tmp = db;
    ???????????? Condata.getConnection();
    ???????? }
    ???????? catch(Exception exception)
    ???????? {
    ???????????? exception.getMessage();
    ???????? }
    ???????? try
    ???????? {
    ???????????? resultset = querySql(Countsql, Pagisql);
    ???????? }
    ???????? catch(SQLException sqlexception)
    ???????? {
    ???????????? sqlexception.getMessage();
    ???????? }
    ???????? return resultset;
    ???? }

    ???? public ResultSet querySql(String s, String s1)
    ???????? throws SQLException
    ???? {
    ???????? try
    ???????? {
    ???????????? Condata condata = db;
    ???????????? Condata.getConnection();
    ???????? }
    ???????? catch(Exception exception) { }
    ???????? if(nowPage == null)
    ???????? {
    ???????????? intPage = 1;
    ???????? } else
    ???????? {
    ???????????? intPage = Integer.parseInt(nowPage);
    ???????????? if(intPage < 1)
    ???????????????? intPage = 1;
    ???????? }
    ???????? rs = db.executeQuery(s);
    ???????? if(rs.next())
    ???????????? intCountTopic = rs.getInt(1);
    ???????? intPageCount = intCountTopic % intPageSize == 0 ? intCountTopic / intPageSize : intCountTopic / intPageSize + 1;
    ???????? if(intPage > intPageCount)
    ???????????? intPage = intPageCount;
    ???????? rs.close();
    ???????? rst = db.executeQuery(s1);
    ???????? return rst;
    ???? }

    ???? public int getCountTopic()
    ???? {
    ???????? return intCountTopic;
    ???? }

    ???? public int getPageCount()
    ???? {
    ???????? return intPageCount;
    ???? }

    ???? public int getIntPage()
    ???? {
    ???????? return intPage;
    ???? }

    ???? public String PageFooter()
    ???? {
    ???????? String s = "<form action=" + HttpFile + " name=form1 methord=post>";
    ???????? int i = intPage - 1;
    ???????? int j = intPage + 1;
    ???????? int k = (intPageSize * getIntPage() + 1) - intPageSize;
    ???????? if(k < 0)
    ???????????? k = 0;
    ???????? s = s + "<font style='font-size: 9pt'>\u603B\u8BA1<font color='red'>" + getCountTopic() + "</font>\u6761\u8BB0\u5F55," + "\u3010\u5171<font?? color='red'>" + getPageCount() + "</font>\u9875\u3011";
    ???????? s = s + "\u3010" + intPageSize + "\u6761/\u9875\u3011 \u5F53\u524D\u7B2C<font color='red'>" + getIntPage() + "</font>\u9875(\u5217\u51FA\u7B2C" + k + "\u5230\u7B2C" + getIntPage() * intPageSize + "\u6761) &nbsp; &nbsp; ";
    ???????? if(intPage > 1)
    ???????????? s = s + " <A href=" + HttpFile + "?pages=1" + str_parameter + ">\u9996\u9875</A> ";
    ???????? else
    ???????????? s = s + " \u9996\u9875 ";
    ???????? if(intPage > 1)
    ???????????? s = s + " <A href=" + HttpFile + "?pages=" + i + str_parameter + ">\u4E0A\u4E00\u9875</A> ";
    ???????? else
    ???????????? s = s + " \u4E0A\u4E00\u9875 ";
    ???????? if(intPage < intPageCount)
    ???????????? s = s + " <A href=" + HttpFile + "?pages=" + j + str_parameter + ">\u4E0B\u4E00\u9875</A> ";
    ???????? else
    ???????????? s = s + " \u4E0B\u4E00\u9875 ";
    ???????? if(intPageCount > 1 && intPage != intPageCount)
    ???????????? s = s + " <A href=" + HttpFile + "?pages=" + intPageCount + str_parameter + ">\u5C3E\u9875</A>";
    ???????? else
    ???????????? s = s + " \u5C3E\u9875</font>";
    ???????? s = s + "</form>";
    ???????? return s;
    ???? }

    ???? public void closeConn()
    ???? {
    ???????? db.close();
    ???? }
    }

    posted on 2007-10-02 21:32 jadmin 閱讀(62) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 妞干网手机免费视频| 777爽死你无码免费看一二区| 成人女人A级毛片免费软件| 亚洲一区二区三区高清| 无码av免费网站| 亚洲视频中文字幕| 蜜臀AV免费一区二区三区| 久久成人免费播放网站| 国产亚洲无线码一区二区| 在线观看黄片免费入口不卡| 国产精品亚洲а∨无码播放| 无码免费一区二区三区免费播放| 亚洲精品高清久久| 亚洲高清中文字幕免费| 亚洲av无码无线在线观看| 亚洲av无码成人精品区| 中文字幕成人免费高清在线视频| 久久久久久久综合日本亚洲| 亚洲国产欧洲综合997久久| 日本牲交大片免费观看| 特级aaaaaaaaa毛片免费视频| 精品亚洲一区二区三区在线观看| 国产精品区免费视频| 亚洲一卡2卡3卡4卡国产网站| 狠狠久久永久免费观看| 成人久久久观看免费毛片| 亚洲va无码va在线va天堂| 国产免费的野战视频| 色屁屁在线观看视频免费| 精品亚洲一区二区| 毛片a级毛片免费观看品善网| 日韩少妇内射免费播放| 7777久久亚洲中文字幕蜜桃 | 亚洲国产精品成人一区| 两性色午夜免费视频| 亚洲一卡二卡三卡四卡无卡麻豆| 亚洲成a人片在线播放| 18禁美女黄网站色大片免费观看| 相泽南亚洲一区二区在线播放| 亚洲男人的天堂www| 最新免费jlzzjlzz在线播放|