# ----------------------------------------- #
# 程式名稱:C.P.Sub公告系統 #
# 設計者:Cooltey #
# E-Mail:cooltey@yahoo.com.tw #
# HomePage:http://cooltey.mytw.net #
# 程式版本:V3.5 #
# 最後更新:2005/11/23 #
# 注意,本版權宣告不得刪除,程式可任意修改! #
# 最下面一行的 Powered By Cooltey 請不要刪除 #
# ----------------------------------------- #
?>
require("to_set.php");?>
公告區
if(@$HTTP_GET_VARS['more']=="all"){
# 假設最多的公告筆數為1000筆
$page="1000";
}else{
# $page中代表的是每頁顯示的數目
$page="1000";
}
if(@$num==""){
$num=$page;
}
# 讀取儲存檔案、計算檔案長度
$lines=file("sub.dat");
$count=count($lines);
for($a=($count-1);$a>=0;$a--){
$line[]=$lines[$a];
}
?>
# 用for迴圈來讀取公告筆數
for($i=0;$i<$count;$i++){
# 用if判斷句來擷取公告筆數的顯示範圍
if($i>=($num-$page)&&$i<$num){
# 先用list將sub.dat中的檔案分配好,在將檔案用explode()函數來分割
list($kind,$date,$title,$url,$name,$mail,$updname,$hidden,$note)=explode("∥",$line[$i]);
$id=$count-$i;
# 去除php中的斜線衝碼
$url=stripslashes($url);
$name=stripslashes($name);
$mail=stripslashes($mail);
$title=stripslashes($title);
$kind=stripslashes($kind);
$note=stripslashes($note);
# 判斷$mail的值
if($mail!=""){
$person="$name";
}else{
$person="$name";
}
# 判斷$style_pic的值
if($style_pic=="open"){
$kind_pic=" ";
}else{
$kind_pic="";
}
# 顯示列串
if($note):
?>
Warning: Undefined variable $date in /home/unit/ES__/earth/public_html/new/es-news/sub2.php on line 98
|
Warning: Undefined variable $kind_pic in /home/unit/ES__/earth/public_html/new/es-news/sub2.php on line 100
|
Warning: Undefined variable $title in /home/unit/ES__/earth/public_html/new/es-news/sub2.php on line 103
|
# 結束列串
endif;
}
}
?>
# 開始判斷$more的值
if(@$more=="all"){
echo "";
echo " 顯示最近公告 | ";
echo " ";
}else{
echo "";
echo " | ";
echo " ";
}
?>
|