82 lines
3.5 KiB
PHP
Executable File
82 lines
3.5 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
$reqUpdate="UPDATE `languenav` SET ";
|
|
|
|
if (!empty($theDescContact2)) $theDescContact2=addslashes($theDescContact2);
|
|
$theDescContact2=htmlspecialchars($theDescContact2, ENT_QUOTES,"UTF-8",false);
|
|
|
|
if (!empty($theLibContact2)) $theLibContact2=addslashes($theLibContact2);
|
|
$theLibContact2=htmlspecialchars($theLibContact2, ENT_QUOTES,"UTF-8",false);
|
|
|
|
if (!empty($thePopContact2)) $thePopContact2=addslashes($thePopContact2);
|
|
$thePopContact2=htmlspecialchars($thePopContact2, ENT_QUOTES,"UTF-8",false);
|
|
|
|
if ($theDescContact2!='') {$reqUpdate .= "`description`='" .$theDescContact2. "', ";}
|
|
if ($theLibContact2!='') {$reqUpdate .= "`" .$_SESSION['lgCouranteCode']. "`='" .$theLibContact2. "', ";}
|
|
if ($thePopContact2!='') {$reqUpdate .= "`title" .$_SESSION['lgCouranteCode']. "`='" .$thePopContact2. "', ";}
|
|
|
|
$rest = strlen($reqUpdate)-2;
|
|
$reqUpdate=substr($reqUpdate,0,$rest);
|
|
|
|
$reqUpdate .= " WHERE id=" .$theIdContact2. " ;";
|
|
|
|
$resConn=$idPdo->query($reqUpdate);
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['reqUpdate' => $reqUpdate], 'contact.reqUpdate.php');}
|
|
|
|
if ($resConn) {
|
|
$admMsg .= " Mise à jour contact effectuée avec succès !"; $admMsgClass='ok';
|
|
}
|
|
else {
|
|
$admMsg .= " Echec de la mise à jour contact"; $admMsgClass='ko';
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Mettre à jour avancement
|
|
// -----------------------------------------------------
|
|
if ($_SESSION['avEt1']==false) {
|
|
// test n° Siret
|
|
$reqSelect="SELECT '" .$lg. "' FROM languenav WHERE id=192;";
|
|
$resConn='';
|
|
$result=array();
|
|
|
|
$resConn=$idPdo->query($reqSelect);
|
|
$result=$resConn->fetch(PDO::FETCH_ASSOC);
|
|
$test=$result[$lg];
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['test' => $test], '');}
|
|
if ($test!='a compléter' && $test!='to complete') {
|
|
|
|
// test mail gerant
|
|
$reqSelect="SELECT '" .$lg. "' FROM languenav WHERE id=191;";
|
|
$resConn=$idPdo->query($reqSelect);
|
|
$result=$resConn->fetch(PDO::FETCH_ASSOC);
|
|
$test=$result[$lg];
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['test' => $test], '');}
|
|
if ($test!='master@123ventes.com') {
|
|
|
|
// test mail commercial
|
|
$reqSelect="SELECT '" .$lg. "' FROM languenav WHERE id=231;";
|
|
$resConn=$idPdo->query($reqSelect);
|
|
$result=$resConn->fetch(PDO::FETCH_ASSOC);
|
|
$test=$result[$lg];
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['test' => $test], '');}
|
|
if ($test!='master@123ventes.com') {
|
|
$resConn='';
|
|
|
|
$reqUpdate="UPDATE `avancement` set etapeStatut=1 WHERE etapeNum=1;";
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['reqUpdate' => $reqUpdate], 'contact.reqUpdate.php');}
|
|
|
|
$resConn='';
|
|
$resConn=$idPdo->query($reqUpdate);
|
|
if ($resConn) { if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Update etape1 ok' => ''], '');} }
|
|
else if (isset($debug[2]) && $debug[2] == '1' ) $admMsg .= '<br>Problème mise à jour etape1';
|
|
|
|
// -----------------------------------------------------
|
|
// On recharge Avancement
|
|
// -----------------------------------------------------
|
|
include ("./avancement/checkAvancement.php");
|
|
}
|
|
}
|
|
}
|
|
else { $admMsg .= 'Renseignez le mail commercial, le mail de la société et le N° de siret de la société pour compléter l\'étape'; }
|
|
}
|
|
?>
|