function timeop($time,$type="talk") {
$ntime=time()-$time;
if ($ntime<60) {
return("剛才");
} elseif ($ntime<3600) {
return(intval($ntime/60)."分鐘前");
} elseif ($ntime<3600*24) {
return(intval($ntime/3600)."小時前");
} else {
if ($type=="talk") {
return(gmdate('m月d日 h:i',$time+8*3600));
} else {
return(gmdate('y-m-d h:i',$time+8*3600));
}
}
}