<div align="center">
  <%if topfont=1 then%>
</div>
<table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="31"><img src="Images/ec_06.gif" width="196" height="31" /></td>
  </tr>
  <tr>
    <td height="123"><form action='<%=BbsPath%>login.asp?action=chk' method="post" name="user" id="user" onsubmit="return checkdata();">
      <table width="100%" border="0" cellpadding="3" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse">
        <tr>
          <td width="100%" align="center"><br />
                <%if UserTableType = "EChuang" then		'不整合%>
            用户名称：
            <input maxlength="20" name="UserName" size="8" />          </td>
        </tr>
        <tr>
          <td width="100%" align="center">用户密码：
            <input maxlength="20" name="Password" size="8" type="password" />          </td>
        </tr>
        <tr>
          <td width="100%" align="center"><input type="submit" name="submit" value="登 陆" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onmouseover ="this.style.backgroundColor='#24F708'" onmouseout ="this.style.backgroundColor='#EAEAF4'" title="登录论坛" />
                <p><a class="middle" href="<%=BbsPath%>" target="_blank">[进入]</a> <a class="middle" href="<%=BbsPath%>reg.asp" target="_blank";;;>[用户注册]</a> <a class="middle" href="<%=BbsPath%>lostpass.asp" target="_blank">[忘密]</a><br />
                    <%else%>
                    <%if UserTableType = "Dvbbs" then%>
                    <%if Request.cookies(eChuang)("username")="" then%>
                    <br />
                    <br />
                    <font color="red">功能入口 <br />
                    <br />
                      请先登录系统</font> <br />
                  <br />
                  <%else%>
                  <%loginuser=Request.cookies(eChuang)("UserName")
				set rs10=server.CreateObject("ADODB.RecordSet")
				rs10.Source="select * from "& db_User_Table &" where "& db_User_Name &"='"&loginuser&"'"
				rs10.Open rs10.Source,ConnUser,1,1
				if not rs10.eof then%>
                  <%if rs10(db_User_Face)<>"" then%>
                  <img src="<%=BbsPath%><%=rs10(db_User_Face)%>" border="0" width="<%=rs10(db_User_Facewidth)%>" height="<%=rs10(db_User_Faceheight)%>" />
                  <%''显示用户头像，加'bbs/'前缀路径,使图文系统直接显示定向到论坛头像%>
                  <%else%>
                  <img src="images/nopic.gif" border="0" />
                  <%end if%>
                  <%rs10.close
					set rs10=nothing%>
                  <br />
                  <font color="red">欢迎您 <%=Request.cookies(eChuang)("UserName")%> !</font> <br />
                  <br />
                  <a href="<%=BbsPath%>" target="_blank">进入论坛</a>
                  <%end if%>
                  <%end if%>
                  <%end if%>
                  <%end if%>
              </p></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<center>
    <%end if%>
  </center>
  <center>
    <table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="28"><img src="Images/ec_15.gif" width="196" height="28" /></td>
    </tr>
    <tr>
      <td><a href="mailto:cocms@163.com"><img src="Images/ec_16.gif" width="196" height="42" border="0" /></a></td>
    </tr>
    <tr>
      <td><a href="#"><img src="Images/ec_19.gif" width="196" height="45" border="0" /></a></td>
    </tr>
    <tr>
      <td><a href="#"><img src="Images/ec_22.gif" width="196" height="43" border="0" /></a></td>
    </tr>
    <tr>
      <td><a href="#"><img src="Images/ec_23.gif" width="196" height="43" border="0" /></a></td>
    </tr>
    <tr>
      <td><img src="Images/ec_24.gif" width="196" height="39" /></td>
    </tr>
  </table>
  <table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="29" valign="middle"><div align="center"><img src="Images/ec_36.gif" width="196" height="24" /></div></td>
    </tr>
    <tr>
      <td height="173" valign="top"><div align="center">
          <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="94%" id="AutoNumber5">
            <% 
dim ii
ii = 0
if DbType = "MSSQL" then
		rs.Source="select top " & top_txt & " * from "& db_News_Table &" where updatetime>'"& now()-30 &"' and checkked=1 order by click DESC"   '选择本月
else
		rs.Source="select top " & top_txt & " * from "& db_News_Table &" where (updatetime>now()-30) and checkked=1 order by click DESC"   '选择本月
end if
rs.Open rs.Source,conn,1,1
if rs.bof and rs.eof then 
	response.write "<tr><td align=center><br>暂 无<br><br></td></tr>" 
else 
	do while not rs.eof%>
            <tr>
              <td height="18"> ·
                <%if rs("picnews")=1 then%>
                  <img src="images/news_img.gif" />
                  <%end if%>
                <a class="middle" href="E_ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=htmlencode4(rs("title"))%>" target="_blank" ><%=CutStr(htmlencode4(rs("title")),20)%></a> </td>
            </tr>
            <% ii = ii + 1
    if ii>top_txt-1 then exit do
	rs.movenext     
	loop
end if  
rs.close   
set rs=nothing%>
          </table>
      </div></td>
    </tr>
  </table>
  <%if showspecial="1" then%>
  <table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="29" valign="middle"><img src="Images/ec_29.gif" width="196" height="24" /></td>
    </tr>
    <tr>
      <td height="170" valign="top"><div align="left">
          <%if showspecial=1 then%>
          <%set rs2=server.CreateObject("ADODB.RecordSet")  '专题
rs2.Source="select Top " & top_sp & " * from "& db_Special_Table &"  order by SpecialID DESC "
rs2.Open rs2.Source,conn,1,1
if not rs2.EOF then
while not rs2.EOF

