<?php
include_once("inc/config.php");
include_once("inc/publicfun.php");
include_once("inc/ftbbsdbclass.php");
include_once("inc/pageclass.php");
include_once("conn.php");
include_once("ftbbshome_nav.php");

$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
$bbsname=$ftbbsmb[11];
$copyright=$ftbbsmb[14];
$getcodeoff=$ftbbsmb[30];
$onlineoff=$ftbbsmb[33];
$linkoff=$ftbbsmb[34];
$htmlsign=$ftbbsmb[37];
$defaulthome=$ftbbsmb[31];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">	
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>飞天论坛,静态论坛,生成静态贴子的论坛</title>
<meta name="keywords" content="飞天论坛,静态论坛,生成静态贴子的论坛">
<script language=javascript src="inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="default0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<style type="text/css">
<!--
/*分页*/
.intd,.outtd{ height:18px; text-align:center; line-height:18px; font-family:Arial;font-size:12px;cursor:pointer;}
.intd{ background:#66ABD9; font-weight:bold; color:#fff; width:20px; border:1px solid #B3DDF8; }
.outtd{ background:#fff; color:#049; width:20px; border:1px solid #B3DDF8; }
.inputpage {padding:0;font-size:14px;height:18px;border:1px #B3DDF8 solid;}
-->
</style>
</head>
<body>
<?
include_once("navhome.php");
?>
		<!--最新图片/相册开始-->
		<div id="morePhotos" class="width780">
		<?
		$sql="select {$tablepre}bbstitle.ID,{$tablepre}bbstitle.title,{$tablepre}ftbbs_upload.upload_pic,{$tablepre}ftbbs_upload.upload_htm,{$tablepre}ftbbs_upload.userid from {$tablepre}bbstitle,{$tablepre}ftbbs_upload where {$tablepre}bbstitle.htmfilename={$tablepre}ftbbs_upload.upload_htm and {$tablepre}bbstitle.deleted=0 and {$tablepre}bbstitle.flag=0 and {$tablepre}ftbbs_upload.sign=0 and {$tablepre}ftbbs_upload.bbs_blog_type=0 and ({$tablepre}ftbbs_upload.upload_ext='jpg' or {$tablepre}ftbbs_upload.upload_ext='gif') order by {$tablepre}bbstitle.ID desc";
        $rs=mysql_query($sql);
		$myrow = mysql_fetch_array($rs);
        $numrows = mysql_num_rows($rs);
		$p = new ft_page;
		$pagesize=30;
        $p->pvar="page"; 
        $p->set($pagesize,$numrows,$psize); 
        $rsx=mysql_query($sql." limit ".$p->limit());
        $pg=$p->getpage();
		while ($myrow = mysql_fetch_array($rsx)){
		   $photo_name=$myrow["userid"];
           if ($htmlsign==1){
	          $readurl="ftbbs-".$myrow["id"].".html";
           }
           else{
	          $readurl="ftbbs.php?id=".$myrow["id"];
           }
		?>
		<h1><a href="<?=$readurl?>"><img src="<?=$myrow["upload_pic"]?>" alt="<?=$myrow["title"]?>" width="110" height="110" border="0" /></a></h1>
		<?
		}
		?>
		<div align="left" style="float: left;">
<?
$p->output(0);
mysql_free_result($rs);
mysql_free_result($rsx);
$db->close(); 
?>
		&nbsp;</div>
		</div>
<?
include_once("copyright.htm");
?>
</body>
</html>