ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/litsolide.com/cp-admin/ |
Upload File : |
<?php
include_once('includes/header.php');
$id_volet ="38";
include('includes/volet.php');
/****************************/
if (isset($_POST['add'])) {
$qid = $bdd->prepare("INSERT INTO " . $GLOBALS['db_table']['fixed_pages'] . " (seo, id_parent, location, title, content, slideshow, meta_caption, meta_keywords) VALUES (:seo, :parent, :location, :title, :content, :slideshow, :meta_caption, :meta_keywords)");
$qid->execute(array( 'seo' => text2url($_POST['title']),
'parent' => $_POST['parent'],
'location' => $_POST['location'],
'title' => $_POST['title'],
'content' => $_POST['content'],
'slideshow' => $_POST['slideshow'],
'meta_caption' => $_POST['meta_caption'],
'meta_keywords' => $_POST['meta_keywords']));
echo '<script>';
echo 'window.location = "./cms.php"';
echo '</script>';
}
?>
<div class="container">
<form class="form-horizontal" method="post" action="#" enctype="multipart/form-data">
<div class="row">
<div class="span12">
<div class="page-header">
<h1>Ajouter Page
<div class="pull-right">
<button type="submit" name="add" class="btn btn-success"><i class="icon-ok"></i> Enregistrer</button>
<a href="cms.php" class="btn btn-primary"><i class="icon-arrow-left"></i> Retour</a>
</div>
</h1>
</div>
</div>
</div>
<?php
echo '<div id="form-content" style="">';
echo '<div class="row-fluid">';
// Partie de gauche
echo '<div class="span6">';
echo '<div class="control-group">';
echo '<label class="control-label" for="title">Titre :</label>';
echo '<div class="controls">';
echo '<input required style="width:287px" name="title" type="text">';
echo '</div>';
echo '</div>';
echo '<div class="control-group">';
echo '<label class="control-label" for="parent">Emplacement :</label>';
echo '<div class="controls">';
echo '<select name="parent" required="" data-placeholder="Veuillez sélectionner un emplacement !" class="chosen-select" style="width:300px;">';
echo '<option value=""></option>';
echo '<option value="0">Racine</option>';
$requete = $bdd->query("SELECT id, title FROM " . $GLOBALS['db_table']['fixed_pages']);
while ($row = $requete->fetch()) {
echo '<option value="' . $row['id'] . '">' . $row['title'] . '</option>';
}
echo '</select>';
echo ' <a onMouseOver="infobulle(this, \'Il correspond à la place de votre page dans le menu<br />Pour afficher votre page à la base du menu, sélectionner [Racine].<br />Pour afficher votre page dans un sous-menu, sélectionner [une page].\');"><img src="assets/img/help.png"></a>';
echo '</div>';
echo '</div>';
echo '<div class="control-group">';
echo '<label class="control-label" for="slideshow">Slideshow :</label>';
echo '<div class="controls">';
echo '<select name="slideshow" data-placeholder="Veuillez sélectionner un slideshow !" class="chosen-select" style="width:300px;">';
echo '<option value="0">Aucun</option>';
$requete = $bdd->query("SELECT id, name FROM " . $GLOBALS['db_table']['slideshows']);
while ($row = $requete->fetch()) {
echo '<option value="'.$row['id'].'">'.stripcslashes($row['name']).'</option>';
}
echo '</select>';
echo '</div>';
echo '</div>';
echo '</div>';
// Partie de droite
echo '<div class="span6">';
echo '<div class="control-group">';
echo '<label class="control-label" for="meta_caption">meta-description :</label>';
echo '<div class="controls">';
echo '<input style="width:287px" name="meta_caption" type="text">';
echo '</div>';
echo '</div>';
echo '<div class="control-group">';
echo '<label class="control-label" for="meta_keywords">Mots-clés :</label>';
echo '<div class="controls">';
echo '<input style="width:287px" name="meta_keywords" type="text">';
echo '</div>';
echo '</div>';
echo '<div class="control-group">';
echo '<label class="control-label" for="slideshow">Menu :</label>';
echo '<div class="controls">';
echo '<select name="location" data-placeholder="Veuillez sélectionner un menu !" class="chosen-select" style="width:300px;">';
echo '<option value=""></option>';
echo '<option value="2">Bas</option>';
echo '<option value="3">Colonne</option>';
echo '</select>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="control-group">';
echo '<label class="control-label" for="content">Contenu :</label>';
echo '<div class="controls">';
echo '<textarea rows="7" name="content" id="content" style="width: 900px; height: 300px;"></textarea>';
echo '<script>
var ckedit = CKEDITOR.replace( \'content\' ,{
filebrowserBrowseUrl : \'includes/filemanager/dialog.php?type=2&editor=ckeditor&fldr=\',
filebrowserUploadUrl : \'includes/filemanager/dialog.php?type=2&editor=ckeditor&fldr=\',
filebrowserImageBrowseUrl : \'includes/filemanager/dialog.php?type=1&editor=ckeditor&fldr=\'
});
</script>';
echo '</div>';
echo '</div>';
?>
</form>
</div>
<script type="text/javascript" src="assets/js/chosen.jquery.js" ></script>
<script type="text/javascript">
var config = {
'.chosen-select' : {},
'.chosen-select-deselect' : {allow_single_deselect:true},
'.chosen-select-no-single' : {disable_search_threshold:10},
'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
'.chosen-select-width' : {width:"95%"}
}
for (var selector in config) {
$(selector).chosen(config[selector]);
}
</script>
<?
include_once('includes/footer.php');
?>