CMS ultra léger au style oldschool, projet de la communauté Kalaïn Hundin.

edition_article.php 1.0KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. $AdminDir = str_replace("administration", "",dirname(__FILE__));
  3. require_once(''.$AdminDir.'user/config.php');
  4. require_once(''.$MainDir.'user/verifications.php');
  5. $article_id_edit_page=$_GET['id'];
  6. $sql="SELECT * FROM article WHERE id_article='$article_id_edit_page'";
  7. $req = $dbh->query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
  8. $article_data = $req->fetch(PDO::FETCH_ASSOC);
  9. include("".$MainDir."files/navheader.php");
  10. $page_name='Edition de l\'article "'.$article_data['titre'].'"';
  11. include_once(''.$MainDir.'user/top.php');
  12. ?>
  13. <form action='<?php echo $root_path; ?>files/submit_edit.php?id=<?php echo $article_id_edit_page; ?>' method='post'>
  14. <b>Titre</b> :<br />
  15. <input value="<?php echo htmlspecialchars(stripslashes($article_data['titre'])); ?>" type='text' name='titre' /><br />
  16. <b>Article</b> :
  17. <br />
  18. <textarea name='article' cols='60' rows='10'><?php echo htmlspecialchars(stripslashes($article_data['article'])); ?></textarea><br />
  19. <input type='submit' value='Envoyer !!' />