BBS(php & mysql)完整版(三)

來源:互聯網
上載者:User
關鍵字 BBS(php & mysql)完整版(三)
//此頁面為php3.php
include "signup/MySQL.inc";
switch($part){
  case "1" :$table="bbs_php";break;
  case "2" :$table="bbs_mysql";break;
  case "3" :$table="bbs_html";break;
  case "4" :$table="bbs_js";
  }
//echo $part;
?>



xiaoyang













 

 



 
 













































                           $sql="select * from ".$table." order by row DESC";   $result=mysql_query($sql)or die(mysql_error());   $row1=mysql_num_rows($result);      $row_max_page=12;           //分頁計算   $page=ceil($row1/$row_max_page);   $left_row=$row1-$p*$row_max_page;   $PRe_left_row=$left_row+12;   $start_row=$left_row+$row_max_page+1;   if($left_row<=0)    {    $start_row=$pre_left_row+1;    $left_row=0;    }       $sql="select * from ".$table." where row<'$start_row' and row>'$left_row' order by row DESC";   $result=mysql_query($sql)or die(mysql_error());   while($row=mysql_fetch_array($result)){              static $i=0;     $i++;     if($i%2)     $color="CCCCFF";     else $color="FFCCFF";   echo " ";   echo "  ";   echo "  ";   echo "  ";   echo "     ";           }               echo"
 
    人氣
   
 
    文章題目
   
 
    作者
   
 
    日期
   
";
  echo "  ".$row["number"]."";
  echo " 
";
  echo "  ".$row["title"]."";
  echo " 
";
  echo "  ".$row["userid"]."";
  echo " 
";
  echo "  ".$row["date1"]."";
  echo " 
";        
  echo "

 
";
  for($i=1;$i<=$page;$i++)
  {
  echo "[".$i."] ";
  }
  ?>
  



 
 " target="_self" onMouSEOver="window.status='';return true">我要發言





  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.