$image_max_width && $image_resizing_override === FALSE) { $resize = TRUE; $srcWidth = $image_max_width; if ($image_max_height == 0) $srcHeight = $image_max_width*$srcHeight/$srcWidth; } if ($image_max_height != 0 && $srcHeight > $image_max_height && $image_resizing_override === FALSE){ $resize = TRUE; $srcHeight = $image_max_height; if ($image_max_width == 0) $srcWidth = $image_max_height*$srcWidth/$srcHeight; } if ($resize) create_img($targetFile, $targetFile, $srcWidth, $srcHeight, $image_max_mode); } } // not enough memory if ($memory_error) { unlink($targetFile); header('HTTP/1.1 406 Not enought Memory',TRUE,406); exit(); } } } else // file ext. is not in the allowed list { header('HTTP/1.1 406 file not permitted',TRUE,406); exit(); } } else // no files to upload { header('HTTP/1.1 405 Bad Request', TRUE, 405); exit(); } // redirect if (isset($_POST['submit'])) { $query = http_build_query(array( 'type' => $_POST['type'], 'lang' => $_POST['lang'], 'popup' => $_POST['popup'], 'field_id' => $_POST['field_id'], 'fldr' => $_POST['fldr'], )); header("location: dialog.php?" . $query); } ?>