Took 4 hours 1 minute
This commit is contained in:
Christopher
2023-07-11 18:23:23 +02:00
parent e7dd0b2fd6
commit eb805a994b
26 changed files with 1005 additions and 120 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
require "../../../../../_config.php";
require "../../Authentication/AuthController.php";
require "../PostController.php";
use BlogEngine\Posts\PostController;
use BlogEngine\Authentication\AuthController;
session_start();
$auth = new AuthController();
$conn = $auth->Connection();
$postcon = new PostController($auth);
if(isset($_POST['name']) && isset($_POST['title']) && isset($_POST['content'])){
$id = $_POST['id'] ?? 0;
if($postcon->AutoSave($id, $_POST['name'], $_POST['title'], $_POST['content'], (isset($_POST['tags'])?$_POST['tags']:null), $_POST['commentStatus']))
echo "Zapisano zmiany!";
else
echo "Błąd w zapisie! Spróbuj ponownie później";
}