You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
704 B
44 lines
704 B
<?php |
|
include '../functions.php'; |
|
|
|
|
|
$id=$_REQUEST['id']; |
|
$fp=$_REQUEST['fp']; |
|
|
|
|
|
if(isset($_SESSION['s_fp'])) |
|
{ |
|
if($_SESSION['s_fp']!=$fp) {header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");die();} |
|
} |
|
|
|
|
|
if(!isset($fp)||$fp=="") {header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");die();} |
|
|
|
|
|
$conn=db__connect(); |
|
|
|
$usr=db__getData($conn,"fp","fp",$fp); |
|
|
|
if($usr[0]['usr']=="") |
|
{ |
|
|
|
$res=db__getData($conn,"videolog","fp",$fp); |
|
|
|
$cnt=0; |
|
|
|
foreach($res as $each) |
|
{ |
|
if($each['time']>(time()-3600*24)) $cnt++; |
|
} |
|
|
|
if($cnt>20) |
|
{ |
|
echo json_encode(array("code"=>2)); |
|
|
|
die(); |
|
} |
|
} |
|
|
|
$video=db__getData($conn,"video","id",$id); |
|
|
|
header("Location: ".$video[0]['url1']); |