"); $messagenum = substr($lines[0],68,$pos2-68); $messagenum++; $message = "
"") {$total++;} if($txtname<>"" or $txtcity<>"" or $txtcontent<>"") { $pos2=(int) strpos($lines[0],"
"; $message = $message.""; $message = $message.""; $message = $message.""; $message = $message.""; $message = $message."
$messagenum姓名: $txtname類別: $txtcity日期及時間: ".date("d/m/y h:ia")."
$txtcontent
"; $fw=fopen($file, "w+"); $message = str_replace(" ","
",$message); fwrite($fw, $message."\r\n"); fclose($fw); $fa = fopen($file, "a+"); $i=0; while ($lines[$i] <> "") { fwrite($fa, $lines[$i]); $i++; } fclose($fa); } if ($page=="") $page=1; $pages=$total/15; $pages=(int)$pages+1; echo "

"; for ($count=1; $count<$pages+1; $count++) { if ($count==$page) echo "[".$count."] "; else echo "".$count." "; } echo "

"; $lines = file($file); $start = ($page-1)*15; for ($count=1; $count<16; $count++) { echo $lines[$start+$count-1]; } ?>