include("include/mysql.php");//資料庫
//字數限制
function cutword($cutstring,$cutno){
if(strlen($cutstring) > $cutno) {
for($i=0;$i<$cutno;$i++) {
$ch=substr($cutstring,$i,1);
if(ord($ch)>127) $i++;
}
$cutstring= substr($cutstring,0,$i)."...";
}
return $cutstring;
}
//HTTP
$page = $_GET['page'];
if($page == ""){$page = 1;}
$orderKind = $_GET['orderKind'];
if($orderKind == ""){$orderKind='date';}
?>
|
|
統編:19381866 |
|
電話:03-5208271 |
|
傳真:03-5192260 |
|
手機:0932-117870 |
|
0988-527955 |
|
|
$strSQL = "SELECT * FROM News ORDER BY $orderKind DESC";
$res=mysql_query($strSQL);
$MaxRec=mysql_num_rows($res);
//每一頁的記錄數
$PageSize = 10;
//計算開始的記錄
$StartRec = $PageSize * ($page - 1) + 1;
//計算結束的記錄
$StopRec = $StartRec + $PageSize - 1;
//計算頁數
$MaxPageCount = Ceil($MaxRec / $PageSize);
$Count = 0;
WHILE($row=mysql_fetch_array($res) and ($Count < $StopRec)){
$Count = $Count + 1;
If ($Count >= $StartRec){
$a=$a+1;
if($a<10){$a='0'.$a;}else{$a=$a;}
?>
}}?>
|
|
COPYRIGHT c 2012 易銓 DESING BY PROC BEST VIEW : 1024*768 |
|