alpha_full/admin/options/moyensL/grilleTarifaire/gt.reqRemovePays2Zone.php
2026-04-06 22:58:51 +02:00

28 lines
1.3 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
if (isset($debug[2]) && $debug[2] == '1') {
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['$tabPaysZone[0]' => $tabPaysZone[0], '$theIdPays' => $theIdPays], '');}
}
if (substr($tabPaysZone[0],0,1)==';') {
$test=strlen($tabPaysZone[0]);
$test=$test-1;
$tabPaysZone[0]=substr($tabPaysZone[0], 1, $test);
if (isset($debug[2]) && $debug[2] == '1') {
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['test' => $test, '$tabPaysZone[0]' => $tabPaysZone[0]], '');}
}
}
$tabPaysZone[0]=str_replace( $theIdPays,'',$tabPaysZone[0]);
$tabPaysZone[0]=str_replace( ';',';',$tabPaysZone[0]);
$reqUpdate="UPDATE `zones` SET paysListe='" .$tabPaysZone[0]. "' WHERE idMl='" .$idMl. "' and idZone='" .$theIdZone. "' ;";
if (isset($debug[2]) && $debug[2] == '1') {
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['reqUpdate' => $reqUpdate], 'gt.reqRemovePays2Zone.php');}
}
$resConn='';
$resConn=$idPdo->query($reqUpdate);
if ($resConn) {
$admMsg .= "&#160; Mise à jour du pays effectué avec succès !"; $admMsgClass='ok';
}
else {
$admMsg .= "&#160; Echec de la mise à jour du pays " .$theIdPays. ". (fichier gt.reqUpdatePays2Zone.php) ==> " .$reqUpdate; $admMsgClass='ko';
}
?>