smarty頁函數(shù)
Jun 08, 2016 pm 05:32 PM
/*******************************************
writer:zhaofei299
Emai:zhaofei299@163.com
百度空間:http://hi.baidu.com/zhaofei299
*******************************************/
class Page??
{
? var $pageSize;?//每頁顯示的數(shù)據(jù)數(shù)
? var $page;??//當(dāng)前頁面數(shù)
? var $amount;????? //總數(shù)據(jù)數(shù)
? var $amountPage;? //總頁數(shù)
? var $pageNum;???? //每頁顯示的鏈接數(shù)
? function __construct($size, $pageNum)?? //構(gòu)造函數(shù),初始化成員屬性
? {
??? $this->pageSize= $size;? //每頁顯示數(shù)據(jù)數(shù)
?$this->amount= 0;
?$this->ampuntPage= 0;???
?$this->pageNum=$pageNum; //每頁顯示多少頁數(shù)鏈接
?link_data();?//連接數(shù)據(jù)庫
? }
? function getPage()? //得到當(dāng)前頁面數(shù)
? {
??? $id= trim($_GET['id']);????????????????? //當(dāng)前頁面id
?$this->getAmount();???????????????????? //得到總數(shù)據(jù)數(shù)
?$amountPage= $this->getAmountPage();?? //總頁數(shù)
??? if (isset($id) && $id>0)????????????? //如果參數(shù)id存在 并且 參數(shù)id大于0
?? $this->page= intval($id);????????? //取其整數(shù)部分
?else
?? $this->page=1;?? //將1賦給當(dāng)前頁面
?if (isset($id) && ($id>$amountPage))//如果參數(shù)id存在 并且 參數(shù)id大于總頁數(shù)
?? $this->page=$amountPage;? //將總頁數(shù)賦給當(dāng)前頁數(shù)
? }
?
? function getStart()? //得到LIMIT數(shù)據(jù) 開始的索引
? {
??? $start= ($this->page-1)*5;
?return $start;? //返回開始索引
? }
? function getInfo($start, $sql)? //得到數(shù)據(jù)表中的數(shù)據(jù)信息,并以數(shù)組的形式返回
? {
?$array=array();? //初始化數(shù)組
?$result= mysql_query($sql);?? //執(zhí)行sql語句
?while (@$reArray= mysql_fetch_array($result))? //從數(shù)據(jù)表中取出一行,作相關(guān),索引數(shù)組操作
? ?{
?? $array[]= $reArray;? //將包含數(shù)據(jù)信息的數(shù)組添加入新的數(shù)組中
?}
?return $array;? //返回一個(gè)二維數(shù)組
? }
? function getAmount()? //得到總數(shù)據(jù)數(shù)
? {
?$sql= "SELECT count(*) as count FROM talk_info";?? //查詢
?$result= mysql_query($sql);?
?$reArray= mysql_fetch_array($result);
? return? $this->amount= $reArray['count'];? //總數(shù)據(jù)數(shù)
? }
? function getAmountPage()? //得到總頁數(shù)
? {
??? $this->amountPage= $this->amount/$this->pageSize;? //總頁數(shù)= 總數(shù)據(jù)數(shù) / 每頁顯示數(shù)據(jù)數(shù)
?if (!is_int($this->amountPage))? //如果計(jì)算得到的總頁數(shù)不是整形
?? $this->amountPage= intval($this->amountPage)+1; //取其整數(shù)部分+1;
??? return $this->amountPage;
? }
? function getPageLinks()? //得到當(dāng)前頁面顯示的所有的鏈接,并以數(shù)組的形式返回
? {
?$amountPage= $this->amountPage;? //總頁面數(shù)
?$pageNum= $this->pageNum;??????? //每頁顯示的鏈接數(shù)
?$page= $this->page;????????????? //當(dāng)前頁數(shù)
?$urlArray= array();
?if ($page>1)? //如果當(dāng)前頁面數(shù)大于1
?{
?? $urlArray[]= " [|";
?? $urlArray[]= "? [";
?}
?else
?{
?? $urlArray[]= '[|
?? $urlArray[]= '[
?}
?$p= intval($page/5)+1;? //區(qū)間
?$a= ($p-1)*5+1;????????
?for ($j=$a; $j
?{
????? if ($j>$amountPage)?
??break;
?? if ($j==$page)?
???? $urlArray[]= '['.$j.']';
?? else
???????? $urlArray[]= " [".$j."] ";??
?}
?//}
?if ($page
?{
?? $urlArray[]= "? [>>]? ";
?? $urlArray[]= "? [>|]? ";
??? }
?else
?{
?? $urlArray[]= '[>>]';
?? $urlArray[]= '[>|]';
?}
?return $urlArray;? //返回包含所有鏈接的數(shù)組
? }
}
?>
?

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Windows 11? ???? ??? ???? ??? ??????. ???? ?????? ?? ? ???? ?? ??? ?? ??? ????? ??? ? ????. ? ?????? Windows ?? ???? ??? ???? ???? ??? ??? ? ??? ?? ??? ??? ?????. ? ??? ??? ???? ??? ?????? +? ?? ?? ?? ???. Windows?? ???? ???? ?? ??? ?????. ?? ?? ? ??? ?? ? 11" Width="643" Height="500" > ?? ??? ? ? ???? ?? ?? ?? ??? ?? ?? ?? ???? ?????. ?? ?? ? ?? ???? ?? ??? ????? ?? ??? ?? ???? ?? ??? ????? ?? ??? ?? ???? ?? ??? ???.

??? ??? "??? ???? PIN ??? ?????"?? ???? ?????. ?? ?? ??? ??? ? ?? ?? ?? ?? ??? ???? ????? PIN ?? ??? ??? ?? ?????. ??? ?? ??? ???? Windows? ???? ?? ?????? ?? ???? ???? ????. ?? ?? ?? ????. ??? ??? ???? ???? ?? ??? ???? ?????. ???? Windows 11?? PIN? ????? ???? ??? ?????? ??? ??? ??? ???? ?? ? ???? ?? ???? ?? ?? ?? ?????. ??? ????? ???? ??? ? ? ????! ?? ?? ??? ?? ?? ???? ??? ????? ?? ?? ??? ??? ? ????. ?? ??

????? Windows 11? ?? ??? ??? ??? ???/?? ??? ?? ????. ??? ??? ???? ??? ? ????. ? ?????? ?? ???? ???? ??? ????? ????? ????? ??? ? ?? ??? ?? ??? ??? ?????. ?? ?? ??? ?? ?? ??? ??? ??? ? ????? ?, ?? ?? ???? ?? ?? ?? ??? ??? ????? ????? ???? ???? ??? ?? ?? ??? ??? ??? ? ????. ??? ??? ????? ?? ???? ?????. Windows 11?? ?? ??? ??? ???? ??? ?????? 1. ?? ?? ???? +? ?? ?? ?? ???. Windows"?? ??"?? ??? ??

?? ??? ???? ???? ?? ??? ??? ???? ??? ???? ? ?? ????. ? ?? ?? ??? ?? ???? ????? ???? ??? ??? ?? ? ? ??? ?? ????. ? ?? ??? ? ?? ??? ???? ????? ????. ??? ??? ???? ?? ? ?? ??? ?? ??? ?????? ??? ????????. ??? ???? ??? ?? ??? ? ?? ?? ??? ??? ?? ???? ? ????. Windows 11?? ?? ??? ??? ?? ??? ????? ??? ?????? 1. ?? ?? ???? ?? ??? ??? ?????. Windows??? ???? ???? ??? ?????. ?? ??? ??? ?????. ?? ??? ???? ?? ???? ??? ?????. "?? ??"? ?????.

Windows Installer ???? "OOBELANGUAGE" ?? ?? "??? ??????."? ?????? ??? ??? ?? Windows ??? ???? ??? ????. OOBE? ?? ?? ??? ??? ?????. ?? ????? ? ? ??? ?? OOBE ?? ??? ??? ?????. ??? ??? ????. OOBE ?? ???? ?????? ???? ? ??? ??? ? ????. ?? ?? – 1. OOBE ? ??? ?? “?? ??” ??? ?????. ??? ? ??? ?? ?? ????? ?????. 2. ?? ??? ???? ???? ?? ?????. ???? ?? ??? ? OOBE? ????? ???. 3. ????? ??? ??? ????. ???? ???? OOBE? ?? ??? ?????.

?? ??? ?? ??? ??? ??? ? ???? ????, ?? ??? ??? ? ? ?? ?????. ?? ??? ???, ???? ???, ???? ?? ????? ?? ? ??? ???. ??? ??? ?? ?? ??? ??? ? ???, ?? ??? UI ??? ??? Windows 11??? ?? ?????. ??? ???? ? ??? ?? ?? Windows 11?? ??? ???? ?? ??? ??? ????. Windows 11?? ??? ???? ?? [10?? ??] ?? ??? ???? ?? ??? ???? Windows 11?? ??? ??? ? ????. ???? ?? ???? ???? ???? ???? ???? ?????. ????. ?? 1: ?? ?? ?? ?? ??? ???? ? ????.

Windows 11? ????? ?? ??? ???? ?? ??? ?? ?? ???? ??? ????. ? ???? ???? ??? ??, ?? ???? ???? ??? ????. ??? ??? ?? ??? ????? ??? ??? ?????. ??? ?? ?? ???? ???? ??? ?? ??? ?? ? ???? ???? ? ???? ??? ??? ??? ????? ?? ??? ???? ??? ??? ???. Custom Zoom? ??: ??? ???? ?? ??? ????? ??? ?????. ? ?? ???? ? ?? ?? ? ? ??? ?????. ?? ??? ? ?? ?????? ???? ??? ?? ?? ???? ??? ? ????. ??? ????? ??? ????? ? ??? ? ? ????. ?? ?? ??? ??? ? ????? ??? ? ????. ??? 11? ???? ??

Windows? ?? ?? ?????? ??? ? ?? ?? 0xc004f069? ??? ?? ???? ???? ??? ????. ??? ????? ????? ?????? Windows Server? ???? ?? ?? ????? ? ??? ??? ? ????. ??? ?? ??? ???? ??? ???? ??? ?? ??? ?? ?? ???? ???? ??? ??????. ?? ?? - ?? ???? ??? ?? ????. ?? ?? ???? ?? ??????. Windows ?? ?? ????? ???? ?? ?????. ?? 1 – ????? ??? cmd ????? Windows Server Edition ???? ??????. 1?? – Windows Server ?? ?? ?? ???? ?? W ??? ???? ???.
