<!--#include file="conn.asp" -->
<!--#include file="ftbbshome_nav.asp" -->
<%
ftbbs_name=request.cookies("name")
ftbbs_bz=request.cookies("bz")
ftbbs_bbsadmin=request.cookies("bbsadmin")
ftbbs_payuser=request.cookies("payuser")
if ftbbs_name<>"" and ftbbs_bz="" then ftbbs_bz=0
%>
<!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=gbk" />
<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>
<script>
function changeCssStyle()
{
	var sCssType = document.all.select3.value;
	setCookie("STYLESHOW", sCssType);
    window.location.href='ftbbshome.asp';
    parent.left.document.location.reload();
}
function show_tbl(pre,n,select_n)
{
	for(i=1;i<=n;i++)
	{
		var tbl= document.getElementById(pre+i);
		tbl.style.display="none";
		if(i==select_n)
		{
		tbl.style.display="block";
		}
	}
}
</script>
</head>
<body>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var tmpstylecook;
function setcookies()
{
 tmpstylecook = stylecook;
}

function  reloadcook()
{
   var scooks = getCookie("STYLESHOW");
   if(scooks != tmpstylecook)
   {
 	window.location.reload();
   }
}
setcookies();
setInterval('reloadcook()',1000);
</script>
<!--#include file="navhome.asp" -->
<%
if ftbbs_name="" then
   strqssql="where BBS_Cate_Qs=1 or BBS_Cate_Qs=2 or BBS_Cate_Qs=3"
else
   if ftbbs_payuser=1 and ftbbs_bz=0 and ftbbs_bbsadmin=0 then '改进
      strqssql="where BBS_Cate_Qs=3"
   elseif ftbbs_bz=1 or ftbbs_bbsadmin=1 then
      strqssql=""
   else
      strqssql="where BBS_Cate_Qs=2 or BBS_Cate_Qs=3"
   end if
end if
dim strqs,qssqlstr1,qssql
strqs=""
qssqlstr1=""
qssql="select BBS_Cate_ID from BBS_Cate "&strqssql&""
set qsrs=server.createobject("adodb.recordset")
qsrs.open qssql,conn,1,1
if not qsrs.eof and strqssql<>"" then
   qsnum=qsrs.recordcount
  if qsnum>1 then
     i=0
    do while not qsrs.eof
      if i=qsnum-1 then
	        qsbbsx1=qsrs("BBS_Cate_ID")
	  else
            qsbbsx1=qsrs("BBS_Cate_ID")&","
	  end if
	  qsbbs1=qsbbs1&qsbbsx1
      qsrs.movenext
	  i=i+1
    loop
     qsarray1=split(qsbbs1,",")
   for k = 0 to UBound(qsarray1)
     if k=UBound(qsarray1) then
	 qssqlstrx = "Boardid_1<>'" & qsarray1(k) &"' and Boardid_2<>'" & qsarray1(k) &"'"
	 else
	 qssqlstrx = "Boardid_1<>'" & qsarray1(k) &"' and Boardid_2<>'" & qsarray1(k) &"' and "
	 end if
	 qssqlstr1 = qssqlstr1&qssqlstrx
   next
    qssqlstr1 = ""&qssqlstr1
 else
    qssqlstr1 = "Boardid_1<>'"&qsrs("BBS_Cate_ID") &"' and Boardid_2<>'"&qsrs("BBS_Cate_ID")&"'"
 end if
  strqs=qssqlstr1&" and "
