Questo è il codice della pagina. Essa non viene inclusa in nessun'altra pagina:
Codice PHP:
<?php
session_start();
include("database_connect.php");
$id = $_GET['id'];
$q = mysql_query("SELECT * FROM tabella3 WHERE id = '{$id}'");
if(mysql_num_rows($q) == 1){
$a = mysql_fetch_row($q);
if(empty($a[6])){
mysql_query("UPDATE tabella3 SET visto = visto+1 WHERE id = '".$id."'");
Header("Content-type: video/x-flv");
echo file_get_contents("../files/".$a[4]);
}else{
$b = mysql_fetch_row(mysql_query("SELECT * FROM miksco_utenti WHERE id = '".$_SESSION['id']."'"));
if($b[6] == "@"){
$aa = array(1,2,3);
}else{
$va = explode(" ",$a[6]);
$ua = explode(" ",$b[6]);
$aa = @array_intersect($va,$ua);
}
if(count($aa) > 0){
//mysql_query("UPDATE tabella3 SET visto = '".($a[9]+1)."' WHERE id = '".$id."'");
Header("Content-type: video/x-flv");
echo file_get_contents("../files/".$a[4]);
}else{
//Header("HTTP/1.0 403 Forbidden");
Header("HTTP/1.0 401 Authorization Required");
}}
}else{
Header("HTTP/1.0 404 Not Found");
}
?>