1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/view/userGetPhoto.php
Daniel Neto b813f528ba Update
2024-03-18 09:47:19 -03:00

29 lines
719 B
PHP

<?php
//$doNotConnectDatabaseIncludeConfig =
//require_once '../videos/configuration.php';
//$photo = User::getPhotoRelativePath($_REQUEST['users_id']);
if (empty($_REQUEST['users_id'])) {
header('Content-Type: image/jpeg');
$img = 'img/placeholders/user.png';
} else {
$users_id = intval($_REQUEST['users_id']);
header('Content-Type: image/png');
$img = "../videos/userPhoto/photo{$users_id}.png";
}
if (!file_exists($img)) {
header('Content-Type: image/jpeg');
$img = 'img/placeholders/user.png';
}
header('Content-Length: ' . filesize($img));
//header("X-Sendfile: ../{$img}");
//exit;
//echo $img;
readfile($img);
//header("Location: {$photo}");
exit;