end if
qsrs.close
sql="select top 5 bbstitle.*,ftbbs_upload.upload_pic from bbstitle,ftbbs_upload where bbstitle.htmfilename=ftbbs_upload.upload_htm and bbstitle.deleted=0 and ftbbs_upload.sign=0 and ftbbs_upload.bbs_blog_type=0 and (ftbbs_upload.upload_ext='jpg' or ftbbs_upload.upload_ext='gif') order by bbstitle.id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,3,1
%>
		<script language="javascript" type="text/javascript">
		<!--
		var fadeimages = new Array;
		var linkarr = new Array;
		var numimg = new Array;
		<%
		i=0
		if not rs.eof then
        do while not rs.eof
        if i>4 then exit do
		%>
		fadeimages[<%=i%>] = '<%=rs("upload_pic")%>';
		linkarr[<%=i%>] = 'ftbbs.asp?id=<%=rs("id")%>';
		numimg[<%=i%>] = 'blogimages/p0<%=i+1%>.gif';
		<%
        i=i+1
        rs.movenext
        loop
		else
		%>
		fadeimages[0] = 'blogimages/nopic.gif';
		linkarr[0] = '#';
		numimg[0] = 'blogimages/p01.gif';
		
		fadeimages[1] = 'blogimages/nopic.gif';
		linkarr[1] = '#';
		numimg[1] = 'blogimages/p02.gif';
		
		fadeimages[2] = 'blogimages/nopic.gif';
		linkarr[2] = '#';
		numimg[2] = 'blogimages/p03.gif';
		
		fadeimages[3] = 'blogimages/nopic.gif';
		linkarr[3] = '#';
		numimg[3] = 'blogimages/p04.gif';
		
		fadeimages[4] = 'blogimages/nopic.gif';
		linkarr[4] = '#';
		numimg[4] = 'blogimages/p05.gif';
		<%
		end if
        rs.close
        set rs=nothing
		%>
		var cliImg = '';
		var cliImgSrc = '';
		var n = Math.round(Math.random() * 4);
		var interval = 3000;
		var setTimeId = '';
		var MaxRollCount = 30;
		var CurrRollCount = 0;
		function rotateStop(){
			clearTimeout(setTimeId);
		}
		function rotateStart(){
			rotate();
		}
		function chki(ci, no){
			var pImg = document.images['RollImg'];
			var pUrl = document.getElementById('RollUrl');
			if(cliImg == '') {
				cliImg = ci;
				cliImgSrc = ci.src;
				ci.src = numimg[no];
				n=no;
				pImg.src = fadeimages[no];
				pUrl.href = linkarr[no];
			} else if(cliImg != ci) {
				cliImg.src = cliImgSrc;
				cliImg = ci;
				cliImgSrc = ci.src;
				ci.src = numimg[no];
				n=no;
				pImg.src = fadeimages[no];
				pUrl.href = linkarr[no];
			}
		}
		function rotate(){
		 CurrRollCount = CurrRollCount + 1;
		 if (CurrRollCount>MaxRollCount) return;
			n = (n >= 4) ? 0 : n+1;
			setimgurl();
			setTimeId=setTimeout('rotate()',interval);
		}
		function setimgurl(){
			var ci = document.images['num_img'+n]
			try {
			document.images['RollImg'].filters.blendTrans.apply();
			} catch (e){ }
			document.getElementById('RollUrl').href=linkarr[n];
			document.images['RollImg'].src=fadeimages[n];
			try {
			document.images['RollImg'].filters.blendTrans.play();
			} catch (e){ }
			if(cliImg == '') {
				cliImg = ci;
				cliImgSrc = ci.src;
				ci.src = numimg[n];
			} else if(cliImg != ci) {
				cliImg.src = cliImgSrc;
				cliImg = ci;
				cliImgSrc = ci.src;
				ci.src = numimg[n];
			}
		}
		window.onload = rotateStart;
		//-->
		</script>
		<base target="_blank" />
		<!--主栏目1开始-->
		<div class="width780" id="MainBody">
			<div class="MbLeft">
				<div class="TodayRecommend"><a onFocus="this.blur()" href="#" target="_blank" id="RollUrl" name="RollUrl"><img alt=""  src="blogimages/000.gif" name="RollImg" width="208" height="225" border="0" style1="filter: blendTrans(duration=1);" /></a></div>
				<div class="newgif"></div>
				<div class="PicButton"><img alt="" onClick="chki(this,0);" src="blogimages/01.gif" border="0" id="num_img0" /><img alt="" onClick="chki(this,1);" src="blogimages/02.gif" border="0" id="num_img1" /><img alt="" onClick="chki(this,2)" src="blogimages/03.gif" border="0" id="num_img2" /><img alt="" onClick="chki(this,3);" src="blogimages/04.gif" border="0" id="num_img3" /><img alt="" onClick="chki(this,4);" src="blogimages/05.gif" border="0" id="num_img4" /></div>
				<div id="TodayStar" class="TodayStar">
					<h1><img alt="" src="blogimages/star.gif" width="32" height="23" align="middle" />最新博客</h1>
					<div class="TodayStarPicBlock">
					<%
					sql="select top 2 clubuser_id,clubuser_name,userimg from clubuser where payuser<>3 and bokeer=1 order by postnum desc"
                    Set rs= Server.CreateObject("ADODB.Recordset")
                    rs.open sql,conn,3,1
					i=0
					do while not rs.eof
					   if i>=2 then exit do
					%>
						<div class="TodayStarPic">
							<a href="home.asp?userid=<%=rs("clubuser_id")%>"><img alt="<%=rs("clubuser_name")%>" src="userheadimg/<%=rs("userimg")%>" width="89" height="75" border="0" /></a><div><a href="home.asp?userid=<%=rs("clubuser_id")%>"><%=rs("clubuser_name")%></a></div>
						</div>
					<%
					i=i+1
					rs.movenext
					loop
					rs.close
					%>
					</div>
				</div>
			</div>
			<div class="MbCenter">
				<!--站内搜索开始-->
				<div class="SearchForm">
					<form method="post" action="search.asp" style="display: inline;" target="_self">
						
        <input name="searchcontent" type="text" size="21" />
        <select name="searchkind" style="background-color:#ffffff;FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-STYLE: normal; WIDTH: 65px">
                  <option value="title" selected>按主题</option>
                  <option value="user_id" >按作者</option>
				  <option value="menu" >按内容</option>
                </select>
							</span>
						</span>
						<button name="loginsubmit" type="submit" value="true"><span class="search">Search</span></button>
      <select name="select3"  style="background-color:#ffffff;FONT-FAMILY: Arial; FONT-SIZE: 9pt; FONT-STYLE: normal; WIDTH: 83px" size=1 onChange="javascript:changeCssStyle();">
        <option  value="1" selected style="color:#799AE1">■标准风格</option>
        <option value="0" style="color:#66ABD9">■浅蓝风格</option>
      </select>
					</form>
				</div>
				<!--站内搜索结束-->
				<!--最新发表开始-->
				<div class="TitleMore">
				<div class="left"><img src="blogimages/green_arrow.gif" align="middle" />
				 <a class="menu" href="main.asp" target="_self" title="查看更多最新回贴">最新回贴</a></div>
                 <div class="right"><a class="menu" href="main.asp?order_key=dateh" target="_self" title="查看更多最新主题">最新主题</a></div>
				</div>
				<div class="NewlyPost">
					<!--<h3><img alt="" src="blogimages/green_arrow.gif" align="middle" />最新贴子</h3>-->
					<div class="NewlyPostList">
					<ul>
					<%
					sql="select top 15 id,title,htmfilename,dateh,redate from bbstitle where "&strqs&" deleted=0 order by redate desc"
                    Set rs= Server.CreateObject("ADODB.Recordset")
                    rs.open sql,conn,3,1
					do while not rs.eof
					title=rs("title")
					if len(title)>22 then
					title=left(title,20)&"..."
					end if
					%>
					<li class="topth"><em><%=formatdate(rs("redate"))%></em>·<a title="<%=title%>" href="ftbbs.asp?id=<%=rs("id")%>" target="_blank"><%=title%></a></li>
					<%
					rs.movenext
					loop
					rs.close
					%>
					</ul>
					</div>
				</div>
				<!--最新发表结束-->
			</div>
			<div class="MbRight">
			<div id="MemberLogin" class="MemberLogin">
