OpenConnection(); $pngID = $_GET['pngID']; $png_ar = $pldb->GetResultsAsNestedArray("SELECT * " . "FROM colstr_png WHERE pngID = " . ValToSQL_num($pngID) . ";", 1); $png_r = $png_ar[0]; $wrap = $_GET['wrap']; $size = $_GET['size']; $size_x = $_GET['size_x']; $aspect = $_GET['aspect']; //if ($wrap != "") { // $size = ($size != '' ? $size : 0); // $png_abs_path = CsPng::GetWrappedPngFile($pngID, $png_r['uploadPath'], $wrap, $size); //} if ($size_x != "") { $aspect = ($aspect != '' ? $aspect : 1); $png_abs_path = CsPng::GetWrappedPngFile($pngID, $png_r['uploadPath'], $size_x, $aspect); } else { $png_abs_path = ColStr::UploadRoot() . "/" . $png_r['uploadPath']; } //echo $png_abs_path; //exit(); header("Last-Modified: " . gmdate(r, filemtime($png_abs_path))); header("Content-type: image/png"); header("Cache-Control: max-age=1, public"); readfile($png_abs_path); exit(); ?>