<?
/*
例子一
#############################################################
<?
require("page.php");                                   //包含类
$conn=mysql_connect ("127.0.0.1", "root", "123456");   //连接数据库
if(!$conn)
{
   echo"<script>alert('数据库连接出错!!')</script>";
}
mysql_select_db("test");                          //选择表
$sql="id,tt#t##";                             //sql语句 格式:字段(多字段用逗号隔开)#表名#条件(不用加where)#排序(不用加order by)
$page=new wind_page($sql);  //定义新类 参数:($sql,$pagesize,$bar_mun,$key) $sql:上面定义的$sql $pagesize:每页的大小 $bar_mun:数字导航的长度  $key:标识分页(一个页面多个分页时用与区分)
while($rs=mysql_fetch_object($wind_page->result))
{
    echo "$rs->tt\n";            //输出结果
}
$wind_page->page_bar();               //默认导航栏
echo $wind_page->taketime();          //所用时间
mysql_close($conn); 
?>
############################################################
例子二
#############################################################
<?
require("page.php");                                   //包含类
$conn=mysql_connect ("127.0.0.1", "root", "123456");   //连接数据库
if(!$conn)
{
   echo"<script>alert('数据库连接出错!!')</script>";
}
mysql_select_db("test");                          //选择表
$sql="id,tt#t##";                             //sql语句 格式:字段(多字段用逗号隔开)#表名#条件(不用加where)#排序(不用加order by)
$wind_page=new wind_page($sql,20,10,111);  //定义新类 参数:($sql,$wind_pagesize,$bar_mun) $sql:上面定义的$sql $wind_pagesize:每页的大小 $bar_mun:数字导航的长度
while($rs=mysql_fetch_object($wind_page->result))
{
    echo "$rs->tt\n";            //输出结果
}
?>
<table width="100%"  border="0" cellspacing="0">
                <tr>
                  <td width="5%"></td>
                  <td width="30%"><? echo $wind_page->total_bar("#000000","red") //$wind_page->total_bar(颜色1,颜色2)?></td>  
                  <td width="50%"align="right"><? echo $wind_page->pre_groud("[<<]","#000000").$wind_page->pre_page("[<]","#000000").$wind_page->mun("#000000","red","[","]").$wind_page->next_page("[>]","#000000").$wind_page->next_groud("[>?]","#000000")?></td>
      <td width="10%"><? echo $wind_page->jump_bar("jump_bar")  //jump_bar(class色样) 下拉跳转菜单?></td> 
                  <td width="5%"></td>
                 </tr>
               </table>
   <?
echo $wind_page->taketime();          //所用时间
mysql_close($conn); ?>
############################################################  
*/
?>