1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| <?php
if(isset($_POST['pagex']))
$pagex = $_POST['pagex'];
else $pagex="";
?>
</p><a href="gestion_page.php"><div id="fleche_retour"><img src="../image site/fleche_retour.png" border="0" align="right" /></div></a><br />
<form name="modif" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Choisissez la page que vous désirez modifier
<input type="hidden" name="menu" value="1" />
<select name="pagex" size="1" onchange="submit()">
<option value="" <?php if ($pagex=="") echo("selected");?>>-- choisir la page -- </option>
<option value="p_index.php" <?php if ($pagex=="p_index.php") echo("selected");?> > La boutique </option>
<option value="p_atelier.php" <?php if ($pagex=="p_atelier.php") echo("selected");?> > L'atelier </option>
<option value="p_article.php" <?php if ($pagex=="p_organe.php") echo("selected");?> > Nos créations </option>
<option value="p_contact.php" <?php if ($pagex=="p_contact.php") echo("selected");?> > Contact </option>
</select>
</form>
<?php
if(!empty($pagex)){
$base="../pages/";
$fp=fopen($base.$pagex,"r");
$content=fread($fp,filesize($base.$pagex));
fclose($fp);
?>
<br />
<form name="form" method="post" action="save_page.php" enctype="multipart/form-data" >
<input type="hidden" name="nom" value="<?php echo $pagex; ?>">
<input type="hidden" name="pageback" value="<?php echo $_SERVER['PHP_SELF']; ?>" />
</form>
</textarea>
<input name="page_select" type="hidden" value="<?php echo $pagex;?>" />
<div id="CKeditor"><textarea id="editor1" name="editor1" value="<?php echo $content; ?>"></textarea></div>
<br />
<div align="center"><input name="btn" type="submit" value="Modifier" />></div>
</form>
<?php
}
?>
<script type="text/javascript">
window.onload = function()
{
CKEDITOR.replace( 'editor1' );
};
</script> |
Partager