diff --git a/post.php b/post.php index 5b4d920b..7cd962c9 100644 --- a/post.php +++ b/post.php @@ -1015,6 +1015,7 @@ if(isset($_POST['add_client'])){ if(!file_exists("uploads/clients/$session_company_id/$client_id")) { mkdir("uploads/clients/$session_company_id/$client_id"); + file_put_contents("uploads/clients/$session_company_id/$client_id/index.php", ""); } //Add Location @@ -5027,7 +5028,7 @@ if(isset($_POST['add_file'])){ $file_reference_name = md5(time() . $file_name) . '.' . $file_extension; // check if file has one of the following extensions - $allowed_file_extensions = array('jpg', 'gif', 'png', 'pdf', 'txt', 'doc', 'docx', 'xls', 'xlsx', 'zip', 'tar', 'gz'); + $allowed_file_extensions = array('jpg', 'gif', 'png', 'pdf', 'txt', 'doc', 'docx', 'csv', 'xls', 'xlsx', 'zip', 'tar', 'gz'); if(in_array($file_extension,$allowed_file_extensions) === false){ $file_error = 1; diff --git a/setup.php b/setup.php index 06406cf8..1855f73e 100644 --- a/setup.php +++ b/setup.php @@ -482,9 +482,13 @@ if(isset($_POST['add_company_settings'])){ $config_aes_key = keygen(); mkdir_missing("uploads/clients/$company_id"); + file_put_contents("uploads/clients/$company_id/index.php", ""); mkdir_missing("uploads/expenses/$company_id"); + file_put_contents("uploads/expenses/$company_id/index.php", ""); mkdir_missing("uploads/settings/$company_id"); + file_put_contents("uploads/settings/$company_id/index.php", ""); mkdir_missing("uploads/tmp/$company_id"); + file_put_contents("uploads/tmp/$company_id/index.php", ""); //Check to see if a file is attached if($_FILES['file']['tmp_name'] != ''){