268 lines
12 KiB
PHP
Executable File
268 lines
12 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// cete page sert a la creation
|
|
|
|
// -----------------------------------------------------
|
|
// Init
|
|
// -----------------------------------------------------
|
|
include ("../../../_include/headers.php");
|
|
$_SESSION['jeviensDeIndex']=3;
|
|
$_SESSION['jeviensDeAdminIndex']=2;
|
|
include ("./_modales/modale.init.php");
|
|
// $_SESSION['lgCouranteCode']='FRA';
|
|
if (empty($_SESSION['lgCouranteCode'])) {if (isset($_SESSION['lg'])) {$_SESSION['lgCouranteCode']=$_SESSION['lg'];}}
|
|
$theTheme='';
|
|
|
|
// -----------------------------------------------------
|
|
// POST
|
|
// -----------------------------------------------------
|
|
include ("pageCreate.post.php");
|
|
|
|
// -----------------------------------------------------
|
|
// Req insert
|
|
// -----------------------------------------------------
|
|
if (isset($_POST["creer"])) {
|
|
if ($_POST["creer"]=='Créer') {
|
|
include ("selectMaxPage.php");
|
|
$theIdPage=$nextID+1;
|
|
if ($theIdItem=='') $theIdItem=1;
|
|
include ("./page/pageReqInsert.php");
|
|
}
|
|
else {
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['_POST["creer"]' => $_POST["creer"]], '');}
|
|
}
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Debug
|
|
// -----------------------------------------------------
|
|
if (isset($debug[1]) && $debug[1] == '1') {include ("pageCreate.debug.php");}
|
|
|
|
// -----------------------------------------------------
|
|
// Html
|
|
// -----------------------------------------------------
|
|
echo '<!DOCTYPE html>';
|
|
echo '<html>';
|
|
echo '<head>';
|
|
include ($includePathAdmin. "/adminInclude/admin.head.php");
|
|
echo '<script type="text/javascript" src="pageGestion.js" ></script>';
|
|
if (isset($_POST["modifier"])) {
|
|
if ($_POST["modifier"]=='Fin')
|
|
{echo '<meta http-equiv="refresh" content="0; URL=frm.page.php" />';}
|
|
}
|
|
echo '</head>';
|
|
|
|
// -----------------------------------------------------
|
|
// Body
|
|
// -----------------------------------------------------
|
|
|
|
echo '<body onLoad="charge();" >';
|
|
|
|
|
|
|
|
echo '<div id="modaleGene" >';
|
|
echo '<div class="popupGene" style="max-width:55%;" >';
|
|
echo '<div id="zonePageModales" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Titre de page
|
|
// -----------------------------------------------------
|
|
|
|
echo '<div id="zoneTitreModales" > ';
|
|
echo '<img border="0" valign="top" align="center" src="' .$includeAdminDesign. '/design.png" alt="Titre" title="Titre" /> ';
|
|
echo '<span class="titreWbm" >Création de pages</span>';
|
|
|
|
// Bouton fermer
|
|
echo '<a href="../../frm.page.php" >';
|
|
echo '<span class="fad fa-times-circle btn_close" onClick="document.getElementById(\'modaleSection\').style.display=\'none\';" title="fermer la fenêtre"> </span>';
|
|
echo '</a>';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Boite aide
|
|
// -----------------------------------------------------
|
|
|
|
echo '<div id="boiteAide" onMouseOver="charge();" >';
|
|
echo '<span align="center" >';
|
|
echo '<a href="https://123ventes.com" >'; include ($includeAdminDesign. "/123ventes.html"); echo '</a>';
|
|
echo '</span>';
|
|
echo '<span class="popupAide" id="over" >';
|
|
echo '<br><p>
|
|
<br><i class="fa-duotone fa-circle-info"></i>
|
|
Gérez vos pages !
|
|
<br><br> <i class="fad fa-file-audio" style="color:green;fill:green;"></i> 
|
|
 Pour chaque page choisissez un nom de fichier et un emplacement.
