diff --git a/Backend/controller/login.php b/Backend/controller/login.php index ad5ee66..21f1220 100644 --- a/Backend/controller/login.php +++ b/Backend/controller/login.php @@ -18,7 +18,7 @@ if (isset($_POST['loginsubmit'])) { if ($password->save()) { $_SESSION['token'] = $token; $_SESSION['name'] = $username; - header('location: ../../admin.php?login=success'); + header('location: ../../Frontend/admin.php?login=success'); exit(); http_response_code(200); } else { diff --git a/Backend/controller/logout.php b/Backend/controller/logout.php index e1adb80..c1df32f 100644 --- a/Backend/controller/logout.php +++ b/Backend/controller/logout.php @@ -2,4 +2,4 @@ session_start(); session_unset(); session_destroy(); -header("location: ../../index.php"); +header("location: ../../Frontend/index.php"); diff --git a/Frontend/Assets/Ajax/editPost.js b/Frontend/Assets/Ajax/editPost.js index 0f62bde..3af5850 100644 --- a/Frontend/Assets/Ajax/editPost.js +++ b/Frontend/Assets/Ajax/editPost.js @@ -24,6 +24,7 @@ function editPost(id) { return {title: title, desc: desc} } }).then((result) => { + if (result.isConfirmed) $.ajax({ type: 'POST', url: '../Backend/controller/update.php', diff --git a/Frontend/index.php b/Frontend/index.php index 86061c0..cc99baa 100644 --- a/Frontend/index.php +++ b/Frontend/index.php @@ -14,6 +14,13 @@ +