<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=SiteName%>-powered by aspcms</title>
<link href="css/reset.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">

<div id="toolbar">
  <div>
    <ul>
    <%
	
	function RemoveHTML(fString)
  dim   re   
  set   re   =   New   RegExp   
  re.Global   =   True   
  re.IgnoreCase   =   True   
  if   not   isnull(fString)   then   
  re.Pattern   =   "<(.[^>]*)>"   
  fString   =   re.Replace(fString,"") 
   fString   =  Replace(fString,"&nbsp;","")  
  RemoveHTML   =   fString   
  end   if 
end function
set rslink=server.createobject("adodb.recordset")
execlink="select * from link order by id desc"		
rslink.open execlink,conn,1,1
do while not rslink.eof
%>

   <li <%if rslink("linkrl")="0" then%>class="fr"<%else%>class="fl"<%end if%>><a href="<%=rslink("link")%>" target="_blank"><%=rslink("title")%></a>&nbsp;</li>
    <%		
rslink.movenext
Loop
rslink.close
set rslink=nothing
%>
    
          </ul>
  </div>
</div><!-- toolbar End -->
<div style="background:#990606;">
<div id="banner">
	<div class="banner_bg">
	<div>
	
    </div>
    </div>
</div>
</div>
<!-- banner End -->
<div id="nav">
  <ul>
    <li class=""><span><a href="index.asp">首页</a></span></li>
  <%
 
set rsm=server.createobject("adodb.recordset")
exec="select * from menu order by pnum desc,id desc"		
rsm.open exec,conn,1,1
do while not rsm.eof
%>

    <li class=""><span><a href="About.asp?id=<%=rsm("id")%>"><%=rsm("title")%></a></span></li>
    <%		
Rsm.movenext
Loop
rsm.close
set rsm=nothing
%>
    <li class=""><span><a href="rank.asp">投票结果</a></span></li>
  </ul>
</div>
<!-- nav End -->
<div id="subNav">
  
</div><!-- subNav End -->

<!--Start Beacon Code v2-->


<!--End Beacon Code v2--><div id="main" class="clearfix" style="padding-top:15px;">
  <div class="colLeft">
    <div class="article bj">
      <div class="box_tit">
        <div>
          		    <h3 class="area_title">评选结果</h3>
		          </div>
      </div>
      <!-- box_tit End -->
      <div class="article_con">
        
        <div class="article_con_main" style="border-bottom:1px solid #ccc; margin-bottom:8px;">
        	<!--<h2>模范旅行—春秋</h2>-->
            <h2><font size="2" face="仿宋_GB2312"><table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#aec3de">
      <tr align="center" bgcolor="#F0F7FF" style="font-weight:bold">
        <td width="13%"><%if lb="rq" then response.write"人气" else response.write"票数" end if%>排名</td>
        <td width="23%">评选名称</td>
        <td width="9%">票数</td>
        <td width="9%">人气</td>
        <td colspan="2">百分比</td>
        </tr>
<%
 
set rssum=server.createobject("adodb.recordset")
exec="select sum(ps) as sumps from info"		
rssum.open exec,conn,1,1
sumps=rssum("sumps")



page=clng(request("page"))	
sql="select * from Info"
if lb="" or lb="ps" then 
  sql=sql & " order by ps desc"
end if
if lb="rq" then
  sql=sql & " order by rq desc"
