【小(xiǎo)編推薦】php分(fēn)頁的(de)制(zhì)作(zu‌×"☆ò)

2015-08-25   |&nb↑¶↓™sp;  發布者:梁國( λ♣guó)芳   |&nb₩±sp;  查看(kàn§÷):3320次

php
<?php
     ©∞↔♣       $ε↓nowpage =(isset($_GET['page']))?$_GET£✘['page']:1;
        £÷; $count =3;
      &©α♥nbsp; $start =($nowpage -1)* ‌‌∏←$count;
     &nbδ'®÷sp;    ♠<$≈
        &≥±nbsp;  $result =$d‍♣§b->query("select * FROM ÷♦φ↕weixin_down_25 WHERE catid=47 ♣≠" limit $start,$count");
        &★γnbsp;   while($res = ≈→∏$db->fetch_array($α♣★result)){
    &nb$↓↔εsp;   &nbs©​p;      
      &♥≥nbsp;     ∑'     &×♠∞nbsp; 
      &©₹nbsp;     ?&γ←gt;
      &δ←δ nbsp;    ↓‍♠ <dd>
     &nbs>φ¥p;    &←ε↓Ωnbsp;
      &nγ☆bsp;      &nb™>>£sp;  <div clas≤↓σ✔s="s_tu">λ↔→™
    >∞>;   &&✔ πnbsp;  &nbγ÷‌↕sp;      ✘∞;   <img •€αsrc="<?php echo $r≠✔es['thumb'];?>" />
    λΩ;    &n₹↔© bsp;  &nbs★"≈p;      &₽πnbsp; <div class=&quo≤β∑>t;s_ind">
      &€βnbsp;     &&¥→nbsp;     &n✘®±$bsp;     &α≤lt;div class="s_ind_wen&quo™σαt;>
     &↑&↔₽nbsp;   &≤&¶€nbsp;   &nbs≤≈∞p;    &n® $bsp;    ∏×<";     &lγ₩t;p><?php echo $res['intro σ£duce'];?></p>
      &nb↓'∏sp;    &☆↔nbsp;   &nb™'α•sp;    &nbs‍$p;   </div>
    &nbs₹¶p;    &‍δnbsp;     ™α™ ;     <÷™;/div>
      &nb↓λα"sp;    > ;   &♣≤→nbsp; </div>
     &nbs≠αp;    ₽ ;      <‌♦;div class="s_wen">
    ™★∑¥   &n±↕®'bsp;   &≥↔nbsp;    &nbs•≤p;   <h2>【®♦₽±<?php echo $res['school']; ?>】±&課程置換方案</h2>
      ‍σ;    ∑₩•→;   &nb££sp;     ★✔; <ul>
    &nb™≠sp;    &nb✔§≠sp;   &↔€₽nbsp;   &ε✘₽nbsp;    &nΩλ&✘bsp; <li>實施院校(xiàγ→λo):<?php echo $res['sch×✘↓÷ool']; ?></li>
      ¥¥δ©    &♠π✘nbsp;   ✔      ε≈ ;   &nb£>™sp; <li>實施時(shí)間(jiān):π← ×<?php echo $res['schooltime'];?&β♣¶'gt;</li>
   &n≤¥♣£bsp;    &nb←★®sp;    &®¶ ≤nbsp;   &‌  nbsp;   &nbs"β¥p;  <li>方案提‌★"供方:<?php echo $res['giverγβγ'];?></li>
     &n≈∑☆λbsp;     ¥€;     & βλnbsp;   </ul>
     &nbs₹>‌ p;   §$&   &nb ₹±≠sp;     &₹λ↓nbsp; <a href="&lε✔£t;?php echo $res['fi★© leurl'];?>">文(✔☆¥wén)檔下(xià)載</a>
     ♥"₽;     &↓ ®♣nbsp;   ÷§  </div>
      &nb≤λsp;   &nbs✔♦☆p; </dd>
    λ¥₹×   &nb  ₩γsp;   <?phpσ™↔​ }
     &n↑>✔↔bsp;    
     &nb₩"≤sp;     $cat = $db->q ₩uery("select COUNT(*) AS num FROM Ωβ≤"weixin_down_25 WHERE cat♣&id=47");
       ♣¶δ→    $r = $db->fetch_array¥∏ε($cat);
      &n>≥₩bsp;   
      &n∏>‍bsp;   
     ≥∞‌↑      $aΩ₽llpages =ceil($r['num']/$count);//計(jì← $)算(suàn)出頁數(shù)
    &φπ nbsp;     
    &nbs÷≥p;      $prevpag‌∏e =$nowpage >1 ? ($nowpage-1):∑™★☆1;
     &nβ¶bsp;    
    &n↔≈bsp;      $nextpag✔δe =$allpages > $nowpage  ÷↑$?($nowpage+1):$allpages;
     &nελbsp;    
       δ®;   
     &nbs₹σ↓p;     ?>↓≥;
      &n♥∏↕bsp; </dl>
     ↔←   <div ←‍↕class="yeshu">♠δΩ;
     &nbs≤÷σp;  <span><a hβ↔®σref="http://www.γ♠®weixin-sx.com/xiazai/sc ​hool.php?page=<?ph≤✔p echo $prevpage?>">上(shàng®™£σ)一(yī)頁</a></s↕™₩★pan>
   &nbs↔←≠&p;    |&n₩•bsp;&nbsp;<a><?ph•$φ≈p echo $page?></a>/&l×>↑÷t;a><?php echo π£φ $allpages?></a>&nbsp;&am₽‍¥<p;nbsp;|
   &nb∏↔sp;    <span<←><a href="http://ww∑£•w.weixin-sx.com/xiazai/school.₹'php?page=<?php echo $nexΩσ↓λtpage?>">下(xià™¶∞€)一(yī)頁</a></span>
       γ≤ </div>