<?
include "config.inc.php";
include "class/member.class.php";
include "class/article.class.php";
include "include/movie.func.php";
$member=new member();
$user_info=$member->member_auth();
$fid=$_GET[id];
			$fdb = $PlusDB->prefix(attachment);
			$adb = $PlusDB->prefix(articles);
$sql="select f.*,a.cid from $fdb f left join $adb a on (a.id=f.aid) where f.id=$fid";
$row=$PlusDB->query_firstrow($sql);
$aid =$row[aid];
$atid = $row[id];
$point = $row[point];
if($point>0  && $user_info[user_level]=="Guest"){
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE><?=$row[title]?></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="{$root}/template/default/images/no2.css" type=text/css rel=stylesheet>
<META http-equiv=Content-Type content="text/html; charset=<?=_CHAR?>"><LINK 
href="images/style.css" type=text/css rel=stylesheet>
</head>
<body>
				 <form action="<?=PLUS_URL?>/login.php" method="post">
  <table border="0" cellpadding="0" cellspacing="0" height="90" width="100%">
    <tbody>
      <tr>
        <td width="33%">&nbsp;</td>
        <td width="67%" height="5"><div align="left"></div></td>
      </tr>
      <tr>
        <td rowspan="2" align="center" valign="middle"><div align="right"><img src="images/login-welcome.gif" height=60 > &nbsp;</div></td>
        <td align="center" height="20" valign="middle"><div align="left"><font color="#100063"><?=_LANG_0921?></font> <font color="#333333">
            <input name="UserName" maxlength="16" id="username" class="txtinput" style="width: 190px;" type="text">
        </font></div></td>
      </tr>
      <tr>
        <td align="center" height="20" valign="middle"><div align="left"><font color="#100063"><?=_LANG_0922?></font><font color="#6c3a07">
            <input name="PassWord" maxlength="16" id="password" class="txtinput" style="width: 190px;" type="password">
        </font></div></td>
      </tr>
      <tr>
        <td align="center" valign="middle">&nbsp;</td>
        <td align="center" height="45" valign="middle">
          <div align="left">
            <input type='submit' name="post" value="<?=_LANG_0923?>">&nbsp;&nbsp;<INPUT onclick="document.location.href = 'index.php?module=member&action=getPass';" type=button value="<?=_LANG_0924?>" name="<?=_LANG_0924?>" class="bts">&nbsp;&nbsp;<INPUT onclick="document.location.href = 'index.php?module=member&action=register';" type=button value="<?=_LANG_0925?>" name="<?=_LANG_0925?>" class="bts">
            </div></td>
      </tr>
    </tbody>
  </table>
</form>
<?
exit;
}
if($user_info[point]<$point) die("你的点数不足,你现在的点数只有 ".$user_info[point].",请选择在线充值,或者选择其他影片观看");
$url  =  $row[url];
$ext = strtolower(str_replace(".", "", strrchr($url, ".")));
//$code = cmsez_crypt($url);
$id = $row[id];
$strTime=time();
$code = md5($strTime.$url);
setcookie("check_code",$strTime,0);
//die("<a href=movie.php?id=$fid&code=$code>aa</a>");
?>
<html>
<head>
<title><?=$row[title]?></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<?
if(eregi("flash|swf|fla|swi", $ext)) {
	playFP($id,$code);	
	break;
}elseif(eregi("audio|video|wmv|wav|mid|mp3|m3u|wma|asf|asx|vqf|mpg|mpeg|avi",$ext)) {
	playMP($id,$code);
	break;
} elseif(eregi("real|ram|rvmb|rm|rv", $ext)) {
	playRP($id,$code);
}
?>
</body>
</html>