<%
if request.cookies("name")="" then
   call FTBBS_HTML_MB
   getcodeoff=Application("FTBBSMB")(30,0)
%>
					<form method="post" action="userlogin.asp?flag=Y" target="_top" style="display: inline;">
						<div style="height: 22px;"></div>
						<div class="MemberName">
							<span>用户名</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="bbsuser" type="text" size="8" style="width:90px" />
						</div>
						<div class="MemberPassword">
							<span>密　码</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="password" type="password" size="8" style="width:90px" />
						</div>
						<%if getcodeoff=1 and session("errorlogin")>=3 then%>
						<div class="ValidateCode">
							<span>验证码</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="codestr" type="text" size="3" />&nbsp;<%response.write getcode%>
						</div>
						<%end if%>
						<div class="MemberOptions">
							<span>保　存</span>&nbsp;&nbsp;&nbsp;<span class="outbdr2"><span>
          <select name="ckies" id="ckies" style="width:91px">
            <option value="0" selected="selected">不保存</option>
            <option value="1">保存一天</option>
            <option value="30">保存一月</option>
            <option value="365">保存一年</option>
          </select>
		  <input type="hidden" name="act" value="y">
		  <input type="hidden" name="reurl" value="default.asp">
		  </span></span>
						</div>
						<div style="height: 6px;"></div>
						<div class="LoginButton">
							<button class="LoginButton" name="loginsubmit" type="submit" value="true" style="width: 60px;">登录</button>&nbsp;&nbsp;
							<button class="LoginButton" name="loginsubmit" type="button" value="true" onClick="javascript:window.location.href='default.asp?n=regist'" style="width: 60px;">注册</button>
						</div>
					</form>
				</div>