end if
set rs=server.createobject("adodb.recordset") 
rs.open sql,conn,1,1
rs.PageSize=20
gs=rs.PageSize
if page=0 then page=1 
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
for j=1 to rs.PageSize 
mc=j+(page-1)*gs
%>
      <tr height="40px" align='center' bgcolor='#FFFFFF' onmouseover='this.style.background="#F2FDFF"' onmouseout='this.style.background="#FFFFFF"'>
		 <td><%if mc<4 then response.write"<b>"&mc&"</b>" else response.write""&mc&"" end if%></td>
         <td align='center' ><%=rs("title")%></td>
         <td><%=rs("ps")%></td>
		 <td><%=rs("rq")+rs("ps")%></td>
         <td width="6%" align="left"><%=FormatNumber(((rs("ps")/sumps)*100)) %>%</td>
         <td width="40%" align="left"><table width="95%" border="0" cellpadding="5" cellspacing="5" bordercolor="#666666">
  <tr>
    <td style="border-top-width: 1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-top-style: solid;border-right-style: solid;border-bottom-style: solid;border-left-style: solid;border-top-color: #999999;border-right-color: #999999;border-bottom-color: #999999;border-left-color: #999999;"><table width="<%=FormatNumber(((rs("ps")/sumps)*100)) %>%" border="0">
      <tr height="20px">
        <td bgcolor="#3399FF">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table></td>
       </tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
        <tr align="center" bgcolor="#ffffff">
          <td colspan="6">
<%if Page<2 then      
    response.write "首页 上一页 "
  else
    response.write " <a href=?lb="&lb&"&page=1>首页</a> "
    response.write " <a href=?lb="&lb&"&page="&page-1&">上一页</a> "
  end if
  if rs.pagecount-page<1 then
    response.write " 下一页 尾页 "
  else
    response.write " <a href=?lb="&lb&"&page="&(page+1)&">"
    response.write "下一页</a> <a href=?lb="&lb&"&page="&rs.pagecount&">尾页</a> "
  end if
   response.write " 页次：<font color=red>"&page&"</font>/"&rs.pagecount&"页 "
   response.write " 共<font color=red>"&rs.recordcount&"</font>条记录 "&rs.pagesize&"条/页"    
%></td>
       </tr>
<%
rs.close
set rs=nothing
%>
      </table>
            </font></h2>			<div style="height:32px; margin-bottom:12px;">
				<!-- JiaThis Button BEGIN -->
				

				<!-- JiaThis Button END -->		
			</div>
        </div>
      </div>
   
	  
    </div>
    <!-- article End -->
  </div>
  <!-- colLeft End -->
  <div class="colRight">
    <div class="area" style="margin-bottom:0; margin-top:10px;">
      <div class="area_tit"><h3><span class="fr"><a href="about.asp?id=3" target="_blank">更多>></a></span><%
		  sqlleft="Select * from Menu where id=3"
			Set rsleft=conn.execute(sqlleft)
			if not rsleft.eof then
				response.Write(rsleft("title"))
			end if
		  %></h3></div>
      <div class="area_con">
        <div>
<!--          <h4>主要奖项</h4> -->
          <ul>
          <%
		  sqlleft="Select * from Menu where id=3"
			Set rsleft=conn.execute(sqlleft)
			if rsleft.eof then
				Response.Write("<script>alert('不存在的信息或者尚未通过审核!');location='index.asp';</script>")
				Response.End()
			else
			response.Write(left(rsleft("content"),200)&"...")
			end if
		  %>
          </ul>
        </div>

      </div>
    </div>
    <div class="area" style="margin-bottom:0; margin-top:10px;">
      <div class="area_tit"><h3><span class="fr"><a href="about.asp?id=2" target="_blank">更多>></a></span><%
		  sql="Select * from Menu where id=2"
			Set rs=conn.execute(sql)
			if not rs.eof then
			response.Write(rs("title"))
			end if
		  %></h3></div>
      <div class="area_con">
        <div>
<!--          <h4>主要奖项</h4> -->
          <ul>
           <%
		  sql="Select * from Menu where id=2"
			Set rs=conn.execute(sql)
			if rs.eof then
				Response.Write("<script>alert('不存在的信息或者尚未通过审核!');location='index.asp';</script>")
				Response.End()
			else
			response.Write(left(rs("content"),400)&"...")
			end if
		  %>
          </ul>
        </div>

      </div>
    </div>
    <!-- area End -->
        </div>
    
  <!-- colRight End -->
  <div class="main_bottom"></div>
</div>
<!-- main End -->
<div id="footer">
  
  <div><%=Copyright%><br>
powered by <a href="http://www.aspcms.com" target="_blank">aspcms</a></div>
</div><!-- footer End -->

</body>
</html>