TrString="&nbsp;·&nbsp;<a class=class href='Special_News.asp?SpecialID=" & rs2("SpecialID") &"'>" & trim(CutStr(htmlencode4(rs2("E_SpecialName")),22)) & "</a><br>"
Response.Write TrString

rs2.MoveNext
wend
%>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="class" href="E_Special.asp">更多专题...</a>
        <%
else
Response.Write "<tr><td width=100% align=center height=40>暂无专题</td></tr>"
end if
rs2.Close
set rs2=nothing

  
%>
      </div></td>
    </tr>
  </table>
  <%end if%>
  <%if showvote="1" then%>
  <table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="173" height="29" valign="middle"><img src="Images/ec_38.gif" width="196" height="25" /></td>
    </tr>
    <tr>
      <td height="160" valign="top"><div align="center">
          <table width="173" border="0" cellspacing="0" cellpadding="0">
            <%
		set rs=conn.execute("SELECT * FROM " & db_Vote_Table & " where IsChecked=1") 
		if rs.eof then
		%>
            <tr>
              <td><div align="center">尚无任何投票</div></td>
            </tr>
            <%else%>
            <tr>
              <td><div align="center"><b> </b><%=rs("Title")%></div></td>
            </tr>
            <form action="E_Vote.asp" method="post" name="research" target="newwindow" id="research">
              <tr>
                <td><div align="left">
                    <%
for i=1 to 8
	if rs("Select"&i)<>"" then
%>
                    <input style="border: 0" <%if i=1 then%>checked<%end if%> name="Options" type="radio" value="<%=i%>" />
                    <%=i%>.<%=rs("Select"&i)%><br />
                    <%	end if
next
%>
                </div></td>
              </tr>
              <tr>
                <td height="48"><div align="center">
                    <input style="cursor:hand" type="submit" value="投它一票" id="submit1" name="submit1" />
                    <input onclick="javascript:vote()" type="button" value="查看结果" id="button1" name="button1" style="cursor:hand" />
                </div></td>
              </tr>
            </form>
            <%end if%>
          </table>
      </div></td>
    </tr>
  </table>
  <%end if%>
  <% if showdata=1 then%>
  <table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="29" valign="middle"><img src="Images/ec_40.gif" width="196" height="24" /></td>
    </tr>
    <tr>
      <td height="155" valign="top"><div align="center">
          <table width="147" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><%								
		function gettipnum()
			dim tmprs
			tmprs=conn.execute("Select Count(NewsID) from "& db_News_Table &" where checkked=1")
			gettipnum=tmprs(0)
			set tmprs=nothing
			if isnull(gettipnum) then gettipnum=0
		end function

		function todays()
			dim tmprs
			tmprs=conn.execute("Select count(NewsID) from "& db_News_Table &" Where checkked=1 and year(updatetime)="& year(date()) &" and month(updatetime)="& month(date()) &" and day(updatetime)="& day(date()) &"")
			todays=tmprs(0)
			set tmprs=nothing
			if isnull(todays) then todays=0
		end function

		function getusernum()
			dim rs
			rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &"")
			getusernum=rs(0)
			set rs=nothing
			if isnull(getusernum) then getusernum=0
		end function

		function getgg()
			dim rs
			if db_Sex_Select = "EChuang" then
				rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"='男' ")
				getgg=rs(0)
				set rs=nothing
			else
				if db_Sex_Select = "Number" then
					rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"=1")
					getgg=rs(0)
					set rs=nothing
				end if
			end if
			if isnull(getgg) then getgg=0
		end function

		function getmm()
			dim rs
			if db_Sex_Select = "EChuang" then
				rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"='女' ")
				getmm=rs(0)
				set rs=nothing
			else
				if db_Sex_Select = "Number" then
					rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &" where  "& db_User_Sex &"=0")
					getmm=rs(0)
					set rs=nothing
				end if
			end if
			if isnull(getmm) then getmm=0
		end function

		function getother()
			dim rs
			if db_Sex_Select = "EChuang" then
				rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &" where  "& db_User_Sex &" = '保密' ")
				getother=rs(0)
				set rs=nothing
			else
				if db_Sex_Select = "Number" then
					rs=ConnUser.execute("Select Count("& db_User_ID &") from "& db_User_Table &" where  "& db_User_Sex &" <>1 and  "& db_User_Sex &"<>0 ")
					getother=rs(0)
					set rs=nothing
				end if
			end if
			if isnull(getother) then getother=0
		end function
		%>
                &nbsp;&nbsp;○- 今日文章：<font color="red"><%=todays()%></font><br />
                &nbsp;&nbsp;○- 文章总数：<font color="red"><%=gettipnum()%></font><br />
                &nbsp;&nbsp;○- 会员总数：<font color="red"><%=getusernum()%></font><br />
                <!--#include file=LastMember.asp -->
                <br />
                <%if showcount=1 then%>
                <script src="Cnt.asp"></script>
                <!--#include file=zx.asp -->
                <br />
                &nbsp;&nbsp;○- 当前在线：<font color="red"><%=i%></font><br />
                <%end if%></td>
            </tr>
          </table>
      </div></td>
    </tr>
  </table>
  <%end if%>
  <%if showuser=1 then%>
  <table width="196" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="29" valign="middle"><img src="Images/ec_40.gif" width="196" height="24" /></td>
    </tr>
    <tr>
      <td height="145" valign="top"><div align="center">
          <table width="173" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><div align="center">
                  <!--#include file="TopUser.asp" -->
              </div></td>
            </tr>
            <tr>
              <td><div align="center">
                  <!--#include file="Topdep.asp" -->
              </div></td>
            </tr>
          </table>
      </div></td>
    </tr>
  </table>
  <%end if%>

</center>