|
|
<br><br><i class="fad fa-hands-helping"></i>
|
|
L\'assistant vous conduira pour créer les contenus de chaque langue.
|
|
</p>
|
|
</span>
|
|
';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Zone Form
|
|
// -----------------------------------------------------
|
|
|
|
echo '<div id="zoneFormModales" style="border-top-left-radius:0px; border-top-right-radius:0px; grid-column:auto;" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés
|
|
// -----------------------------------------------------
|
|
|
|
// echo '<input type="hidden" name="theFicPage" id="theFicPage" value="' .$theFicPage. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// Nom
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
$title="Entrez un nom pour la page, sans espace, accents, ni caractères speciaux.";
|
|
echo '<span class="libChampsWebmaster" title="' .$title. '" >';
|
|
echo 'Nom de la page : ';
|
|
echo '<input type="text" class="inputWebmaster" name="theNomPage" value="' .$theNomPage. '" title="' .$title. '" />';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Description
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
$title="Entrez une description pour la page";
|
|
echo '<span class="libChampsWebmaster" title="' .$title. '">Description :';
|
|
echo '<input type="text" class="inputWebmaster" name="theDescPage" value="' .$theDescPage. '" title="' .$title. '" />';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Emplacement
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
include ("emplacements.php");
|
|
$title="Choisissez un emplacement";
|
|
echo '<span class="libChampsWebmaster" title="' .$title. '">Emplacement : ';
|
|
echo '<select class="selectWbm" id="theTheme" name="theTheme" onClick="choixTypeAdd(this.value);" >';
|
|
for ($i=0; $i< count($theme); $i++) {
|
|
if ($theme[$i]==$theTheme)
|
|
{echo '<option value="' .$theme[$i]. '" selected>' .$theme[$i]. '</option>';}
|
|
else
|
|
{echo '<option value="' .$theme[$i]. '" >' .$theme[$i]. '</option>';}
|
|
}
|
|
echo '</select>';
|
|
echo '<input type="text" class="inputWebmaster" style="width:80%;" name="theEmplacement" id="theEmplacement" value="' .$theEmplacement. '" title="' .$title. '" />';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Absolu
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
$title="Choisissez des liens absolus pour les mails et le contenu distant";
|
|
echo '<span class="libChampsWebmaster" title="' .$title. '">Utiliser des liens absolus : ';
|
|
if ($absolu==1) {
|
|
echo '<input class="inputWebmaster" type="radio" name="absolu" value="1" checked onClick="checkAbsolu();"><label for="typeMails">Absolu</label>  ';
|
|
echo '<input class="inputWebmaster" type="radio" name="absolu" value="2" onClick="checkAbsolu();"><label for="typeMails">Relatif</label>';
|
|
}
|
|
else {
|
|
echo '<input class="inputWebmaster" type="radio" name="absolu" value="1" onClick="checkAbsolu();"><label for="typeMails"Absolu</label>  ';
|
|
echo '<input class="inputWebmaster" type="radio" name="absolu" value="2" checked onClick="checkAbsolu();"><label for="typeMails">Relatif</label>';
|
|
}
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// isHtml
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
$title="Choisissez un format de sortie : html pour les mails sinon php";
|
|
echo '<span class="libChampsWebmaster" title="' .$title. '">Format : ';
|
|
if ($isHtml==1) {
|
|
echo '<input class="inputWebmaster" type="radio" name="isHtml" value="1" checked onClick="checkAbsolu();"><label for="typeMails">Format HTML</label>  ';
|
|
echo '<input class="inputWebmaster" type="radio" name="isHtml" value="2" onClick="checkAbsolu();"><label for="typeMails">Format PHP</label>';
|
|
}
|
|
else {
|
|
echo '<input class="inputWebmaster" type="radio" name="isHtml" value="1" onClick="checkAbsolu();"><label for="typeMails">Format HTML</label>  ';
|
|
echo '<input class="inputWebmaster" type="radio" name="isHtml" value="2" checked onClick="checkAbsolu();"><label for="typeMails">Format PHP</label>';
|
|
}
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Activer
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
// $title="Activez ou desactivez cette page";
|
|
// -----------------------------------------------------
|
|
|
|
// echo '<br>';
|
|
// echo '<span class="libChampsWebmaster" title="' .$title. '">Activer : ';
|
|
// include ("activPages.php");
|
|
// if ($activPage=='O')
|
|
// {echo '<input onClick="activ();" type="checkBox" style="width:20px;align:left;" class="inputWebmaster" name="activPage" id="activPage" value="' .$activPage. '" title="' .$title. '" checked />'; }
|
|
// else
|
|
// {echo '<input onClick="activ();" type="checkBox" style="width:20px;align:left;" class="inputWebmaster" name="activPage" id="activPage" value="' .$activPage. '" title="' .$title. '" />'; }
|
|
// echo '</span>';
|
|
echo '</div>';
|
|
|
|
echo '<div id="zoneValidateModales" >';
|
|
// -----------------------------------------------------
|
|
// Boutons
|
|
// -----------------------------------------------------
|
|
|
|
if (isset($_POST["creer"]) && $_POST["creer"]=='Créer') {
|
|
echo '<button class="boutonsWebmaster" title="Cliquez pour valider vos changements" value="Fin" name="creer" id="creer" type="submit" >';
|
|
echo '<i class="fad fa-chevron-circle-left"></i>';
|
|
echo ' Retour </span>';
|
|
echo '</button>';
|
|
}
|
|
|
|
if (empty($_POST["creer"]) && $initCreaPage=='creer') {
|
|
echo '<button class="boutonsWebmaster" title="Cliquez pour valider vos changements" value="Créer" name="creer" id="creer" type="submit" >';
|
|
echo '<i class="fad fa-plus"></i> ';
|
|
echo 'Créer ';
|
|
echo '</button>';
|
|
}
|
|
// echo '</form>';
|
|
|
|
// -----------------------------------------------------
|
|
// Gestion des items
|
|
// -----------------------------------------------------
|
|
|
|
// -----------------------------------------------------
|
|
if ($initCreaPage!='creer' || ( isset($_POST["creer"]) && $_POST["creer"]=='Fin')) {
|
|
echo '<div style="border:1px solid lightgrey;border-radius:7px;margin:1px;margin-left:0px;margin-right:0px;padding:1px;padding-top:20px;padding-bottom:20px;align:top;" >';
|
|
echo ' <span style="width:150px;" onClick="choixCodeOpeITEM(\'creer\');" class="boutonsMenusWbm" title="Ajout d\'un contenu" >';
|
|
echo '<i class="fad fa-plus"></i> ';
|
|
echo 'Créer un contenu';
|
|
echo '</span>';
|
|
echo '</div>';
|
|
}
|
|
|
|
if ($theIdPage!='') {
|
|
echo '<div style="border:1px solid lightgrey;margin:1px;padding:2px;align:top;" >';
|
|
if (file_exists( "." .$theEmplacement .$theFicPage )) {
|
|
|
|
include ("02-genererContenuPage.php");
|
|
$thePagePreview=str_replace('./','../../../',$thePagePreview);
|
|
echo $thePagePreview;
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Emplacement :' => '', 'theEmplacement' => $theEmplacement, 'theFicPage' => $theFicPage], '');}
|
|
}
|
|
else
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['theEmplacement' => $theEmplacement, 'theFicPage' => $theFicPage], '');}
|
|
echo '</div>';
|
|
}
|
|
echo '</div>'; //zone valider
|
|
|
|
// -----------------------------------------------------
|
|
// usrMsg
|
|
// -----------------------------------------------------
|
|
|
|
include ("./adminInclude/adminMsg.php");
|
|
|
|
echo '</div>'; //page
|
|
echo '</div>'; //popup
|
|
echo '</div>'; //modale
|
|
|
|
echo '</body>';
|
|
echo '</html>';
|
|
include ("./adminInclude/admin.finSess.php");
|
|
?>
|