Update 2 files

- /html/src/css/style.css
- /html/upload.php
This commit is contained in:
Jan BELLON 2024-03-11 19:49:04 +00:00
parent 522c3b6f45
commit 2f83e23e84
2 changed files with 6 additions and 2 deletions

View File

@ -158,6 +158,10 @@ a {
width: 40%;
}
.article-content img {
max-height: 10em;
}
.row {
display: inline-block;
background-color: var(--banner-background);

View File

@ -18,12 +18,12 @@ if(isset($_POST['article-content'])) {
file_put_contents($wwwroot . "/content/journal/" . $filename . ".md", nl2br($_POST['page-content']));
$bdd = connect($dbhost, $dbname, $dbuser, $dbpass);
$upload = $bdd->prepare("INSERT INTO articles (ID, titre, auteur, classification) VALUES (:filename, :titre, :auteur, :image, :resume, :classification)");
$upload = $bdd->prepare("INSERT INTO articles (ID, titre, auteur, image, classification) VALUES (:filename, :titre, :auteur, :image, :resume, :classification)");
$upload->bindParam(':filename', $filename);
$upload->bindParam(':titre', htmlspecialchars($_POST['article-titre']));
$upload->bindParam(':auteur', $_SESSION['display_name']);
$upload->bindParam(':image', htmlspecialchars($_POST['article-image']));
$upload->bindParam(':resume', htmlspecialchars($_POST['article-resume']));
$upload->bindParam(':auteur', $_SESSION['display_name']);
$upload->bindParam(':classification', $_POST['classification']);
if($upload->execute()) {
$status = "Article Publié";