<%
else
  sql="SELECT top 1 clubuser_id,clubuser_name,jingyuan,postnum,clubuser_reg_date,clubuser_enter_count,bokeer FROM clubuser where clubuser_name='"&request.cookies("name")&"'"
  set rsx=server.createobject("adodb.recordset")
  rsx.open sql,conn,1,1
  userid=rsx("clubuser_id")
%>
					<div style="height: 22px;"></div>
					<div style=" margin:0px; padding:0px 0px 0px 15px; line-height:18px; height:98px;">
						欢迎<%=request.cookies("name")%>的到来 <br /> 
						用户经验：<%=rsx("jingyuan")%> <br />
						发贴数量：<%=rsx("postnum")%> <br />
						登录次数：<%=rsx("clubuser_enter_count")%> <br />
						注册时间：<%=formatdatetime(rsx("clubuser_reg_date"),2)%> 
					</div>
						<div style="height: 1px;"></div>
						<div class="LoginButton">
							<button class="LoginButton" name="loginsubmit" type="button" value="true" onClick="javascript:window.location.href='default.asp?n=userinfo'" style="width: 40px;">修改</button>&nbsp;&nbsp;
							<button class="LoginButton" name="loginsubmit" type="button" value="true" onClick="javascript:window.location.href='main.asp?exit=yes'" style="width: 40px;">退出</button>
						</div>
				</div>
