函數sdatetime($str){
$str=ereg_replace("-","/",$str);
$str=substr($str,5,strlen($str)-8);
回傳$str;
}
function reAnum($sid){ //羆萊構計
.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
$q="從bbs_docssql》中選擇,其中sid='$sid'";
$rs=mysql_db_query($sql['db'],$qsql);
return mysql_num_rows($rs)
;
function pagebar($pages) {
global $pgno;
//全域$pages;
echo "";
echo "
"; echo " |
"; echo " |
"; !=0) { $pu=$pgno-1; echo " } if($pgno $pd=$pgno ] a>"; } for($i=0;$i "; echo "[".($i 1)."]"; { echo ""; echo "[".($i 1)."]"; } } echo "
| ";
echo "";
echo " echo "";
//echo if($OPEN_LIST ) {
echo ""; echo "" ;
}else {
echo "[甶秨槓肈]";
/a>";
}
回顯「」;
echo "
";
}
//====================================== == == =============================================
函數openlist ($sid) {
全球$援助;
全域 $PHP_SELF;
$DROOT=getenv('DOCUMENT_ROOT');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
$qsql="SELECT * from bbs_docs where sid='$sid' order by wdate";
$rs=mysql_db_query($sql['db'],$qsql);
//if(mysql_num_rows($rs)==0) return;
//echo mysql_num_rows($rs);
while($row=mysql_fetch_array($rs)) {
$id=$row['id'];
$banner=$row['banner'];
$poster=$row['poster'];
$views=$row['views'];
$wdate=sdatetime($row['wdate']);
echo "
";
則以回復「」; echo ""; echo " $banner"; 回顯「」; 則以回復「 | 」;
則以回復「」; echo $poster; 則以回復「 | 」;
echo ""; 回復中「 」; echo " |
"; echo $views; 則以回復「 | 」;
echo ""; echo 且 $wdate; 則以回復「 | 」;
並為「
」;
}
}
//========================================== == ==============================
函數區域() {
全域$PHP_SELF;
全域$aid,$sid,$pgno;
全域$OPEN_LIST;
$showitems=20;
$
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
//============== =================================== =================
if(!$aid) {
$qsql="從bbs_area 選擇id";
$row= mysql_fetch_array($rs);
$aid=$row['id']; id) {
$qsql="從bbs_subj 選擇id,其中help= $aid 依wdate DESC 排序";
$rs=mysql_db_query($sql['db'],$qsql);
[' id'];
}
if(!$pgno) {// 🎜> $items=0;
$ qsql="從bbs_subj 選擇id,其中help=$aid 按wdate DESC 排序";
$rs=mysql_db_query($sql['db'],$q $rs)){
$id=$row['id'];
$項目;
}
$pgno=( INT)($items/$showitems);
}
//========================================== == ==================
$qsql="SELECT * from bbs_area where id=$aid ";
$rs=mysql_db_query($[' db'],$qsql);
$row=mysql_fetch_array($rs);
$banner=$row['banner'];
$banner=$row['banner'];
> $master=$row['master'];
echo "
$banner";
echo "