<!--#include file="conn.asp" -->
<!--#include file="function/Function.asp" -->
<%
'===================================================================================================================
'软件名称：云网影视管理系统
'Copyright (C) 2002-2007 ywnt.net  All rights reserved.
'产品咨询QQ：489234,2813712
'程序版权：云网互动科技有限公司
'程序开发：云网互动科技有限公司
'官方网站：http://www.ywnt.net 
'郑重声明:
'    1、免费版本请在程序首页保留版权信息，并做上本站LOGO友情连接,商业版本无此要求;
'    2、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    3、云网互动科技有限公司保留此软件的法律追究权利
'===================================================================================================================
ID=NoSqlHack(Request.QueryString("ID"))
MovieType=NoSqlHack(Request.QueryString("MovieType"))
UrlID=NoSqlHack(Request.QueryString("UrlID"))
Set RS=Server.CreateObject(YWNT_TMS_RS)
SQL="select SeverID,MovieName,MovieCoin,MovieCompetence,MovieGroup,MovieFree from YWNT_TMS_Movie Where ID="&ID
Rs.open sql,Conn,1,3
If RS.Eof And RS.BOf Then
Response.Write("<script>alert('您提交的参数错误没有此影片!');</script>")
response.end
Else
SeverID=RS("SeverID")
MovieName=RS("MovieName")
MovieCoin=RS("MovieCoin")
MovieCompetence=RS("MovieCompetence")
MovieGroup=RS("MovieGroup")
MovieFree=RS("MovieFree")
End If
RS.Close
Set RS = Nothing

IF GetConfig("webmode")=1 Then
IF MovieFree<>1 Then
Call PlayUsersLog()
End IF
End IF
Conn.execute("Update YWNT_TMS_Movie set MovieClick=MovieClick+1 where ID="&ID)

sub PlayUsersLog()
IF ChecKWcafesIP(UsersIP())=True Then
UserName=session("WcafesName")
UsersGroupx=session("WcafesGroup")
UsersTypex=3
Else
IF Request.Cookies("YWNTUserCookie")("UserName")="" Then	'判断登陆
Call PlayLogin()
response.end
Else

'用户
Set RS=Server.CreateObject(YWNT_TMS_RS)
SQL="select UsersName,UsersGroup,UsersType,UsersCoin,UsersCoinDate from YWNT_TMS_Users Where UsersName='"&Request.Cookies("YWNTUserCookie")("UserName")&"'"
Rs.open sql,Conn,1,1
If not RS.Eof Then
UserName=RS("UsersName")
UsersGroupx=RS("UsersGroup")
UsersTypex=RS("UsersType")
UsersCoin=RS("UsersCoin")
UsersCoinDate=RS("UsersCoinDate")
End If
RS.Close
Set RS = Nothing
End if
End if

IF MovieCompetence=1 Then
IF Instr(","&MovieGroup&",",","&UsersGroupx&",")=0 then
Response.Write("<script>alert('您所在用户组无权观看此影片!');</script>")
response.end
End IF
End IF
call Movielog(MovieName,UserName,MovieType,UsersGroupx,UsersTypex,UsersCoin,UsersCoinDate)
end sub



Function PlayLogin()%>
<SCRIPT>
function formcheck()
{
 if (form.userid.value=="")
 {
   alert('请输入用户名!');
   form.userid.focus();
   return false;
 }
 if (form.password.value=="")
 {
   alert('请输入密码!');
   form.password.focus();
   return false;
 }
 if (form.codestr.value=="")
 {
   alert('请输入验证码!');
   form.codestr.focus();
   return false;
 }
}
</SCRIPT>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
.login{
     border:#dadada 1px solid;
     background:#ffffff;
     }
-->
</style>
<table width="315" height="215" border="0" align="center" cellpadding="0" cellspacing="0">
         <tr>
           <td bgcolor="#f7f7f7"><table width="300" height="198" border="0" align="center" cellpadding="0" cellspacing="0" class="login">
             <tr>
               <td><table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
                 <tr>
                   <td width="246" colspan="2"><img src="Users/images/usercenter_09.gif" width="273" height="30" alt="" /></td>
                   </tr>
                 <tr>
                   <td height="143" colspan="2">
				   <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
				   	<form action="Users/Users_CheckLogin.asp" method="post" name="form" id="form">
                     <tr>
                       <td width="27%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                           <tr>
                             <td width="25%"><img src="Users/images/usercenter_13.gif" width="4" height="10" alt="" /></td>
                             <td width="75%">用户名： </td>
                           </tr>
                         </table></td>
                       <td width="73%" height="30"><input name="userid" type="text" style="width:180px"/>                       </td>
                     </tr>
                     <tr>
                       <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                         <tr>
                           <td width="25%"><img src="Users/images/usercenter_13.gif" width="4" height="10" alt="" /></td>
                           <td width="75%">密　码： </td>
                         </tr>
                       </table></td>
                       <td height="30"><input name="password" type="password" style="width:180px"/></td>
                     </tr>
                     <tr>
                       <td><table width="100%" border="0" cellpadding="0" cellspacing="0">
                         <tr>
                           <td width="25%"><img src="Users/images/usercenter_13.gif" width="4" height="10" alt="" /></td>
                           <td width="75%">验证码： </td>
                         </tr>
                       </table></td>
                       <td height="30"><%=GetCode%></td>
                     </tr>
                     <tr>
                       <td><input type="image" name="imageField" src="Users/images/usercenter_17.gif" onClick="return formcheck();"/></td>
                       <td height="30"><img src="Users/images/usercenter_18.gif" width="190" height="23" alt="" /></td>
                     </tr>
					</form>
                   </table></td>
                   </tr>
                 
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table>
<%End Function%>