64 lines
3.2 KiB
PHP
Executable File
64 lines
3.2 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
|
|
// -----------------------------------------------------
|
|
// Form - 5
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneFormWbm" style="display:grid; grid-template-columns:60% 40%; width:100%;" >';
|
|
echo '<form name="frmPage" id="frmPage" method="POST" enctype="multipart/form-data" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Page preview
|
|
// -----------------------------------------------------
|
|
echo '<div id="frameGauche" style="grid-column:1; text-align:center; margin-right:5px; margin-left:5px;" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Select item
|
|
// -----------------------------------------------------
|
|
$title="Les items selectionnés sont encadrés en orange";
|
|
echo '<span class="libChampsWebmaster" title="'.$title.'" style="padding-top:7px; padding-bottom:7px;width:80%; margin:10px; border:1px solid lightgrey" >Sélectionnez un item de la page : ';
|
|
echo '<select class="selectWbm" name="theIdItem" id="theIdItem" onChange="document.getElementById(\'codeOpe\').value=\'-\';document.frmPage.submit();" >';
|
|
for ($i=0; $i < count($tabIdItem); $i++) {
|
|
if ($theIdItem==$tabIdItem[$i]) {
|
|
echo '<option value="'.$tabIdItem[$i].'" selected>'.$tabNomItem[$i].' ('.$tabIdItem[$i].')'.'</option>';
|
|
}
|
|
else
|
|
{echo '<option value="'.$tabIdItem[$i].'" >'.$tabNomItem[$i].' ('.$tabIdItem[$i].')'.'</option>';}
|
|
}
|
|
echo '</select>';
|
|
echo '</span>';
|
|
|
|
//if(!isset($theIdPage)) $theIdPage=1;
|
|
if (file_exists( ".".$theEmplacement.$theFicPage ) ) {
|
|
$lire= file_get_contents(".".$theEmplacement.$theFicPage);
|
|
$lire = str_replace('<?php' ,'' ,$lire);
|
|
$lire = str_replace('?>' ,'' ,$lire);
|
|
$lire = str_replace('echo ' ,'' ,$lire);
|
|
$lire = str_replace('<img ' ,'<img style="max-width:100%" ' , $lire);
|
|
$lire = str_replace(';' ,'' ,$lire);
|
|
$lire = str_replace('\\' ,'' ,$lire);
|
|
// $lire = str_replace('<img' ,'<img width=23% ' ,$lire);
|
|
$lire = str_replace('\'' ,'' ,$lire);
|
|
$lire = str_replace('./' ,'../' ,$lire);
|
|
if (isset($debug[2]) && $debug[2] == '1') $debugMsg .= monDebug(1,['lire' => $lire],'');
|
|
}
|
|
else if (isset($debug[1]) && $debug[1] == '1') $debugMsg .= monDebug(1,['Emplacement invalide' => ".".$theEmplacement.$theFicPage], 'page.form.php');
|
|
if (isset($lire)) echo $lire;
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés
|
|
// -----------------------------------------------------
|
|
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="'.$codeOpe.'" >';
|
|
echo '<input type="hidden" name="lg" id="lg" value="'.$lg.'" >';
|
|
echo '<input type="hidden" name="lgCourante" id="lgCourante" value="'.$_SESSION['lgCouranteCode'].'" >';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Zone droite
|
|
// -----------------------------------------------------
|
|
echo '<div style="grid-column:2; border:1px solid lightgrey; padding:15px; " >';
|
|
include("zoneDroite.php");
|
|
echo '</div>';
|
|
echo '</form>';
|
|
echo '</div>';
|
|
?>
|