<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% response.charset="utf-8" %>
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="../Include/Const.asp" -->
<!--#include file="../manage/Ameav_SqlIn.Asp"-->
<!--#include file="../manage/lockyou.asp"-->
<%
dim rs,sql,SiteTitle,SiteUrl,ComName,Address,ZipCode,Telephone,Fax,Email,Keywords,Descriptions,IcpNumber,MesViewFlag ,Centerv,ViewFlag,vex,UserID
dim memclock,ersh,plsh
set rs = server.createobject("adodb.recordset")
sql="select top 1 * from ameav_Site"
rs.open sql,conn,1,1
ersh=rs("ersh")
plsh=rs("plsh")
memclock=rs("memclock")
ViewFlag  =rs("ViewFlag")
SiteTitle=rs("SiteTitle")
SiteUrl=rs("SiteUrl")
ComName=rs("ComName")
Address=rs("Address")
ZipCode=rs("ZipCode")
Telephone=rs("Telephone")
Fax=rs("Fax")
Email=rs("Email")
Keywords=rs("Keywords")
Descriptions=rs("Descriptions")
IcpNumber=rs("IcpNumber")
MesViewFlag  =rs("MesViewFlag")
Centerv=rs("Content")
rs.close
set rs=nothing
if ViewFlag=0 then 
response.Write("<p align=center><font color=red>网站关闭投票中……</font></p>")
response.End()
end if
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select vex,ID From ameav_Members where MemName='"&session("MemName")&"'"
  rs.open sql,conn,1,1
  UserID=rs("ID")
  vex=rs("vex")
  rs.close
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2004-2008" />
<META NAME="Author" CONTENT="迅易人物评选" />
<META NAME="Keywords" CONTENT="<% =Keywords %>" />
<META NAME="Description" CONTENT="<% =Descriptions %>" />
<TITLE><% =SiteTitle %></TITLE>
<link rel="stylesheet" href="../Images/CssHtml.css">
<script type="text/javascript">var IMGDIR = '../images';var attackevasive = '0';var gid = 0;gid = parseInt('1');var fid = parseInt('26');var tid = parseInt('657440');</script>
<script language="javascript" src="../Script/Html.js"></script>
</HEAD>
<BODY>
<div align="center">
  <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFEFF">
    <tr>
      <td width="200" height="100"><img src="../Images/logo.jpg" width="200" height="90"></td>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="25" bgcolor="#FFFFFF"><%MemberLogin() %></td>
              <td align="right" bgcolor="#FFFFFF"><%Search()%></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="60"><%=advs(16)%></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <table width="950" height="31" border="0" cellpadding="0" cellspacing="0"  background="../Images/lanbj.gif" >
    <tr>
      <td valign="bottom"><table width="100%"  border="0" cellspacing="0" cellpadding="0" align="center"  height="31">
          <%=HeadNavigation()%>
      </table></td>
    </tr>
  </table>
  <table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td><%=advs(15)%></td>
    </tr>
  </table>
</div>
<%
function WebMenu()
  response.write"<table width='160' border='0' cellspacing='0' cellpadding='0'>"
  response.write "<tr class='WebMenu'><td width='24'><img src='../Images/Arrow_03.gif' width='13' height='13'></td>" &_
                 "<td><a href='MemberInfo.asp'>我的资料</a></td></tr>"
  response.write "<tr class='WebMenu'><td width='24'><img src='../Images/Arrow_03.gif' width='13' height='13'></td>" &_
                 "<td><a href='Membernews.asp'>我的新闻</a></td></tr>"
  response.write "<tr class='WebMenu'><td width='24'><img src='../Images/Arrow_03.gif' width='13' height='13'></td>" &_
                 "<td><a href='Membertion.asp'>我的作品</a></td></tr>"
  response.write "<tr class='WebMenu'><td width='24'><img src='../Images/Arrow_03.gif' width='13' height='13'></td>" &_
                 "<td><a href='MemberLogin.asp?Action=Out'>退出登录</a></td></tr>"
  response.write"</table>"
end function
function WebMenv()
  response.write"<table width='160' border='0' cellspacing='0' cellpadding='0'>"
  response.write "<tr class='WebMenu'><td width='24'><img src='../Images/Arrow_03.gif' width='13' height='13'></td>" &_
                 "<td><a href='MemberInfo.asp'>我的资料</a></td></tr>"
  response.write "<tr class='WebMenu'><td width='24'><img src='../Images/Arrow_03.gif' width='13' height='13'></td>" &_
                 "<td><a href='MemberLogin.asp?Action=Out'>退出登录</a></td></tr>"
  response.write"</table>"
end function

function HeadNavigation()
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from ameav_Navigation where ViewFlag  order by Sequence asc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    response.write "<tr><td height='30' align='center'><font color='white'>暂无导航链接</font></td></tr>"
  else
    response.write "<tr >"
    do
	  response.write "<td align='center' class='Navigation'><a href='"&rs("NavUrl")&"'>"&rs("NavName")&"</a></td>"
	  rs.movenext
	  if not rs.eof then response.write "<td width='1'><img src='../Images/Head_compart_liner.jpg' align='absmiddle'></td>"
	loop until rs.eof
    response.write "</tr>"
  end if
  response.write "<tr><td width='100%' height='1' colspan='"&rs.recordcount*2-1&"'></td></tr>"   
  rs.close
  set rs=nothing
end function



