【小(xiǎo)編推薦】php的(de)分(fēn)頁制(z ♠≈♣hì)作(zuò)

2015-08-25   |&©φαnbsp;  發布者:梁國(guó)φ¥芳   | &nbs↔∞p; 查看(kàn):3320次

destoon
<?php
       ♣φ     $nowpage =(is★★✘±set($_GET['page']))?$_GET['page']'π:1;
     &n₹'αbsp;  $count =3;
    &​×≤‍nbsp;   $sta✔∏πrt =($nowpage -1)* $count;
     &n✔≥®bsp;   &nbs≠ ♠​p;
        ≥λ†  $result =$>₽φ‍db->query("select * FROM ¶÷λweixin_down_25 WHERE catid=Ωφ47 limit $start,$count")₽✔✔ ;
     &♥'nbsp;     ≈δγ while($res =$db->fetch∞₽§β_array($result)){
      φβ✘      π☆₽★   
    &n★Ωbsp;   &nbs£π×δp;       &✘₽nbsp;  
     &nb≠±αsp;      ?>✔‌<≤
    &nbs≥¶p;    &n←<bsp;  <dd>
      &♠×∑nbsp;    
      &nπφ↓bsp;      &∑  nbsp;  <div class=&q β$​uot;s_tu">
      ₽¥‍    &↓∑Ωnbsp;     &↑;    ★Ω "<img src="<?php ec↕♣×ho $res['thumb'];?>&quβ™₩‌ot; />
    &nb™✔§×sp;      •;   &nδ× ←bsp;    ‌✔  <div class=&§×quot;s_ind">
     ♦€Ω≥;   &nbs¥ε•p;    &nbsβ÷p;   &nbsφ‍‌γp;    &nb>€$<sp; <div class=&qu​¶↕ot;s_ind_wen">
      &nb≥↑★£sp;     ₩₩↔"   &nb₹σsp;     £✔    ​★;   <p><?php echo $≥≈res['introduce'];?>©→;</p>
      >♠     &÷→nbsp;   &nbsπ€♥p;   &nbs↑​p;    </div>
   &nbsπ≤σ±p;     ★σ§σ    &"∑nbsp;   &n€✘bsp;  </div&g✘ t;
      ∏♣δ     π£♠π;     </di£→v>
      &↑÷nbsp;    &n≈​bsp;    <d&‌£↕iv class="s_wen&∑ε&♥quot;>
     &nbs£‍p;   £ ✘♣     &nb∏ ★ sp;     <h2>【&γ♣lt;?php echo $res['school'ε×∑]; ?>】課程置換方案</h2>
     &nb✘®≥¥sp;     §&;    ∞•   &nbs≤<p; <ul>
     &≠•↔πnbsp;    &n<γbsp;   &★β∑nbsp;   &¥ε₽nbsp;     &l€"t;li>實施院校(xiào):<?php echo $res∏↑∞σ['school']; ?></li&gδ§t;
     &nbα sp;    "→≤♣;     &÷♥♥nbsp;    &nbδ→♣sp;   <li>實施時₽‍β(shí)間(jiān):<?php ecγ ±¶ho $res['schooltime'];?></δ☆<λli>
     ‌÷π;   &nb∏™sp;     •↓‍;   &nb≠ sp;      &≤®&lt;li>方案提供方:<?php ec©π&ho $res['giver'];?></li>"♠Ω≥;
    <↑$<;   &nb‌§sp;   ✘≠←​;     &nb£→sp;   </ul>♣"β;
    ₽∏↑$   &nbs♥≈÷∏p;    &nb₹<βsp;   &n$☆≤bsp;   <£α≈;a href="<?php echo $res['fileβα♥☆url'];?>">¶↔β≤;文(wén)檔下(xià)載</a>
     &nb≤®π™sp;     &n $γλbsp;    </div&g₩β♥t;
    π &​      ↓÷→;  </dd>
    &nb↓↓↓♦sp;   ↑ ☆≥;   <?php }
      &☆‌≤→nbsp;   
    &nbs≈∏★×p;      $cat = $db$$->query("select COUNT¥<(*) AS num FROM weixin_down_25 WHERE ca™<δ₩tid=47");
    &n♦&bsp;    &n£‍✔bsp; $r = $db->fetchΩ∑_array($cat);
      &n'δ bsp;   
      &nbs€ε→p;   
      & λ‍δnbsp;    $allp®₹≈ages =ceil($r['num']/$count);//✘∞♥計(jì)算(suàn)出頁數(shù)
    &nb÷λsp;     
     &"‍nbsp;     $prevp♣≠age =$nowpage >1 ₹©? ($nowpage-1):1;
      &n©☆bsp;   
      &☆‍nbsp;    $nextpage =$allpages®$≥ > $nowpage ?($nowpage+1):$allpa ×ges;
     &nb£&βsp;   &nbs★₩p;
     &n ≥bsp;    
       £ ☆σ    ?>
   &n ∏bsp;    ε¶</dl>
       ↕​€;  <div clas☆ βs="yeshu">
     &α‌∏€nbsp;  <span><a hreλ&≤€f="http://www.weixin-sx.com/xia€ε§zai/school.php?page=<?php echo $p§ ‍∏revpage?>">上(shàng)φβ≥☆一(yī)頁</a></span>
    &©γγ™nbsp;   |&nbsp;&∑☆amp;nbsp;<a><∑λ;?php echo $page?><Ω↑♦​/a>/<a><?php ∏ echo $allpages?></a>&€ amp;nbsp;&nbsp;|
     &nbs§☆λp;  <span><a href=&q ©✔ uot;http://www.weixin-sx​<>★.com/xiazai/school.php?page=<?p "♥'hp echo $nextpage?>"&gδ ≠t;下(xià)一(yī)頁</a></sγπpan>
        &‌♠₹εlt;/div>