【小(xiǎo)編推薦】php分(fēn)頁的(de)制(zhì)作(zuò∞₩→)

2015-08-25   | ↑©;  發布者:梁國(guó)®"∏芳   |  >• "; 查看(kàn):3320次

php
<?php
        &Ω✔nbsp;   $nowpage =(is↑®&set($_GET['page']))?$_GET['page']:1;↓≈§
       ♥§ $count =3;
      &nbs®Ω™×p; $start =($nowpage -1≈♦∑♦)* $count;
    &±₽₽nbsp;     
     &nb÷™sp;     $res↓☆ult =$db->query(&q§™ uot;select * FROM weixin_down_25 WHERE✔$φ catid=47 limit $start,$cou₽£≥§nt");
     &nb♣↓&αsp;      §↕♦while($res =$db->fetchδ∏≠_array($result)){
    &nb£Ω¥sp;    ™•;      ↕₽;
      ♦★      &n‍'♠↕bsp;      ₹ 
      &nε bsp;     ?>
    &λ​nbsp;   &nbs✘≤φ®p;   <dd>
        ←₽♥→   
     <₩↔;    &nσ↔bsp;     &≤‌±nbsp; <div class="s_tu₹∞γπ">
       σ‍∞;    &n♥→'bsp;   &n÷↔ bsp;     <im★φg src="<?php echo $res['thumb']♥¥;?>" />
   &nb λ<sp;    &>∞♦≠nbsp;     ₩σ✘    ☆₽‍β;  <div class="s_ind"∑←±σ>
     &nbε✘ sp;   &n•φbsp;     &nbs• p;   •×      <div class=♣ε"s_ind_wen">
   &nb€₹∞€sp;   &nb♦"'sp;     &nbsα★¥p;   &nbsβ¥δγp;   &nbs↔≈p;      £β<p><?php echo $res['intro✘"duce'];?></p>
      &nbπ÷φ→sp;    &nb™®sp;   &≠∞nbsp;     &n‌ ₽bsp;  </div>
    &n α"↓bsp;   ​$;   &n£♦♣÷bsp;    ✘γ;    <®♣≥/div>
    ≈ ±;     &nbs‌₩ p;     ₽• </div>
    &nbsπ>§↕p;    &nb₽®♦sp;    ≤λ←‍;  <div class=&×≈∑quot;s_wen">
      &≈'nbsp;    &nσ‌★αbsp;    ←$☆₹    <h2>【<?♦©©×php echo $res['school']; ?&gλ→↓¥t;】課程置換方案</h2>
      >✔✘☆;     &nb→★✘sp;    &nbs'↑≠αp;   <ul&g£λt;
      ≠♣±;      ‌♣>≠    &nb♥¶sp;       <₩•δ§;li>實施院校(xiào):<?php echo $re≈​s['school']; ?></li&g$'×£t;
    ♥≤₩☆;    &nbs♠$♠Ωp;   &♥↔€nbsp;     ✘•>      <₽♥↕";li>實施時(shí)間(jiān ≤↔):<?php echo $res['schoolt &ime'];?></li>
     ★‌πσ      ₽λ    &nbs♦‍p;      &π™ nbsp; <li>方案提供± 方:<?php echo $res['giver'∑©±•];?></li>
    &↓↕​↔nbsp;     &nbs ✘®•p;     ↓♠₹♠;    </ul>↕';
      &nb©∞÷sp;    &nβ₽bsp;   ≤→≠‌;   &≈☆nbsp; <a href="<?php echo ✘♠$res['fileurl'];?>">文(wén)λ✘ 檔下(xià)載</a>
      &★ λ↓nbsp;   ®≤    &nbs¶αp; </div>
      <×';      </dαεd>
     &nb← sp;   &nb∏>∞≤sp; <?php }
       σσ   
       ♥≤    $cat = $db->query(&q φuot;select COUNT(*) ASδ±®​ num FROM weixin_down_25 WHERE ca§&tid=47");
      ♠✘φ     $r = $db->fet←•&✔ch_array($cat);
     ♠>&;     
     ≤★     
    &nb♠¶sp;      $allpagesφπ =ceil($r['num']/$count);//計(jì)算(α​suàn)出頁數(shù)
        ™↕  
      σ ;     $prevpage =$nowpaλ¶ ge >1 ? ($nowpage-1):1;
      α→↓λ    
      &↔<$€nbsp;    $nextγ≈page =$allpages > $nowpa™↕←ge ?($nowpage+1):$allpages;
     &n✔♠✘¥bsp;    
     &n©¶ Ωbsp;    
    &nλ™↔bsp;    &★ nbsp; ?>
     &n•>bsp;  </dl>
      ♦♣  <div class="↑ε;yeshu">
        ≤$<span><a href=¶♥"http://www.weixin-s₽εx.com/xiazai/school.php?page=&l&₹t;?php echo $prevpage?>&quoδ ¥t;>上(shàng)一(yī)頁</a></¥♠span>
   &n‍≥bsp;    |&aσ♣ mp;nbsp;&nbsp;<a>α↔&≤<?php echo $page?></a&'→↑ gt;/<a><?php∏δφ✘ echo $allpages?></a>§™•&nbsp;&nbsp;|
    &♦αnbsp;   <span><♥♠←πa href="http://www.weixin-Ωπγ↔sx.com/xiazai/school.php?page=<©β‌γ?php echo $nextpage?>">下(x↕εià)一(yī)頁</a></span& ×"gt;
      ₩ε;  </div>