diff --git a/add_user_modal.php b/add_user_modal.php index eb3a1d33..bbab191a 100644 --- a/add_user_modal.php +++ b/add_user_modal.php @@ -10,7 +10,7 @@
diff --git a/edit_user_modal.php b/edit_user_modal.php index 73a27916..7aca88e5 100644 --- a/edit_user_modal.php +++ b/edit_user_modal.php @@ -48,7 +48,7 @@
- +
diff --git a/post.php b/post.php index 1fec39ea..4ece8644 100644 --- a/post.php +++ b/post.php @@ -20,10 +20,14 @@ if(isset($_POST['add_user'])){ $password = md5($_POST['password']); $client_id = intval($_POST['client']); - mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', avatar = '$path', created_at = NOW(), client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO users SET name = '$name', email = '$email', password = '$password', created_at = NOW()"); $user_id = mysqli_insert_id($mysqli); + if(!file_exists("uploads/users/$user_id/")) { + mkdir("uploads/users/$user_id"); + } + if($_FILES['file']['tmp_name']!='') { $path = "uploads/users/$user_id/"; $path = $path . time() . basename( $_FILES['file']['name']); diff --git a/settings-user.php b/settings-user.php index 39bec69a..961bee72 100644 --- a/settings-user.php +++ b/settings-user.php @@ -62,7 +62,7 @@ $password = $row['password'];
- +