<?php
include('includes/function.php');
if(!empty($_GET["imagepass"])){
    // Get parameters
    browse(1);
    $filename = basename($_GET["imagepass"]); // Decode URL-encoded string
    $filepath = $filename;

    if (!empty($filename) && file_exists($filepath)){
        header ("Cache-control: public");
        header ("Content-Description: FIle Transfer");
        header ("Content-Disposition: attachment; filename=$filename");
        header ("Content-Type: application/zip");
        header ("Content-Transfer-Emcoding: binary");
        readfile ($filepath);
        exit;
    } else {
        die("Invalid file name!");
    }
}
?>
