@@ -15,7 +15,7 @@ if (empty($dopost)) $dopost = ''; | |||||
if ($dopost == "upload") { | if ($dopost == "upload") { | ||||
CheckCSRF(); | CheckCSRF(); | ||||
require_once(DEDEINC."/image.func.php"); | require_once(DEDEINC."/image.func.php"); | ||||
$sparr_image = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/x-png", "image/wbmp"); | |||||
$sparr_image = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); | |||||
$sparr_flash = array("application/xshockwaveflash"); | $sparr_flash = array("application/xshockwaveflash"); | ||||
$okdd = 0; | $okdd = 0; | ||||
$uptime = time(); | $uptime = time(); | ||||
@@ -15,7 +15,6 @@ helper('image'); | |||||
global $cfg_photo_type, $cfg_photo_typenames, $cfg_photo_support; | global $cfg_photo_type, $cfg_photo_typenames, $cfg_photo_support; | ||||
$cfg_photo_type['gif'] = FALSE; | $cfg_photo_type['gif'] = FALSE; | ||||
$cfg_photo_type['jpg'] = FALSE; | $cfg_photo_type['jpg'] = FALSE; | ||||
$cfg_photo_type['jpeg'] = FALSE; | |||||
$cfg_photo_type['png'] = FALSE; | $cfg_photo_type['png'] = FALSE; | ||||
$cfg_photo_type['wbmp'] = FALSE; | $cfg_photo_type['wbmp'] = FALSE; | ||||
$cfg_photo_type['bmp'] = FALSE; | $cfg_photo_type['bmp'] = FALSE; | ||||
@@ -27,12 +26,6 @@ if (function_exists("imagecreatefromgif") && function_exists("imagegif")) { | |||||
$cfg_photo_typenames[] = "image/gif"; | $cfg_photo_typenames[] = "image/gif"; | ||||
$cfg_photo_support .= "GIF "; | $cfg_photo_support .= "GIF "; | ||||
} | } | ||||
if (function_exists("imagecreatefromjpg") && function_exists("imagejpg")) { | |||||
$cfg_photo_type["jpeg"] = TRUE; | |||||
$cfg_photo_typenames[] = "image/pjpg"; | |||||
$cfg_photo_typenames[] = "image/jpg"; | |||||
$cfg_photo_support .= "JPG "; | |||||
} | |||||
if (function_exists("imagecreatefromjpeg") && function_exists("imagejpeg")) { | if (function_exists("imagecreatefromjpeg") && function_exists("imagejpeg")) { | ||||
$cfg_photo_type["jpeg"] = TRUE; | $cfg_photo_type["jpeg"] = TRUE; | ||||
$cfg_photo_typenames[] = "image/pjpeg"; | $cfg_photo_typenames[] = "image/pjpeg"; | ||||
@@ -57,7 +57,7 @@ foreach ($_FILES as $_key => $_value) { | |||||
if (empty(${$_key.'_size'})) { | if (empty(${$_key.'_size'})) { | ||||
${$_key.'_size'} = @filesize($$_key); | ${$_key.'_size'} = @filesize($$_key); | ||||
} | } | ||||
$imgtypes = array("image/gif", "image/jpg", "image/pjpeg", "image/jpeg", "image/png", "image/xpng", "image/wbmp", "image/bmp"); | |||||
$imgtypes = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/webp"); | |||||
if (is_array(${$_key.'_type'}) && count(${$_key.'_type'}) > 0) { | if (is_array(${$_key.'_type'}) && count(${$_key.'_type'}) > 0) { | ||||
foreach (${$_key.'_type'} as $key => $value) { | foreach (${$_key.'_type'} as $key => $value) { | ||||
if (in_array(strtolower(trim($value)), $imtypes)) { | if (in_array(strtolower(trim($value)), $imtypes)) { | ||||
@@ -70,7 +70,7 @@ foreach ($_FILES as $_key => $_value) { | |||||
exit; | exit; | ||||
} | } | ||||
} | } | ||||
$imgtypes = array("image/gif", "image/jpg", "image/pjpeg", "image/jpeg", "image/png", "image/xpng", "image/wbmp", "image/bmp"); | |||||
$imgtypes = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/webp"); | |||||
if (in_array(strtolower(trim($value)), $imtypes)) { | if (in_array(strtolower(trim($value)), $imtypes)) { | ||||
$image_dd = @getimagesize($$_key); | $image_dd = @getimagesize($$_key); | ||||
if ($image_dd == false) { | if ($image_dd == false) { | ||||
@@ -93,7 +93,7 @@ foreach ($_FILES as $_key => $_value) { | |||||
exit; | exit; | ||||
} | } | ||||
} | } | ||||
$imgtypes = array("image/gif", "image/jpg", "image/pjpeg", "image/jpeg", "image/png", "image/xpng", "image/wbmp", "image/bmp"); | |||||
$imgtypes = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/webp"); | |||||
if (in_array(strtolower(trim(${$_key.'_type'})), $imtypes)) { | if (in_array(strtolower(trim(${$_key.'_type'})), $imtypes)) { | ||||
$image_dd = @getimagesize($$_key); | $image_dd = @getimagesize($$_key); | ||||
if ($image_dd == false) { | if ($image_dd == false) { | ||||