<%
rsx.close
end if
%>
				<div class="HotSpace"  id="t_1" name="t_1">
				    <h2>发贴排行榜</h2><h4><a class="menu" href="javascript:show_tbl('t_',2,2)" target="_self">版块排行榜</a></h4>
					<ul>
					<%
					sql="select top 10 clubuser_id,clubuser_name,postnum from clubuser where payuser<>3 order by postnum desc"
                    Set rs= Server.CreateObject("ADODB.Recordset")
                    rs.open sql,conn,3,1
					m=0
					do while not rs.eof
					   if m>=10 then exit do
					%>
					<li><img alt="" src="images/ftbbs_img_<%=m+1%>.gif" align="absmiddle" /> <a title="<%=rs("clubuser_name")%>" href="home.asp?userid=<%=rs("clubuser_id")%>"><%=rs("clubuser_name")%>&nbsp;&nbsp;&nbsp;&nbsp;发贴数:<%=rs("postnum")%></a></li>
				    <%
					m=m+1
				    rs.movenext
				    loop
				    rs.close
				    %>
					</ul>
			   </div>
				<div class="HotSpace" id="t_2" name="t_2" style="display:none">
					<h1><a class="menu" href="javascript:show_tbl('t_',2,1)" target="_self">发贴排行榜</a></h1><h3>版块排行榜</h3>
					<ul>
					<%
					sql="select top 10 BBS_Cate_Name,BBS_Cate_ID,BBS_Cate_PID,BBS_Cate_Topic,BBS_Cate_Qs from BBS_Cate where BBS_Cate_PID<>'0' and deleted=0 order by BBS_Cate_Topic desc"
                    Set rs= Server.CreateObject("ADODB.Recordset")
                    rs.open sql,conn,3,1
					m=0
					do while not rs.eof
					   if m>=10 then exit do
					%>
					<li><img alt="" src="images/ftbbs_img_<%=m+1%>.gif" align="absmiddle" /> <a href="main.asp?layer_1=<%=rs("BBS_Cate_PID")%>&layer_2=<%=rs("BBS_Cate_ID")%>&qs=<%=rs("BBS_Cate_Qs")%>" target="_self"><%=rs("BBS_Cate_Name")%>&nbsp;&nbsp;&nbsp;&nbsp;贴子数:<%=rs("BBS_Cate_Topic")%></a></li>
				    <%
					m=m+1
				    rs.movenext
				    loop
				    rs.close
				    %>
					</ul>
			   </div>
			</div>
		</div>
		<!--主栏目1结束-->
		<div class="mytag_list" style="margin-top: 0px;"></div>
		<!--广告条开始-->
		<!--<div class="width780" style="margin-top: 8px;"><img alt="" src="images/ad.gif" width="780" height="86" /></div>-->
		<!--广告条结束-->
		<!--文章导航区开始-->
		<div class="ArticleBlock">
			<div class="ArticleNavCenter">
				<h1><img alt="" src="blogimages/left01.gif" align="middle" /> 推荐/精华</h1>
				<ul>
					<li>&nbsp;</li>
				</ul>
				
    <h2><a href="main.asp" target="_self"><img src="blogimages/more3.gif" alt="" border="0" style="padding-top:4px;" /></a></h2>
			</div>
		</div>
		<!--文章导航区结束-->
		<!--推荐阅读开始-->
		<div class="CommendRead">
			<div class="Left">
				<h3><img alt="" src="blogimages/icon_quote.gif" align="middle" /><font color="#000000">新置顶贴</font></h3><div>
				<%
				sql="select top 10 id,title from bbstitle where "&strqs&" deleted=0 and (bbstop=1 or bbstop1=1) order by redate desc"
                Set rs= Server.CreateObject("ADODB.Recordset")
                rs.open sql,conn,3,1
				k=0
				do while not rs.eof
				if k>9 then exit do
				title=rs("title")
				if len(title)>15 then
				title=left(title,12)&"..."
				end if
				%>
				<h2> ·<a title="<%=title%>" href="ftbbs.asp?id=<%=rs("id")%>" target="_blank"><%=title%></a></h2>
				<%
				k=k+1
				rs.movenext
				loop
				rs.close
				%>
				</div>
			</div>
			<div class="CenterAndRight">
				<div class="Content">
					<h1><img alt="" src="blogimages/green_arrow.gif" width="12" height="17" align="middle" /><a href="main.asp?sign=1" target="_self"><font color="#000000">新推荐贴</font></a></h1>
					<ul>
					<%
					sql="select top 10 id,title from bbstitle where "&strqs&" deleted=0 and sign=1 order by redate desc"
                    Set rs= Server.CreateObject("ADODB.Recordset")
                    rs.open sql,conn,3,1
					do while not rs.eof
					title=rs("title")
					if len(title)>21 then
					title=left(title,19)&"..."
					end if
					%>
					<li class="topth">·<a title="<%=title%>" href="ftbbs.asp?id=<%=rs("id")%>" target="_blank"><%=title%></a></li>
					<%
					rs.movenext
					loop
					rs.close
					%>
					</ul>
				</div>
			</div>
			<div class="CenterAndRight">
				<div class="Content">
					<h1><img alt="" src="blogimages/green_arrow.gif" width="12" height="17" align="middle" /><a href="main.asp?huati=1" target="_self"><font color="#000000">新精华贴</font></a></h1>
					<ul>
					<%
					sql="select top 10 id,title from bbstitle where "&strqs&" deleted=0 and huati=1 order by redate desc"
                    Set rs= Server.CreateObject("ADODB.Recordset")
                    rs.open sql,conn,3,1
					do while not rs.eof
					title=rs("title")
					if len(title)>21 then
					title=left(title,19)&"..."
					end if
					%>
					<li class="topth"> <a title="<%=title%>" href="ftbbs.asp?id=<%=rs("id")%>" target="_blank"><%=title%></a></li>
					<%
					rs.movenext
					loop
					rs.close
					%>
					</ul>
				</div>
			</div>
		</div>
		<!--推荐阅读结束-->
		<!--相册导航区开始-->
		<div class="ArticleBlock">
			<div class="ArticleNavCenter">
				<h1><img alt="" src="blogimages/left01.gif" align="middle" /> 精选图片</h1>
				<ul>
					<li>&nbsp;</li>
				</ul>
				<h2><a href="morepic.asp" target="_self"><img src="blogimages/more3.gif" alt="" border="0" style="padding-top:4px;" /></a></h2>
			</div>
		</div>
		<!--相册导航区结束-->
		<!--最新图片/相册开始-->
		<div id="NewlyPhotos" class="width780">
		<%
		sql="select top 12 bbstitle.id,bbstitle.title,ftbbs_upload.upload_pic,ftbbs_upload.upload_htm,ftbbs_upload.userid from bbstitle,ftbbs_upload where bbstitle.htmfilename=ftbbs_upload.upload_htm and bbstitle.deleted=0 and ftbbs_upload.sign=0 and ftbbs_upload.bbs_blog_type=0 and (ftbbs_upload.upload_ext='jpg' or ftbbs_upload.upload_ext='gif') order by bbstitle.id desc"
        set rs=server.createobject("adodb.recordset")
        rs.open sql,conn,3,1
		if not rs.eof then
		   picnum=rs.RecordCount
		   for i = 0 to rs.RecordCount
		   if i>=12 or rs.eof then exit for
		   photo_name=rs("userid")
		%>
		<h1><a href="ftbbs.asp?id=<%=rs("id")%>"><img src="<%=rs("upload_pic")%>" alt="<%=rs("title")%>" width="110" height="110" border="0" /></a></h1>
		<%
		  rs.movenext
		  next
		end if
		  rs.close
		  set rs=nothing
		%>
		</div>
		
