1
0
forked from qwerty/milfs

correcion en visualizacion de imagenes

This commit is contained in:
humano 2020-03-17 16:22:06 -05:00
parent 6c47a5da23
commit cb830a0f7c
2 changed files with 8 additions and 4 deletions

View File

@ -2,13 +2,13 @@
session_start();
// Comprobamos si existe la variable
/*if ( !isset ( $_SESSION['id'] ) ) {
// Si no existe
// Si no existe
header("Location: ../nodisponible.jpg");
// echo "hola mundo2";
}*/
if(!isset($_GET['file']) ){
header("Location: ../sinimagen.jpg");
}
include("../../includes/datos.php");
$dir="$path_images_secure/";
@ -21,15 +21,19 @@ if ((!$file=realpath($dir.$_GET['file']))
$ref=@$_SERVER['HTTP_REFERER'];
if (strpos($ref,'https://')===0 || strpos($ref,'https')!==0){
$mime=array(
'JPEG'=>'image/jpeg',
'JPG'=>'image/jpeg',
'jpg'=>'image/jpeg',
'jpeg'=>'image/jpeg',
'png'=>'image/png',
'PNG'=>'image/png',
'mid'=>'audio/x-midi',
'wav'=>'audio/x-wav'
);
if(@$mime[substr($file,-3)] =='') {
header('Location: ../pixel.png');
exit();
}
$stat=stat($file);

View File

@ -13,7 +13,7 @@ function delayTimer() {
function revisarSession(sesion){
tiempo = "30";
gavela="19";
timestamp = Math.round(Date.now() /1000)
timestamp = Math.round(Date.now() /1000);
inicio = sesion;//leerCookie("timestamp");
transcurrido = (timestamp - inicio);
transcurrido_minutos = Math.round(transcurrido/60);