File manager - Edit - /home/autoph/public_html/tasks/image.php.tar
Back
home/autoph/public_html/tasks/viewer/image.php 0000644 00000003067 15024756721 0015536 0 ustar 00 <?php error_reporting(0); //hide error mesage for possible data dir source leak meow include '../cfg/db.php'; $main_uri = $global_system_settings['url']; if( $global_user_status === 0){ header('Location: '.$main_uri); exit; } // if(!isset($_SERVER['HTTP_REFERER'])){ // header('Location: '.$main_uri); // exit; // } $pdf_viewer_loc = $main_uri.'viewer/image.php'; $pdf_viewer_loc_arr = (parse_url($pdf_viewer_loc)); $pdf_viewer_loc_path = $pdf_viewer_loc_arr['path']; // $ref_arr = parse_url($_SERVER['HTTP_REFERER']); // $ref_arr_path = $ref_arr['path']; // if($ref_arr_path != $pdf_viewer_loc_path){ // header('Location: '.$main_uri); // exit; // } if(!isset($_REQUEST['token'])){ header('Location: '.$main_uri); exit; } // Store the file name into variable $file = $_REQUEST['token']; $information = explode("@", $file); if(count($information) !== 2){ // header('Location: '.$main_uri); // exit; } $type = intval($information[1]); switch($type){ case 1: case 2: $dir = "../dist/attachments/".$information[0]; break; case 3: $dir = "../dist/knowledgebase/".$information[0]; break; case 4: $dir = "../dist/videos/resources/".$information[0]; break; default: $dir = $information[0]; } $filename = basename($dir); $image_mime = image_type_to_mime_type(exif_imagetype($dir)); $fp = fopen($dir, 'rb'); // echo $image_mime;exit; // send the right headers header("Content-Type: ".$image_mime); header("Content-Length: " . filesize($dir)); // dump the picture and stop the script fpassthru($fp); exit; ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings