diff --git a/html/editpage.php b/html/editpage.php index fd05235d..469a1fa1 100644 --- a/html/editpage.php +++ b/html/editpage.php @@ -55,10 +55,10 @@ if(isset($fichier)) { $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $req = $bdd->prepare("UPDATE articles SET classification = :classification, titre = :titre, resume = :resume WHERE ID = :article"); - $req->bindParam(':classification', $_POST['article-classification']); - $req->bindParam(':titre', $_POST['article-titre']); - $req->bindParam(':resume', $_POST['article-resume']); - $req->bindParam(':article', $_GET['article']); + $req->bindParam(':classification', (int)$_POST['article-classification']); + $req->bindParam(':titre', htmlspecialchars($_POST['article-titre'])); + $req->bindParam(':resume', nl2br($_POST['article-resume'])); + $req->bindParam(':article', (int)$_GET['article']); if($req->execute()) { $status = "Informations mises à jour"; } else { @@ -151,11 +151,11 @@ if(isset($fichier)) { echo '
'; echo '
'; - echo '
'; + echo '
'; } } echo "

" . $filename . "

"; - echo '
'; + echo '
'; echo '
'; } else { echo "

Pages

"; diff --git a/html/src/css/style.css b/html/src/css/style.css index aaac2d36..517fbd1f 100644 --- a/html/src/css/style.css +++ b/html/src/css/style.css @@ -125,6 +125,10 @@ a { padding: 0 0 0.3em 0; } +textarea[name="article-resume"] { + height: 10em; +} + .article-info .article-auteur { float: right; } diff --git a/html/upload.php b/html/upload.php index 18e58d82..8a97a18b 100644 --- a/html/upload.php +++ b/html/upload.php @@ -94,8 +94,8 @@ if(isset($_POST['article-content'])) {

Publier un article

-
-
+
+