+
+//Verify that the extension is allowed
+function verify_extension($ext, $type){
+ if(CONFIG_EXTENSION_BLOCKING_MODE === "WHITELIST") {
+ $allowed = in_array($ext, unserialize(CONFIG_ALLOWED_EXTENSIONS));
+ }else{
+ $allowed = !in_array($ext, unserialize(CONFIG_BLOCKED_EXTENSIONS));
+ }
+
+ if(!$allowed){
+ if($type==='normal'){
+ include_once(CONFIG_ROOT_PATH.'error_meow.php');
+ exit(0);
+ }else{
+ exit('File type not allowed.');
+ }
+ }
+}