<!--最新图片/相册结束-->
<!-- 版权声明开始 -->
<!--#include file="copyright.htm" -->
<!-- 版权声明结束 -->
<script>
if(stylecook=='' || stylecook == '0' )
{
stylecook=0;
}
document.all.select3.value=stylecook;
</script>
</body>
</html>
<%
Function formatdate(Ftbbs_Time)
   Ftbbs_Year = right(Year(Ftbbs_Time),2)
   Ftbbs_Month = Month(Ftbbs_Time) 
   Ftbbs_Day = Day(Ftbbs_Time) 
   Ftbbs_Hour = Hour(Ftbbs_Time) 
   Ftbbs_Minute = Minute(Ftbbs_Time) 
   Ftbbs_Second = Second(Ftbbs_Time)
   if len(Ftbbs_Month)=1 then Ftbbs_Month="0"&Ftbbs_Month
   if len(Ftbbs_Day)=1 then Ftbbs_Day="0"&Ftbbs_Day
   if len(Ftbbs_Hour)=1 then Ftbbs_Hour="0"&Ftbbs_Hour
   if len(Ftbbs_Minute)=1 then Ftbbs_Minute="0"&Ftbbs_Minute
   if len(Ftbbs_Second)=1 then Ftbbs_Second="0"&Ftbbs_Second
   formatdate = Ftbbs_Year & "-" & Ftbbs_Month & "-" & Ftbbs_Day & " " & Ftbbs_Hour & ":" & Ftbbs_Minute & ":" & Ftbbs_Second
End Function
closedb
%>