=0){ mysqli_data_seek($res,$row); $resrow = (is_numeric($col)) ? mysqli_fetch_row($res) : mysqli_fetch_assoc($res); if (isset($resrow[$col])){ return $resrow[$col]; } } return false; } $control = remplacetas('form_datos','contenido',"$archivo",'control',"") ; $privacidad = remplacetas('form_id','id',"$control[5]",'publico',"") ; //if($privacidad[0] == 0 AND ($_SESSION['id'] != $control[6] OR $_SESSION['id_empresa'] != $control[7]) or $_SESSION['equipo'] != $control[8] ) { if($privacidad[0] == 0 AND ($_SESSION['id'] != $control[6] OR $_SESSION['id_empresa'] != $control[7] or $_SESSION['equipo'] != $control[8] )) { header("Location: ../images/seguridad.gif"); //echo "if($privacidad[0] == 0 AND ($_SESSION[id] != $control[6] OR $_SESSION[id_empresa] != $control[7] or $_SESSION[equipo] != $control[8])"; exit(); } //else{ echo "$privacidad[2]"; exit();} $dir="$path_images_secure/full/"; if ((!$file=realpath($dir.$_GET['archivo'])) || strpos($file,realpath($dir))!==0 || substr($file,-4)=='.php'){ //header('HTTP/1.0 404 Not Found'); header("Location: ../images/sinimagen.jpg"); exit(); } $ref=$_SERVER['HTTP_REFERER']; if (strpos($ref,'https://')===0 || strpos($ref,'https')!==0){ /* $mime=array( 'jpg'=>'image/jpeg', 'png'=>'image/png', 'mid'=>'audio/x-midi', 'wav'=>'audio/x-wav' ); if($mime[substr($file,-3)] =='') { header('Location: ../pixel.png'); exit(); }*/ $stat=stat($file); header('Content-Type: '.$mime[substr($file,-3)]); header('Content-Length: '.$stat[7]); header('Last-Modified: '.gmdate('D, d M Y H:i:s',$stat[9]).' GMT'); readfile($file); exit(); } header('Pragma: no-cache'); header('Cache-Control: no-cache, no-store, must-revalidate'); include($file.'.php'); ?>