session_start(); $actus=$_SESSION["tpsk2015usr"]; require_once ('dbconf.php'); $con = mysqli_connect(HO,UN,PW,DB) or die("DB Error " . mysqli_error($con)); mysqli_query($con,"SET CHARACTER SET utf8;" ); mysqli_query($con,"SET NAMES 'UTF-8';"); $x= mysqli_real_escape_string($con,$_SERVER["QUERY_STRING"]); $sql = " select id, thumb_path, rtmp_path, hidden, private, live, id_user, expired, name from livestream where link='".$x."' "; $res = mysqli_query($con, $sql) or die("Error in Selecting" . mysqli_error($con)); $link = mysqli_fetch_array($res); $sql2 = " select id_user from useraccess where id_user=".$actus." AND id_content=".$link[0]." AND type=2 "; $pass=0; if ($link[4]==1 && $link[3]==1 && $actus>0) { $res2 = mysqli_query($con, $sql2) or die("Error in Selecting" . mysqli_error($con)); $acc = mysqli_fetch_array($res2); if ($acc[0]>0) $pass=1; } if ($actus==2) $pass=1; if ($actus>2 && $link[6]==$actus) $pass=1; mysqli_close($con); if ($link[0]>1 && $link[7]==0) { if ( $link[3]==0 || $link[4]==0 || $pass==1) { ?>
} else { ?>