function sdatetime($str){
$str=ereg_replace("-","/",$str);
$str=substr($str,5,strlen($str)-8);
return $str;
}
function reAnum($sid){ //??莱?计
$DROOT=getenv('DOCUMENT_ROOT');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
$qsql="SELECT id from bbs_docs where sid='$sid'";
$rs=mysql_db_query($sql['db'],$qsql);
return mysql_num_rows($rs);
}
function pagebar($pages) {
global $pgno;
//global $pages;
global $PHP_SELF;
global $aid;
global $OPEN_LIST;
echo "<TABLE width=85% border=0 cellPadding=0 cellSpacing=1 align=center bgcolor='#6CA6CD' class='num'>";
echo "<tr><td>";
if($pgno!=0) {
$pu=$pgno-1;
echo "<a href=$PHP_SELF?aid=$aid&pgno=$pu>[???]</a>";
}
if($pgno<$pages) {
$pd=$pgno+1;
echo "<a href=$PHP_SELF?aid=$aid&pgno=$pd>[???]</a>";
}
for($i=0;$i<=$pages;$i++) {
if($pgno==$i) {
echo "<b>";
echo "[".($i+1)."]";
echo "</b>";
} else {
echo "<a href=$PHP_SELF?aid=$aid&pgno=$i>";
echo "[".($i+1)."]";
echo "</a>";
}
}
echo "</td>";
echo "<TD align=right>";
echo "<a href=$PHP_SELF?proc=view&aid=$aid>";
echo "[??ゅ彻]";
echo "</a>";
//echo "</TD>";
//echo "<TD align=right>";
if($OPEN_LIST) {
echo "<a href=$PHP_SELF?proc=colloff&aid=$aid&pgno=$pgno>";
echo "[ぃ??杠?]";
echo "</a>";
}else {
echo "<a href=$PHP_SELF?proc=collon&aid=$aid&&pgno=$pgno>";
echo "[??杠?]";
echo "</a>";
}
echo "</TD>";
echo "</tr></table>";
}
//===============================================================================
function openlist($sid) {
global $aid;
global $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 "<tr bgcolor='#F0F0F0'>";
echo "<td>";
echo "<a href=$PHP_SELF?proc=view&aid=$aid&sid=$sid&rid=$id>";
echo " <font color=#836FFF>$banner</font>";
echo "</a>";
//echo "banner is $banner";
echo "</td>";
echo "<td>";
echo $poster;
echo "</td>";
echo "<td class='num'>";
echo " ";
echo "</td>";
echo "<td class='num'>";
echo $views;
echo "</td>";
echo "<td class='num'>";
echo $wdate;
echo "</td>";
echo "</tr>";
}
}
//========================================================================
function area() {
global $PHP_SELF;
global $aid,$sid,$pgno;
global $OPEN_LIST;
$showitems=20;
$DROOT=getenv('DOCUMENT_ROOT');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
//============================================================
if(!$aid) {
&
$str=ereg_replace("-","/",$str);
$str=substr($str,5,strlen($str)-8);
return $str;
}
function reAnum($sid){ //??莱?计
$DROOT=getenv('DOCUMENT_ROOT');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
$qsql="SELECT id from bbs_docs where sid='$sid'";
$rs=mysql_db_query($sql['db'],$qsql);
return mysql_num_rows($rs);
}
function pagebar($pages) {
global $pgno;
//global $pages;
global $PHP_SELF;
global $aid;
global $OPEN_LIST;
echo "<TABLE width=85% border=0 cellPadding=0 cellSpacing=1 align=center bgcolor='#6CA6CD' class='num'>";
echo "<tr><td>";
if($pgno!=0) {
$pu=$pgno-1;
echo "<a href=$PHP_SELF?aid=$aid&pgno=$pu>[???]</a>";
}
if($pgno<$pages) {
$pd=$pgno+1;
echo "<a href=$PHP_SELF?aid=$aid&pgno=$pd>[???]</a>";
}
for($i=0;$i<=$pages;$i++) {
if($pgno==$i) {
echo "<b>";
echo "[".($i+1)."]";
echo "</b>";
} else {
echo "<a href=$PHP_SELF?aid=$aid&pgno=$i>";
echo "[".($i+1)."]";
echo "</a>";
}
}
echo "</td>";
echo "<TD align=right>";
echo "<a href=$PHP_SELF?proc=view&aid=$aid>";
echo "[??ゅ彻]";
echo "</a>";
//echo "</TD>";
//echo "<TD align=right>";
if($OPEN_LIST) {
echo "<a href=$PHP_SELF?proc=colloff&aid=$aid&pgno=$pgno>";
echo "[ぃ??杠?]";
echo "</a>";
}else {
echo "<a href=$PHP_SELF?proc=collon&aid=$aid&&pgno=$pgno>";
echo "[??杠?]";
echo "</a>";
}
echo "</TD>";
echo "</tr></table>";
}
//===============================================================================
function openlist($sid) {
global $aid;
global $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 "<tr bgcolor='#F0F0F0'>";
echo "<td>";
echo "<a href=$PHP_SELF?proc=view&aid=$aid&sid=$sid&rid=$id>";
echo " <font color=#836FFF>$banner</font>";
echo "</a>";
//echo "banner is $banner";
echo "</td>";
echo "<td>";
echo $poster;
echo "</td>";
echo "<td class='num'>";
echo " ";
echo "</td>";
echo "<td class='num'>";
echo $views;
echo "</td>";
echo "<td class='num'>";
echo $wdate;
echo "</td>";
echo "</tr>";
}
}
//========================================================================
function area() {
global $PHP_SELF;
global $aid,$sid,$pgno;
global $OPEN_LIST;
$showitems=20;
$DROOT=getenv('DOCUMENT_ROOT');
include("sql.php3");
$db=mysql_connect($sql['host'], $sql['user'] , $sql['passwd']);
//============================================================
if(!$aid) {
&