Mini Shell Moded By TiGER HeX
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
mnt
/
volume_sfo2_01
/
50mmla
/
Linux midnightridazz 4.19.0-11-cloud-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64
Upload File :
New :
File
Dir
/mnt/volume_sfo2_01/50mmla/submitFlickv3.php
<?php include_once('includes/static/configure.php'); include_once('includes/static/util.php'); include_once('includes/static/dbcon.php'); include_once('includes/static/gdimg.php'); include_once('includes/static/sessions.php'); include_once('includes/appTop.php'); $image_info[0] = $_REQUEST['x']; $image_info[1] = $_REQUEST['y']; //*******************************************************************************/ if($image_info[0] <= $image_info[1]){ //portrait if($image_info[1] <= PORTRAIT_TOLERENCE){ //don't resize die("Portrait - too small reject"); $good_img = false; }elseif(($image_info[0] <= PORTRAIT_WIDTH) || ($image_info[1] <= PORTRAIT_HEIGHT)){ //don't scale up if width is undersized die("Portrait - don't resize"); $id = $gd->img_id; if(!$id){ die($gd->gd_error);} }else{ //resize image $w_reduction = PORTRAIT_WIDTH/$image_info[0]; $h_reduction = PORTRAIT_HEIGHT/$image_info[1]; if($w_reduction < $h_reduction){ //width is the limit. don't scale less than this $w = PORTRAIT_WIDTH; $h = round( $w_reduction*$image_info[1] ); }else{ //height is the limit. don't scale less than this $w = round( $h_reduction *$image_info[0] ); $h = PORTRAIT_HEIGHT; } die("Portrait - resize to ".$w." ".$h); $id = $gd->gd_scale_img($w,$h,IMG_QUALITY); if(!$id){ die($gd->gd_error);} } }else{ //landscape if($image_info[0] <= LANDSCAPE_TOLERENCE){ die("Landscape - too small so reject"); $good_img = false; }elseif(($image_info[0] <= LANDSCAPE_WIDTH) || ($image_info[1] <= LANDSCAPE_HEIGHT)){ die("Landscape - don't resize"); $id = $gd->img_id; if(!$id){ die($gd->gd_error);} }else{ //we've passed all the crietera //resize image to a height of 350 or width of 700. What ever comes first $w_reduction = LANDSCAPE_WIDTH/$image_info[0]; $h_reduction = LANDSCAPE_HEIGHT/$image_info[1]; if($h_reduction < $w_reduction){ //width is the limit. don't scale less than this $w = LANDSCAPE_WIDTH; $h = round( $w_reduction*$image_info[1] ); }else{ //height is the limit. don't scale less than this $w = round( $h_reduction *$image_info[0] ); $h = LANDSCAPE_HEIGHT; } die("Landscape - resize to ".$w." ".$h); $id = $gd->gd_scale_img($w,$h,IMG_QUALITY); if(!$id){ die($gd->gd_error);} } } /*********************************************************************************/ ?> <? include_once('includes/footer.php'); include_once('includes/appBottom.php'); ?>