<!--#include file="../conn.asp"-->
<!--#include file="Function.asp"-->
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color:#<%=Request.QueryString("BgColor")%>;
}
.text2 {
	font-size: 14px;
	color: #FF6600;
}
a:link {
	font-size: 12px;
	color: #336699;
}
a:visited {
	font-size: 12px;
	color: #336699;
}
a:hover {
	color: #FF3300;
}
-->
</style>
<%set pf_rs=Server.CreateObject(YWNT_TMS_RS)
sql="select pinfen,toupiao from YWNT_TMS_Movie where id="&NoSqlHack(Request.QueryString("pf_id"))&""
pf_rs.open sql,conn,1,1
pinfen=pf_rs("pinfen")
toupiao=pf_rs("toupiao")
pf_rs.close
set pf_rs=nothing
Select Case Request.QueryString("Action")
Case "Sever"
if request.cookies("pf_id")=""&Request.QueryString("pf_id")&"" and request.cookies("pf")="yes" then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" class="text2">
                  <font color="#FF3300"><b>你已经投过票了,请不要重复投票！</b></font><br>
                <a href="<%=Request.ServerVariables("HTTP_REFERER")%>">如果你的浏览器没有响应,请点击这里返回.</a>
				<meta http-equiv="refresh" content="3;URL=<%=Request.ServerVariables("HTTP_REFERER")%>"></td>
              </tr>
</table> 
<%else
set pf_rs=Server.CreateObject(YWNT_TMS_RS)
sql="select pinfen,toupiao from YWNT_TMS_Movie where id="&NoSqlHack(Request.QueryString("pf_id"))&""
pf_rs.open sql,conn,1,3
pf_rs("pinfen")=pf_rs("pinfen")+NoSqlHack(request("vote"))
pf_rs("toupiao")=pf_rs("toupiao")+1
response.cookies("pf")="yes"
response.cookies("pf_id")=""&Request.QueryString("pf_id")&""
Response.Cookies("pf").Expires=Date+1
Response.Cookies("pf_id").Expires=Date+1
pf_rs.update
pf_rs.close
set pf_rs=nothing%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" class="text2"> 
                  <font color="#FF3300"><b>谢谢你的支持，你的投票成功！</b></font><br>
                <a href="<%=Request.ServerVariables("HTTP_REFERER")%>">如果你的浏览器没有响应,请点击这里返回.</a>
				<meta http-equiv="refresh" content="3;URL=<%=Request.ServerVariables("HTTP_REFERER")%>"></td>
              </tr>
</table>
<%end if
Case "Style1"%>
<TABLE cellSpacing=0 cellPadding=0 width=290 border=0>
<TBODY>
<TR>
<TD width=190><TABLE cellSpacing=0 cellPadding=0 width=181 border=0>
<TBODY>
<TR>
<TD style="	font-size: 12px; ">投票：<%=Round(CLng(pinfen)/toupiao,2)%>分(共<%=toupiao%>票)</TD>
</TR>
<TR>
<TD><TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD><IMG height=9 src="images/e_pic_polline_incept.gif" width=3></TD>
<TD width="<%=int((CLng(pinfen)/toupiao)*18.1)%>" background="images/e_pic_polline_bg.gif"></TD>
<TD><IMG height=9 src="images/e_pic_polline_end.gif" width=4></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD><IMG height=12 src="images/e_pic_pollrule.gif" width=181></TD>
</TR>
</TBODY>
</TABLE></TD>
<TD vAlign=bottom width=100><TABLE cellSpacing=0 cellPadding=0 width=100 border=0>
<FORM name=vote_form action=pinfen.asp?pf_id=<%=Request.QueryString("pf_id")%>&Action=Sever&BgColor=<%=Request.QueryString("BgColor")%> method=post>
<TR>
<TD width=54><SELECT id=vote name=vote>
<OPTION selected>10</OPTION>
<OPTION>9</OPTION>
<OPTION>8</OPTION>
<OPTION>7</OPTION>
<OPTION>6</OPTION>
<OPTION>5</OPTION>
<OPTION>4</OPTION>
<OPTION>3</OPTION>
<OPTION>2</OPTION>
<OPTION>1</OPTION>
</SELECT>
</TD>
<TD width=46><INPUT type=image height=24 width=46 src="images/e_button_sure.gif" border=0 name=imageField2></TD>
</TR>
</FORM>
</TABLE></TD>
</TR>
</TABLE>
<% Case "Style2" %>					  
<LINK media=all href="images/stylespf.css" type=text/css rel=stylesheet>
<TABLE cellSpacing=0 cellPadding=0 width=300 border=0>
<TBODY>
<TR>
<TD width=161><UL class=star-rating>
  <LI class=current-rating style="width:<%=int((CLng(pinfen)/toupiao)*15)%>px;">Currently 3.5/5 Stars. </LI>
  <LI><A class=one-star 
  href="pinfen.asp?pf_id=<%=request("pf_id")%>&vote=2&Action=Sever&BgColor=<%=Request.QueryString("BgColor")%>" onMouseOver="pf1()" onMouseOut="pf()">1</A> </LI>
  <LI><A class=two-stars 
  href="pinfen.asp?pf_id=<%=request("pf_id")%>&vote=4&Action=Sever&BgColor=<%=Request.QueryString("BgColor")%>" onMouseOver="pf2()" onMouseOut="pf()">2</A> </LI>
  <LI><A class=three-stars  
  href="pinfen.asp?pf_id=<%=request("pf_id")%>&vote=6&Action=Sever&BgColor=<%=Request.QueryString("BgColor")%>" onMouseOver="pf3()" onMouseOut="pf()">3</A> </LI>
  <LI><A class=four-stars 
  href="pinfen.asp?pf_id=<%=request("pf_id")%>&vote=8&Action=Sever&BgColor=<%=Request.QueryString("BgColor")%>" onMouseOver="pf4()" onMouseOut="pf()">4</A> </LI>
  <LI><A class=five-stars 
  href="pinfen.asp?pf_id=<%=request("pf_id")%>&vote=10&Action=Sever&BgColor=<%=Request.QueryString("BgColor")%>" onMouseOver="pf5()" onMouseOut="pf()">5</A> </LI></UL></TD>
<TD width=142 vAlign=bottom id="player_title">投票：<%=Round(CLng(pinfen)/toupiao,2)%>分(共<%=toupiao%>票)</TD>
</TR>
</TABLE>
<script language="javascript">
function pf1()
{
document.getElementById("player_title").innerHTML='有点糟糕'
}
function pf2()
{
document.getElementById("player_title").innerHTML='勉强还行'
}
function pf3()
{
document.getElementById("player_title").innerHTML='值的观看'
}
function pf4()
{
document.getElementById("player_title").innerHTML='十分精彩'
}
function pf5()
{
document.getElementById("player_title").innerHTML='绝对经典'
}
function pf()
{
document.getElementById("player_title").innerHTML='投票：<%=Round(CLng(pinfen)/toupiao,2)%>分(共<%=toupiao%>票)'
}
</script>
<%end Select
call connclose()%>