<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class SIPPFileHelper{
	public function __construct(){
    }

    function getListAccepted(){
    	$fileaccepted = array(
    		'1' => 'pdf',
    		'2' => 'docx',
    		'3' => 'doc',
    		'4' => 'xlsx',
    		'5' => 'xls',
    		'6' => 'rtf',
    		'7' => 'png',
    		);
    	return $fileaccepted;
    }

    function isAcceptableFile($path){
    	$fileaccepted = $this->getListAccepted();
    	$extension =  pathinfo($path, PATHINFO_EXTENSION);
    	if(in_array($extension, $fileaccepted)){
    		return TRUE;
    	}else{
    		return FALSE;
    	}
    }
}