145 lines
7.5 KiB
PHP
Executable File
145 lines
7.5 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Etre admin
|
|
// -----------------------------------------------------
|
|
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O' ) {
|
|
|
|
// -----------------------------------------------------
|
|
// Init
|
|
// -----------------------------------------------------
|
|
$idMl=1;
|
|
$lg='FRA';
|
|
$tabIdZoneMl=array();
|
|
|
|
// -----------------------------------------------------
|
|
// Update
|
|
// -----------------------------------------------------
|
|
if ($codeOpe==='upTarif') {include ("gt.reqUpdateTarif.php"); }
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update activ' => ''], '');}
|
|
|
|
if ($codeOpe==='upLibGt') {include ("gt.reqUpdateZone.php"); }
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update activ' => ''], '');}
|
|
|
|
if ($codeOpe==='delZone') {include ("gt.reqDelZone.php"); }
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de delete zone' => ''], '');}
|
|
|
|
if ($codeOpe==='upIdentifiants') {include ("gt.reqUpML.php"); }
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de up identifiants' => ''], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Select
|
|
// -----------------------------------------------------
|
|
include ("gt.reqSelectZone.php");
|
|
include ("gt.reqSelectModeLiv.php");
|
|
|
|
// -----------------------------------------------------
|
|
// Debug
|
|
// -----------------------------------------------------
|
|
if (isset($debug[1]) && $debug[1] == '1') {include ("gt.debug.php"); }
|
|
|
|
// -----------------------------------------------------
|
|
// Formulaire
|
|
// -----------------------------------------------------
|
|
echo '<form name="GT" id="GT" method="POST" >';
|
|
|
|
echo '<div id="zoneFormModales">';
|
|
|
|
// -----------------------------------------------------
|
|
// Popup aide + liens + boutons
|
|
// -----------------------------------------------------
|
|
echo '<div >';
|
|
echo '<span class="info-icon fad fa-info-circle" onMouseOver="openPopup(\'T\');" onMouseLeave="closePopup(\'T\');"></span>';
|
|
echo '<div id="popupInfoT" class="popup">';
|
|
echo '<div class="popup-content">';
|
|
echo '<span class="popup-close" onClick="closePopup(\'T\');">×</span>';
|
|
echo '<img src="./adminInclude/designAdmin/info.png" alt="Info" class="popup-icon" />';
|
|
echo '<p>Ici vous pouvez définir des zones géographiques, puis leur associer une ville et un pays ainsi qu\'une grille tarifaire, c\'est à dire unn prix en fonction du poids et de la distance.</p>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Liens supplémentaires
|
|
// lien supplementaire colissimo
|
|
if (isset($libelleM) && $libelleM=="Colissimo à domicile" || $idMl==1)
|
|
echo '<span class="boutonsWebmaster"><i class="fad fa-file"></i><a target="_blank" href="https://www.laposte.fr/pdf-interactifs/tarifs/entreprise/catalogues/metropole/index.html#page/96-97">Voir les tarifs entreprise</a></span>';
|
|
|
|
// lien supplementaire mondial relay
|
|
if (isset($libelleM) && $libelleM=="Mondial relay" || $idMl==8) {
|
|
echo '<span class="boutonsWebmaster"><a href="https://www.mondialrelay.fr/envoi-de-colis/premiere-visite/#Tarifs" target="_blank">Tarifs</a></span>';
|
|
echo '<span class="boutonsWebmaster"><a href="https://www.mondialrelay.fr/" target="_blank">S\'inscrire et obtenir une clé API</a></span>';
|
|
echo '<span class="boutonsWebmaster"><a href="hhttps://connect.mondialrelay.com/YETI/Account/LogOn?ReturnUrl=%2f" target="_blank">Envoi et Suivi</a></span>';
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Btn ajouter zone
|
|
// -----------------------------------------------------
|
|
echo '<span class="boutonsWebmaster" >';
|
|
echo '<span onClick="window.self.location=\'./frmModale.php?affModale=6-5&idMl=' .$idMl. '\'; "><i class="fad fa-plus"></i>  Ajouter une zone tarifaire  </span>';
|
|
echo '</span>';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés
|
|
// -----------------------------------------------------
|
|
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="theIdZone" id="theIdZone" value="' .$theIdZone. '" />';
|
|
echo '<input type="hidden" name="theTarif" id="theTarif" value="' .$theTarif. '" />';
|
|
echo '<input type="hidden" name="theName" id="theName" value="' .$theName. '" />';
|
|
echo '<input type="hidden" name="theLib" id="theLib" value="' .$theLib. '" />';
|
|
echo '<input type="hidden" name="idMl" id="idMl" value="' .$idMl. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// Compte
|
|
// -----------------------------------------------------
|
|
echo '<span class="libChampsWebmaster" style="width:100%; ">Type : ' .$typeMl. '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Identifiant
|
|
// -----------------------------------------------------
|
|
echo '<span class="libChampsWebmaster" style="width:100%; ">' .$libelleCompteMl. ' : ';
|
|
echo '<input class="inputWebmaster" id="theIdentifiant" name="theIdentifiant" style="width:50%; " value="' .$idCompteMl. '" onChange="upIdentifiants(' .$idMl. '); " >';
|
|
echo '</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Password
|
|
// -----------------------------------------------------
|
|
echo '<span class="libChampsWebmaster" style="width:100%; ">' .$libellePwdMl. ' : ';
|
|
echo '<input class="inputWebmaster" id="thePwd" name="thePwd" style="width:50%; " value="' .$pwdCompteMl. '" onChange="upIdentifiants(' .$idMl. '); " >';
|
|
echo '</span>';
|
|
|
|
if (!empty($tabIdZone)) {
|
|
for ($i=0; $i<count($tabIdZone); $i++) {
|
|
echo '<div style="border:1px solid lightgrey; margin:7px; padding:3px; " >';
|
|
|
|
// -----------------------------------------------------
|
|
// conf + Libelle + ajout + delete
|
|
// -----------------------------------------------------
|
|
echo '<div class="libChampsWebmaster fondColorListe" style="width:100%;" >';
|
|
// echo '<span >';
|
|
echo '<span class="fa fad fa-cog" onClick="window.location=\'./frmModale.php?affModale=6-3&idMl=' .$idMl. '&theIdZone=' .$tabIdZone[$i]. '\'; "> </span>';
|
|
// echo '    ';
|
|
// echo '</span>';
|
|
|
|
echo '<span ><input class="inputWebmaster" style="width:85%" type="text" onChange="gtLib(this.value,' .$tabIdZone[$i]. ')" name="libZone" id="libZone' .$tabIdZone[$i]. '" value="'.($tabIdDescZone[$i]). '" title="Libellé de la zone"/></span>';
|
|
|
|
echo '  ';
|
|
echo '<span ><i class="fad fa-exchange" style="color:blue; cursor:pointer; " onClick="window.self.location=\'./frmModale.php?affModale=6-6&idMl=' .$idMl. '&theIdZone=' .$tabIdZone[$i]. '\'; " >';
|
|
echo '</i></span>';
|
|
|
|
echo '  ';
|
|
echo '<span ><i class="fad fa-trash-alt" style="color:red; fill:red; cursor:pointer; " onClick="zoneDelete(' .$tabIdZone[$i]. '); "></i></span>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
}
|
|
echo '</div>';
|
|
echo '</form>';
|
|
|
|
}
|
|
else {
|
|
$confPath="../_conf";
|
|
include ("./adminInclude/redirectionAdmin.php");
|
|
}
|
|
?>
|