$image_max_width){ $resize=true; $srcHeight=$image_max_width*$srcHeight/$srcWidth; $srcWidth=$image_max_width; } if($image_max_height!=0 && $srcHeight >$image_max_height){ $resize=true; $srcWidth =$image_max_height*$srcWidth/$srcHeight; $srcHeight =$image_max_height; } if($resize) create_img_gd($targetFile, $targetFile, $srcWidth, $srcHeight); } }else{ echo "file not permitted"; } }else{ echo "error"; } 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); } ?>