<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: media_view.asp
' Version:3.0
' Date: 2005-11-5
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim id
response.buffer=true
stats="在线电影"
if not founduser then
	Errmsg=Errmsg+"<br>"+"<li>您还没有<a href=login.asp>登陆</a>，不能观看电影。如果您还没有<a href=reg.asp>注册</a>，请先<a href=reg.asp>注册</a>！"
	Founderr=true
end if
id=checkStr(Request("id"))
if id="" or not isnumeric(id) then
	Errmsg=Errmsg+"<br>"+"<li>参数错误！"
	Founderr=true
else
id=clng(id)
end if
call nav()
if founderr then
	call head_var("","")
	call Mslove_error()
else
	call head_var("在线电影","media.asp")
	if request("action")="" then
call main()
elseif request("action")="play" then
Call play()
end if
if founderr=true then call Mslove_error()
end if
call activeonline()
call footer()

sub main()
sql="select Typeid,Title,Mediapic,Files,Content,Hits,Audors,Address,Howlong,Viewtj,View_mo,View_ep,View_cp,Addtime,Checked from [Ms_media] where id="&id&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
if rs(14)=0 then
	Errmsg=Errmsg+"<br>"+"<li>对不起，该影片未审核！"
	Founderr=true
	exit sub
end if
%>
<table width="750" align=center cellpadding=3 cellspacing=1 class=tableborder1>
  <tr align="left"> 
    <th height="28" colspan="2"  class=tablebody1><%=rs(1)%></th>
  </tr>
  <tr align="center"> 
    <td width="209" height="220"  class=tablebody2> 
      <%if rs(2)<>"" then
	response.Write("<img src="&rs(2)&" border=0 width=200>")
	else
	response.Write("")
	end if%>
    </td>
    <td width="524" valign="top"  class=tablebody2> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="19%" height="22">影片名称：</td>
          <td width="81%"><%=rs(1)%></td>
        </tr>
        <tr> 
          <td height="22">领衔主演：</td>
          <td><%=rs(6)%></td>
        </tr>
        <tr> 
          <td height="22">影片类型：</td>
          <td>
            <%if rs(0)=1 then
		  response.Write("动作片")
		  elseif rs(0)=2 then
		  response.Write("喜剧片")
		  elseif rs(0)=3 then
		  response.Write("爱情片")
		  elseif rs(0)=4 then
		  response.Write("恐怖片")
		  elseif rs(0)=5 then
		  response.Write("战争片")
		  elseif rs(0)=6 then
		  response.Write("科幻片")
		  elseif rs(0)=7 then
		  response.Write("综艺片")
		  elseif rs(0)=8 then
		  response.Write("动画片")
		  elseif rs(0)=9 then
		  response.Write("连续剧")
		  elseif rs(0)=10 then
		  response.Write("剧情片")
		  elseif rs(0)=11 then
		  response.Write("其他")
		  end if%>
          </td>
        </tr>
        <tr> 
          <td height="22">出产地区：</td>
          <td><%=rs(7)%></td>
        </tr>
        <tr> 
          <td height="22">影片长度：</td>
          <td><%=rs(8)%></td>
        </tr>
        <tr> 
          <td height="22">推荐级别：</td>
          <td><%=rs(9)%> 级</td>
        </tr>
        <tr> 
          <td height="22">上传时间：</td>
          <td><%=rs(13)%></td>
        </tr>
        <tr> 
          <td height="22">观看次数：</td>
          <td><%=rs(5)%></td>
        </tr>
        <tr> 
          <td height="22">播放格式：</td>
          <td><img src="images/files/<%=rs(3)%>.gif" border=0></td>
        </tr>
        <tr> 
          <td height="28">用户属性：</td>
          <td>金币：<%=rs(10)%> 经验：<%=rs(11)%> 魅力：<%=rs(12)%></td>
        </tr>
        <tr> 
          <td height="30">在线播放：</td>
          <td><a href="media_view.asp?action=play&id=<%=id%>">点击播放</a></td>
        </tr>
      </table></td>
  </tr>
  <tr align="center"> 
    <td height="26" colspan="2" align="left"  class=tablebody1><img src="images/media/pen.gif" width="20" height="18"> 
      影片简介：</td>
  </tr>
  <tr align="center"> 
    <td height="73" colspan="2" align="left"  class=tablebody1><%=rs(4)%></td>
  </tr>
</table>
<%end if
rs.close
end sub

sub play()''播放
dim View_mo,View_ep,View_cp,medianame
sql="update Ms_media set hits=hits+1 where Checked=1 and id="&id&""
conn.execute(sql)
sql="select id,Title,View_mo,View_ep,View_cp,Username,Mediaurl from [Ms_media] where Checked=1 and id="&id&""
set rs=conn.execute(sql)
if not (rs.eof and rs.bof) then
View_mo=rs(2)
View_ep=rs(3)
View_cp=rs(4)
medianame=rs(5)
if medianame<>trim(membername) then
if not (master or supermaster or Standmaster) then
if Chkvalue(1,1,View_mo)=false then
	errmsg=errmsg+"<br>"+"<li>对不起，您的金币不够请确认。"
	founderr=true
end if
if Chkvalue(2,1,View_ep)=false then
	errmsg=errmsg+"<br>"+"<li>对不起，您的魅力值不够请确认。"
	founderr=true
end if
if Chkvalue(3,1,View_cp)=false then
	errmsg=errmsg+"<br>"+"<li>对不起，您的经验值不够请确认。"
	founderr=true
end if
end if
end if
if founderr=true then exit sub
%>
<table width="100%" border="0" align=center cellpadding=3 cellspacing=1 class=tableborder1>
  <tr>
    <th height="26" class=tablebody1><%=rs(1)%></th>
  </tr>
  <tr>
    <td height="250" align="center"  class=tablebody1> 
        <object id=nstv classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 
     width=372 height=270 
     codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading 
     Microsoft? Windows Media? Player components... 
     type=application/x-oleobject>
        <param name=URL value=media_play.asp?id=<%=id%>>
     <PARAM NAME=UIMode value=full><PARAM NAME=AutoStart value=true>
     <PARAM NAME=Enabled value=true>
     <PARAM NAME=enableContextMenu value=false>
     <param name=WindowlessVideo value=true>
     <embed src="rhcm.avi" width="372" height="270" autostart="true" url="media_play.asp?id=<%=id%>" uimode="full" enabled="true" enablecontextmenu="false" windowlessvideo="true"></embed>
  </object>
    </td>
  </tr>
</table>
<%end if
rs.close
if medianame<>trim(membername) then
if not (master or supermaster or Standmaster) then
conn.execute("update Ms_user set UserWealth=UserWealth-"&View_mo&",UserEP=UserEP-"&View_ep&",UserCP=UserCP-"&View_cp&" where Userid="&Userid&"")
end if
conn.execute("update Ms_user set UserWealth=UserWealth+"&View_mo&",UserEP=UserEP+"&View_ep&",UserCP=UserCP+"&View_cp&" where Username='"&medianame&"'")
end if
end sub%>