function Search()
response.write "<table width='100%' border='0' cellpadding='0' cellspacing='0'>" &_
               "<form action='Search.asp' method='post' name='SearchForm'>" &_
               "<tr><td align='right'><font color='red'>关键字：</font>&nbsp;<input name='Keyword' type='text' style='WIDTH: 80;' class='AllSearch'>" &_
               "&nbsp;<font color='red'>范　围：</font> &nbsp;<select name='Range' style='WIDTH:80;'>" &_
			   " <option value='Products'>品牌名称</option>" &_
			   " <option value='News'>品牌公司</option>" &_
			   "</select>" &_
			   "<input name='Login' type='submit' class='button' value='搜索' />" &_
               "&nbsp;&nbsp;</td></tr>" &_
               "</form>" &_
               "</table>"
end function
function TopVote1(Keyword)
  dim rs,sql,i,sumvote,start,rsi,sqli
  set rs = server.createobject("adodb.recordset")
  sql="select * from ameav_Products where ViewFlag  and SortPath  like '%" & Keyword &"%' order by ClickNumber desc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
     response.write "暂无相关信息"
  end if
  for i=1 to 10
    if rs.eof then exit for
	  sumvote=rs("hits")
	  if  sumvote<1000 then
	  start=1
	  elseif sumvote>1000 and sumvote<3000 then
	  start=2
	  elseif sumvote>3000 and sumvote<6000 then
	  start=3
	  elseif sumvote>6000 and sumvote<15000 then
	  start=4
	  elseif sumvote>15000 then	
	  start=5
	  end if
    response.write "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td width=20><img src='../images/"&i&".gif' border='0' ></td><td width=60 class='ListTitlv'   ><a href='AmvoteView.asp?ID="&rs("id")&"&SortID="&rs("SortID")&"'>"&left(rs("ProductName"),4)&"</a></td><td  width=80 class='ListTitlv' align=left><img src='../Images/"&start&"star.gif' title='"&start&"星级'/></td><td align=left width=80 class='ListTitlv' ><font color=red  >"&rs("ClickNumber")&"</font>&nbsp;&nbsp;票</td></tr></table>"
    rs.movenext
  next
  rs.close
  set rs=nothing
end function

function advs(adid)
  dim rs,sql,i,ProductName,NewFlag
  set rs = server.createobject("adodb.recordset")
  sql="select * from Ameav_ADs where  ViewFlag  and id="&adid&" order by id desc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    response.write "<div  align=center>暂无广告信息</div>"
  else
  if rs("fiewFlag")=0 then
  response.write"<div  align=center><a href='"&rs("Adurl")&"'><img src='"&rs("BigPic")&"' width='"&rs("ADsWidth")&"' height='"&rs("ADsHeight")&"' border='0' ></a></div>"
  else 
  response.write"<div  align=center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"&rs("ADsWidth")&"' height='"&rs("ADsHeight")&"'>"
  response.write"<param name='movie' value='"&rs("BigPic")&"'>"
  response.write"<param name='quality' value='high'>"
  response.write"<param name='wmode' value='transparent' />"
  response.write"<embed src='"&rs("BigPic")&"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"&rs("ADsWidth")&"' height='"&rs("ADsHeight")&"'></embed>"
  response.write"</object></div>"
  end if
  end if
  rs.close
  set rs=nothing
end function

function TopNews()
  dim rs,sql,i,NewsName
  set rs = server.createobject("adodb.recordset")
  sql="select ID,NewsName,SortID from ameav_News where ViewFlag order by id desc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
     response.write "暂无相关信息"
  end if

  for i=1 to 10
    if rs.eof then exit for
	  	if StrLen(rs("NewsName"))<=22 then
        NewsName=rs("NewsName")
	  else 
	    NewsName=StrLeft(rs("NewsName"),24)
	  end if
    response.write "<table ><tr><td><img src='../images/bg.gif' border='0'></td><td class='ListTitlv' width='90%'><a href=NewsView.asp?ID="&rs("ID")&"&SortID="&rs("SortID")&">"&NewsName&"</a></td></tr></table>"
    rs.movenext
  next
  rs.close
  set rs=nothing
end function

function MemberLogin() 
  if session("MemName")="" or session("GroupID")="" or session("MemLogin")<>"Succeed" then
    response.write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>" &_
                   "<form name='formLong' method='post' action='MemberLogin.asp'>" &_
                   "  <tr>" &_
                   "    <td >" &_
                   " &nbsp;&nbsp;用户名：<input name='LoginName' type='text' class='MemLogin' size='12' maxlength='10' />" &_
                   " 密  码：<input name='LoginPassword' type='password' class='MemLogin' size='12' maxlength='10' />" &_
                   "     <input name='Login' type='submit' class='button' value='登录' />" &_
                   "      <input name='Register' type='button' class='button' value='注册' onclick=""location.href='MemberRegister.asp'"" /> <input name='LostPass' type='button' class='button' value='忘密' onclick=""location.href='MemberLost.asp'"" /></td>" &_
                   "  </tr>" &_
                   "</form>" &_
                   "</table>" 
				     else
    response.write " &nbsp;&nbsp;您好，" &_
	               "<font style='font-family:Verdana,Arial,宋体;font-size:12px;color:#FF0000;font-weight: bold;'>"&session("MemName")&"</font>" &_
	               " ["&MemGroup(session("GroupID"))&"]" &_
	               " | <a href='MemberInfo.asp'><font color='#1874CD'>帐户管理</font></a> " &_
				   "<input name='LoginOut' type='button' class='button' onclick=""location.href='MemberLogin.asp?Action=Out'"" value='退出' />"
  end if

end function

function MemGroup(GroupID)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from ameav_MemGroup where GroupID='"&GroupID&"'"
  rs.open sql,conn,1,1
  MemGroup=rs("GroupName")
  rs.close
  set rs=nothing
end function

%>