195 lines
10 KiB
PHP
Executable File
195 lines
10 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Variables
|
|
// -----------------------------------------------------
|
|
$idTva2=0;
|
|
|
|
// -----------------------------------------------------
|
|
// Post
|
|
// -----------------------------------------------------
|
|
include ("ml.post.php");
|
|
|
|
// -----------------------------------------------------
|
|
// Requete count langues
|
|
// -----------------------------------------------------
|
|
if (empty($tableLangueCode) or $refresh=='Oui') { include ($includePath. "/req/03-init.langueActives.php"); }
|
|
|
|
// -----------------------------------------------------
|
|
// Upload
|
|
// -----------------------------------------------------
|
|
if (isset($_FILES['fileToUpload'.$theIdLiv]['tmp_name']) && $_FILES['fileToUpload'.$theIdLiv]['tmp_name']!='')
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['upload fait' => ''], '');}
|
|
else
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(1, ['upload' => 'Non'],''); }
|
|
|
|
// -----------------------------------------------------
|
|
// Update
|
|
//
|
|
if ($codeOpe==='upActiv') {include ("ml.reqUpActiv.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update activ' => ''], '');}
|
|
|
|
if ($codeOpe==='upLib') {include ("ml.reqUpLib.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update lib' => ''], '');}
|
|
|
|
if ($codeOpe==='upCoeff') {include ("ml.reqUpCoeff.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update coeff' => ''], '');}
|
|
|
|
if ($codeOpe==='upIcoMl' && $uploadOk==1) {include ("ml.reqUpIco.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update ico' => ''], '');}
|
|
|
|
if ($codeOpe==='upIcoMlClass') {include ("ml.reqUpIco.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update ico class' => ''], '');}
|
|
|
|
if ($codeOpe==='upTvaMl') {include ("ml.reqUpTva.php");}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update tva' => ''], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Select
|
|
// -----------------------------------------------------
|
|
include ("ml.reqSelect.php");
|
|
include ("./catalog/req/reqAllTVA.php");
|
|
|
|
// -----------------------------------------------------
|
|
// Debug
|
|
// -----------------------------------------------------
|
|
if (isset($debug[1]) && $debug[1] == '1') {include ("ml.debug.php");}
|
|
|
|
// -----------------------------------------------------
|
|
// Gestion avancement
|
|
// -----------------------------------------------------
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Veuillez configurer un mode de livraison pour activer cette étape' => ''], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Form
|
|
// -----------------------------------------------------
|
|
echo '<form name="MLF" id="MLF" method="POST" enctype="multipart/form-data" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés
|
|
// -----------------------------------------------------
|
|
echo '<input type="hidden" name="modifLg" id="modifLg" value="' .$modifLg. '" />';
|
|
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="' .$codeOpe. '" />';
|
|
echo '<input type="hidden" name="lgCourante" id="lgCourante" value="' .$_SESSION['lgCouranteCode']. '" />';
|
|
echo '<input type="hidden" name="theIdLiv" id="theIdLiv" value="' .$theIdLiv. '" />';
|
|
echo '<input type="hidden" name="activLiv2" id="activLiv2" value="' .$activLiv2. '" />';
|
|
echo '<input type="hidden" name="libLiv2" id="libLiv2" value="' .$libLiv2. '" />';
|
|
echo '<input type="hidden" name="idTva2" id="idTva2" value="' .$idTva2. '" />';
|
|
echo '<input type="hidden" name="theFichier" id="theFichier" value="' .$theFichier. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// List box langues
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneRechercheWbm" >';
|
|
$lgLien="affAdmin=6&optAff=2";
|
|
// echo '<div style="display:inline" >';
|
|
if ($_SESSION['nbLg']>1) {include ($includePathAdmin. "/drapeaux/drapeauxListBox.php");}
|
|
// echo '</div>';
|
|
// echo '<a href="https://tarifs-postaux.fr/tarif-colissimo.htm" target="_blank">Site Colissimo</a>';
|
|
echo '</div>';
|
|
|
|
echo '<div id="gridT" class="flexToColumn" style="display:grid; justify-items:left; font-size:1rem; align-items:left; justify-content:space-evenly; grid-template-columns: 0.5fr 1fr 1fr 1fr 1fr 1fr; margin:auto; width:100%; padding-top:12px;" >';
|
|
echo '<span class="libelleLV" style="grid-column:1;width:100%; position:sticky; top:160px; z-index:10 ">Configurer</span>';
|
|
echo '<span class="libelleLV" style="grid-column:2;width:100%; position:sticky; top:160px; z-index:10 ">Site prestataire</span>';
|
|
echo '<span class="libelleLV" style="grid-column:3;width:100%; position:sticky; top:160px; z-index:10 ">Libellé affiché</span>';
|
|
echo '<span class="libelleLV" style="grid-column:4;width:100%; position:sticky; top:160px; z-index:10 ">TVA</span>';
|
|
echo '<span class="libelleLV" style="grid-column:5;width:100%; position:sticky; top:160px; z-index:10 ">Activation</span>';
|
|
echo '<span class="libelleLV" style="grid-column:6 / span 2;width:100%; position:sticky; top:160px; z-index:10 ">Icône</span>';
|
|
|
|
for ($i=0;$i<count($tabIdMl);$i++) {
|
|
if ($i==0) echo '<br>';
|
|
|
|
//filtre pour les modes pas encore prets
|
|
if ($i!=0 && $i!=1 && $i!=2 && $i!=3 && $i!=8 ) {
|
|
// -----------------------------------------------------
|
|
// ID
|
|
// echo '<span >' .$tabIdMl[$i]. '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Reglages
|
|
// -----------------------------------------------------
|
|
echo '<span class="inputLV" style="grid-column:1;padding:5px;" >';
|
|
echo '<span class="fa-2x fad fa-cog" style="color:#E3680C;cursor:pointer;" onClick="window.location=\'./frmModale.php?affModale=6-2&idMl=' .$tabIdMl[$i]. '\';"></span>';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Lien site
|
|
// -----------------------------------------------------
|
|
echo '<span class="inputLV" style="grid-column:2;padding:5px;" >';
|
|
echo '<a href="' .$tabSiteML[$i]. '" target="_blank">' .$tabDescMl[$i]. '</a>';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Libellé
|
|
// -----------------------------------------------------
|
|
echo '<span style="grid-column:3;padding:5px;" >';
|
|
echo '<input class="inputLV" type="text" onChange="libMl(this.value,' .$tabIdMl[$i]. ')" name="libLiv" id="libLiv' .$tabIdMl[$i]. '" value="' .$tabLibelleMl[$i]. '" title="Libellé du mode de livraison"/>';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// TVA
|
|
// -----------------------------------------------------
|
|
if ($tabIdTvaML[$i]=="")$tabIdTvaML[$i]=0;
|
|
echo '<select class="selectWbm" name="idTvaLiv" id="idTvaLiv' .$tabIdMl[$i]. '" style="width:70px; grid-column:4; margin-top:5px;" onChange="upTvalMl(this.value,' .$tabIdMl[$i]. ')" name="idTvaLiv" id="idTvaLiv' .$tabIdMl[$i]. '" value="' .$tabIdTvaML[$i]. '" title="TVA" >';
|
|
for($j=0; $j< count($tabIdTva) ; $j++) {
|
|
if ($tabIdTva[$j]==$tabIdTvaML[$i])
|
|
{echo '<option value=' .$tabIdTva[$j]. ' selected>' .$tabTauxTva[$j]. '</option>';}
|
|
else
|
|
{echo '<option value=' .$tabIdTva[$j]. ' >' .$tabTauxTva[$j]. '</option>';}
|
|
}
|
|
echo '</select>';
|
|
|
|
// -----------------------------------------------------
|
|
// Activation
|
|
// -----------------------------------------------------
|
|
echo '<span style="grid-column:5; vertical-align: middle;" >Activer :';
|
|
|
|
if ($tabAfficherMl[$i]==1)
|
|
{echo '<input type="checkbox" checked onClick="activMl(' .$tabIdMl[$i]. ')" name="actLiv" id="actLiv' .$tabIdMl[$i]. '" value="1" title="Activation du mode de Livraison"/>';
|
|
}
|
|
else
|
|
{echo '<input type="checkbox" onClick="activMl(' .$tabIdMl[$i]. ')" name="actLiv" id="actLiv' .$tabIdMl[$i]. '" value="0" title="Activation du mode de livraison"/>';
|
|
}
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Ico
|
|
// -----------------------------------------------------
|
|
echo '<span style="width:100%; grid-column:6; vertical-align: middle; border-bottom:1px solid white;" >';
|
|
echo ' ';
|
|
$test=strtolower(substr($tabIcoML[$i],-3));
|
|
if ($test=='jpg' || $test=='peg' || $test=='gif' || $test=='svg' || $test=='png' || $test=='bmp') {
|
|
echo '<img style="vertical-align: middle; max-width:20%; margin-bottom:5px;" src=".' .$tabIcoML[$i]. '" />';
|
|
echo ' ';
|
|
}
|
|
else {
|
|
echo '<span class="' .$tabIcoML[$i]. '" style="margin:1px;" ></span>';
|
|
echo ' ';
|
|
}
|
|
echo '<input onChange="updateIcoLiv(this.value,' .$tabIdMl[$i]. ');" class="inputLV" type="text" name="icoLiv" id="icoLiv" value="' .$tabIcoML[$i]. '" title="Saisir une icône de classe" style="padding:3px;margin-bottom:5px;" >';
|
|
echo ' ';
|
|
echo ' <label for="fileToUpload' .$tabIdMl[$i]. '" >';
|
|
echo '<span class="boutonsWebmaster" style="margin-top:7px;" data-tooltip="Cliquez ici pour parcourir les dossiers de votre ordinateur. Formats : png, jpg, bmp, gif autorisés. " >';
|
|
echo '<i class="fad fa-download""></i>';
|
|
echo '</span>';
|
|
echo '</label>';
|
|
// echo 'Choisir une icône (ou saisie)';
|
|
echo '<input style="display:none;" type="file" name="fileToUpload' .$tabIdMl[$i]. '" id="fileToUpload' .$tabIdMl[$i]. '" onChange="upIcoMl(' .$tabIdMl[$i]. ');" >';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Séparation
|
|
// -----------------------------------------------------
|
|
echo '<br><span class="fondColorListe" style="grid-column:1 / span 6; padding-bottom:1px; height:1%; width:100%;" >';
|
|
echo '</span>';
|
|
}
|
|
}
|
|
echo '</div>'; //grid
|
|
|
|
// -----------------------------------------------------
|
|
// Submit
|
|
// -----------------------------------------------------
|
|
echo '<div class="zoneValidate" style="width:95%;" >';
|
|
echo '</div>';
|
|
echo '</form>';
|
|
?>
|