<!--#include file="inc/conn.asp"-->
<%
wid=request("wid")
if wid="" or not isnumeric(wid) then
	response.write "搞什么!"
	response.end
end if
types=request("types")
if types="" or not isnumeric(types) then
	response.write "搞什么!"
	response.end
end if
	types=Cint(types)
if request("action")="d" or request("action")="c" then

	ip=getip()
	set rs=conn.execute("select * from ding where wid=" & wid & " and types=" & types & " and ip='"&ip&"'")
	if rs.bof and rs.eof then
		if types=1 then
			if request("action")="d" then
				conn.execute("update flv set d=d+1 where photoid=" & wid)
			elseif request("action")="c" then
				conn.execute("update flv set c=c+1 where photoid=" & wid)
			end if
		else
			if request("action")="d" then
				conn.execute("update mtv_photo set d=d+1 where id=" & wid)
			elseif request("action")="c" then
				conn.execute("update mtv_photo set c=c+1 where id=" & wid)
			end if
		end if
		conn.execute("insert into ding (ip,types,wid,addtime) values('"&ip&"',"&types&","&wid&",getdate())")
	else
		response.write "已投"
	end if
	response.redirect "ding.asp?wid="&wid&"&types="&types
end if
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="img/defult.css" type=text/css rel=stylesheet>
<LINK 
href="img/videonei.css" type=text/css rel=stylesheet>

<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
<%
if types=1 then
	sql="select d,c from flv where photoid=" & wid
else
	sql="select d,c from mtv_photo where id=" & wid
end if
set rs=conn.execute(sql)
if rs.bof and rs.eof then
	d=0
	c=0
else
	d=rs("d")
	c=rs("c")
end if
%>
<DL class=spxx>
<DIV></DIV>
<DIV class=spxxleft>
<ul class="public">
<ul class="public">
<P>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A class=font14 href="recorder.asp" 
            target=_blank><IMG src="../img/lzvideo.png"></A> <A class=font14 href="mv/make_mv.asp" 
            target=_blank><IMG src="../img/mvvideo.png"></A> <A class=font14 href="upload.asp" 
            target=_blank><IMG src="../img/upvideo.png"></A> </P>
  <P><SPAN></SPAN> <br></P>
  <P>   
<SPAN>无法正常播放</SPAN>请升级Flash播放器<a href="GetFlash9.exe" class="gray_link" style="color:#039AF4;" target="_blank">本地下载</a>&nbsp;<a href="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" class="gray_link" style="color:#039AF4;" target="_blank">官方下载</a>
</P>
   </DIV>
  <DIV class=spxxright>
  <DL class=spxxicon>
    <DT id=diggest_good><a style="cursor:hand" hre="#" onClick="location.href='?action=d&amp;types=<%=types%>&amp;wid=<%=wid%>'"><IMG 
    src="img/spxxicon1.gif"></A>
    <DD>有<B><FONT face=隶书 color=#f70938 size=2>(<%=d%>)</STRONG></FONT></B>人叫好</DD></DL>
  <DL class=spxxicon2>
    <DT id=diggest_bad><a style="cursor:hand" hre="#" onClick="location.href='?action=c&amp;types=<%=types%>&amp;wid=<%=wid%>'"><IMG 
    src="img/spxxicon2.gif"></A>
    <DD>有<FONT face=隶书 color=#f70938 size=2><STRONG>(<%=c%>)</STRONG></FONT>人砸他
</DD></DL></DIV></DD></DL><!--spxx end -->
<%
Function getIP() 
Dim strIPAddr 
If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then 
 strIPAddr = Request.ServerVariables("REMOTE_ADDR") 
ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then 
 strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1,InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1) 
ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then 
 strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1) 
Else 
 strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
End If 
getIP =Trim(Mid(strIPAddr, 1, 30)) 
End Function 
%>
</body>
</html> 