<?php
/**
 *      [eminer] (C)20013-2099 eminer Inc.
 *      This is NOT a freeware, use is subject to license terms
 *      $Id: uploadsafe.inc.php  September 21, 2014, 9:17 am Hogan $
 */
if(!defined('eminerINC')) exit('Request Error!'); if(isset($_FILES['GLOBALS'])) exit('Request not allow!');   $ee58b85a0 = "php|pl|cgi|asp|aspx|jsp|php3|shtm|shtml"; $ebd2351f4 = array('name', 'type', 'tmp_name', 'size'); if ($GLOBALS['ee77074eb']=='ckeditor' && isset($_FILES['upload'])) { $_FILES['imgfile'] = $_FILES['upload']; $e51c99575 = TRUE; unset($_FILES['upload']); } foreach($_FILES as $e2eefe9b5=>$ee106c97b) { foreach($ebd2351f4 as $e8ce4b16b) { if(!isset($_FILES[$e2eefe9b5][$e8ce4b16b])) { exit('Request Error!'); } } if( preg_match('/^(cfg_|GLOBALS)/', $e2eefe9b5) ) { exit('Request var not allow for uploadsafe!'); } $$e2eefe9b5 = $_FILES[$e2eefe9b5]['tmp_name'] = str_replace("\\\\", "\\", $_FILES[$e2eefe9b5]['tmp_name']); ${$e2eefe9b5.'_name'} = $_FILES[$e2eefe9b5]['name']; ${$e2eefe9b5.'_type'} = $_FILES[$e2eefe9b5]['type'] = preg_replace('/[^0-9a-z\./]/i', '', $_FILES[$e2eefe9b5]['type']); ${$e2eefe9b5.'_size'} = $_FILES[$e2eefe9b5]['size'] = preg_replace('/[^0-9]/','',$_FILES[$e2eefe9b5]['size']); if(!empty(${$e2eefe9b5.'_name'}) && (preg_match("/\.(".$ee58b85a0.")$/i",${$e2eefe9b5.'_name'}) || !preg_match("/\./", ${$e2eefe9b5.'_name'})) ) { if(!defined('eminerADMIN')) { exit('Not Admin Upload filetype not allow !'); } } if(empty(${$e2eefe9b5.'_size'})) { ${$e2eefe9b5.'_size'} = @filesize($$e2eefe9b5); } $ed17f2839 = array ( "image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/bmp" ); if(in_array(strtolower(trim(${$e2eefe9b5.'_type'})), $ed17f2839)) { $e60aafa01 = @getimagesize($$e2eefe9b5); if (!is_array($e60aafa01)) { exit('Upload filetype not allow !'); } } } ?>