gestion evolution faible, forte issue #0000064 et correction apporté dans la branche 1.5
This commit is contained in:
commit
fc3b5747e9
@ -6,54 +6,45 @@
|
||||
*
|
||||
*/
|
||||
|
||||
function sendMail($sujet, $message, $from, $to, $cc = array() )
|
||||
function sendMail($sujet, $message, $from, $to, $cc = array())
|
||||
{
|
||||
require_once 'phpmailer/class.phpmailer.php';
|
||||
$mail = new PHPMailer(true);
|
||||
//Choix de la méthode d'envoi
|
||||
if(MAIL_METHOD == 'sendmail')
|
||||
{
|
||||
$mail->IsSendmail();
|
||||
}
|
||||
elseif(MAIL_METHOD == 'smtp')
|
||||
{
|
||||
$mail->IsSMTP();
|
||||
$mail->SMTPDebug = 0; // 0, 1, 2
|
||||
$mail->Host = MAIL_SMTPHOST;
|
||||
$mail->Port = defined(MAIL_SMTPPORT)? MAIL_SMTPPORT : 25;
|
||||
$mail->SMTPAuth = defined(MAIL_SMTPAUTH)? MAIL_SMTPAUTH : false;
|
||||
$mail->Username = defined(MAIL_SMTPUSER)? MAIL_SMTPUSER : '';
|
||||
$mail->Password = defined(MAIL_SMTPPASS)? MAIL_SMTPPASS : '';
|
||||
}
|
||||
//Spécification du charset
|
||||
$mail->CharSet = defined(CHARSET)? CHARSET : 'utf-8';
|
||||
//Envoi du mail
|
||||
try
|
||||
{
|
||||
$body = $message;
|
||||
$body = eregi_replace("[\]",'',$body);
|
||||
$mail->MessageID = '<'.md5(date('YmdHis')).
|
||||
'@mail.scores-decisions.com>';
|
||||
$mail->AddReplyTo($from['email'], $from['name']);
|
||||
$mail->SetFrom($from['email'], $from['name']);
|
||||
foreach($to as $info)
|
||||
{
|
||||
$mail->AddAddress($info['email'], $info['name']);
|
||||
}
|
||||
$mail->Subject = $sujet;
|
||||
$mail->MsgHTML($body);
|
||||
$mail->Send();
|
||||
return true;
|
||||
}
|
||||
catch (phpmailerException $e)
|
||||
{
|
||||
//Ecriture des erreurs dans un fichier (sujet, to)
|
||||
file_put_contents(
|
||||
PATH_DATA.'/mailerror.log',
|
||||
$e->errorMessage().' '.$to.' '.$sujet,
|
||||
FILE_APPEND
|
||||
);
|
||||
return false;
|
||||
}
|
||||
require_once 'phpmailer/class.phpmailer.php';
|
||||
$mail = new PHPMailer(true);
|
||||
// Choix de la méthode d'envoi
|
||||
if (MAIL_METHOD == 'sendmail') {
|
||||
$mail->IsSendmail();
|
||||
} else if (MAIL_METHOD == 'smtp') {
|
||||
$mail->IsSMTP();
|
||||
$mail->SMTPDebug = 0; // 0, 1, 2
|
||||
$mail->Host = MAIL_SMTPHOST;
|
||||
$mail->Port = defined('MAIL_SMTPPORT') ? MAIL_SMTPPORT : 25;
|
||||
$mail->SMTPAuth = defined('MAIL_SMTPAUTH') ? MAIL_SMTPAUTH : false;
|
||||
$mail->Username = defined('MAIL_SMTPUSER') ? MAIL_SMTPUSER : '';
|
||||
$mail->Password = defined('MAIL_SMTPPASS') ? MAIL_SMTPPASS : '';
|
||||
}
|
||||
// Spécification du charset
|
||||
$mail->CharSet = defined('CHARSET')? CHARSET : 'utf-8';
|
||||
// Envoi du mail
|
||||
try {
|
||||
$body = $message;
|
||||
$body = preg_replace('/\\\/', '', $body);
|
||||
$mail->MessageID = '<'.md5(date('YmdHis')).
|
||||
'@mail.scores-decisions.com>';
|
||||
$mail->AddReplyTo($from['email'], $from['name']);
|
||||
$mail->SetFrom($from['email'], $from['name']);
|
||||
foreach ($to as $info) {
|
||||
$mail->AddAddress($info['email'], $info['name']);
|
||||
}
|
||||
$mail->Subject = $sujet;
|
||||
$mail->MsgHTML($body);
|
||||
$mail->Send();
|
||||
return true;
|
||||
} catch (phpmailerException $e) {
|
||||
// Ecriture des erreurs dans un fichier (sujet, to)
|
||||
file_put_contents(PATH_DATA.'/mailerror.log',
|
||||
$e->errorMessage().' '.$to.' '.$sujet,
|
||||
FILE_APPEND);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,18 @@ require_once 'phpmailer/class.phpmailer.php';
|
||||
function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
|
||||
|
||||
global $firephp;
|
||||
|
||||
|
||||
$message = 'Request : '. $clientSoap->__getLastRequest() . '\n\n' .
|
||||
'Response : '.$clientSoap->__getLastResponse() . '\n\n';
|
||||
|
||||
|
||||
logSoapFault($message);
|
||||
|
||||
|
||||
$message = 'Request : '. htmlspecialchars($clientSoap->__getLastRequest()) . '<br/><br/>' .
|
||||
'Response : '. htmlspecialchars($clientSoap->__getLastResponse()) . '<br/><br/>';
|
||||
|
||||
|
||||
$firephp->log($clientSoap->__getLastRequest(),'getLastRequest');
|
||||
$firephp->log($clientSoap->__getLastResponse(),'getLastResponse');
|
||||
|
||||
|
||||
if(is_object($fault)){
|
||||
|
||||
}else{
|
||||
@ -39,12 +39,12 @@ function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
|
||||
$message.= '<br/>';
|
||||
$message.= 'Informations de debug : <br/>';
|
||||
$message.= '<pre>';
|
||||
$message.= 'REQUEST : '.print_r($_REQUEST,true).'<br/><br/>';
|
||||
$message.= 'SERVER : '.print_r($_REQUEST,true).'<br/><br/>';
|
||||
$message.= 'SESSION : '.print_r($_SESSION,true).'<br/><br/>';
|
||||
$message.= 'tabInfo : '.print_r($tabInfo,true).'<br/><br/>';
|
||||
$message.= 'REQUEST : '.print_r($_REQUEST, true).'<br/><br/>';
|
||||
$message.= 'SERVER : ' .print_r($_SERVER, true).'<br/><br/>';
|
||||
$message.= 'SESSION : '.print_r($_SESSION, true).'<br/><br/>';
|
||||
$message.= 'tabInfo : '.print_r($tabInfo, true).'<br/><br/>';
|
||||
$message.= '</pre>';
|
||||
|
||||
|
||||
if($debug == TRUE){
|
||||
print '<pre>';
|
||||
print $message;
|
||||
@ -61,8 +61,8 @@ function processSoapFault($clientSoap, $fault, $tabInfo, $debug = FALSE){
|
||||
*/
|
||||
function messageSoapFault()
|
||||
{
|
||||
(defined('ERROR_SOAP')) ?
|
||||
($message = ERROR_SOAP) :
|
||||
(defined('ERROR_SOAP')) ?
|
||||
($message = ERROR_SOAP) :
|
||||
($message = "Une erreur est survenue lors de votre requête");
|
||||
return $message;
|
||||
}
|
||||
@ -75,18 +75,18 @@ function messageSoapFault()
|
||||
function mailSoapFault($message)
|
||||
{
|
||||
require_once 'mail/mail.php';
|
||||
sendMail(
|
||||
"Erreur SOAP - (Date :".date("d")."/".date("m")."/".date("Y").")",
|
||||
$message,
|
||||
sendMail(
|
||||
"Erreur SOAP - (Date :".date("d")."/".date("m")."/".date("Y").")",
|
||||
$message,
|
||||
//From
|
||||
array(
|
||||
array(
|
||||
'email' => 'contact@scores-decisions.com',
|
||||
'name' => 'Serveur SD-13408',
|
||||
),
|
||||
),
|
||||
//TO
|
||||
array(
|
||||
0 => array(
|
||||
'email'=> EMAIL_SUPPORTDEV,
|
||||
'email'=> EMAIL_SUPPORTDEV,
|
||||
'name' => 'Support'
|
||||
)
|
||||
)
|
||||
|
@ -4,4 +4,4 @@
|
||||
#recherche_feed .feed_menu{
|
||||
width:auto;
|
||||
background:none;
|
||||
}`
|
||||
}
|
BIN
www/img/score_orangebaisse45.gif
Normal file
BIN
www/img/score_orangebaisse45.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 989 B |
BIN
www/img/score_orangehausse45.gif
Normal file
BIN
www/img/score_orangehausse45.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 983 B |
BIN
www/img/score_rougebaisse45.gif
Normal file
BIN
www/img/score_rougebaisse45.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 981 B |
BIN
www/img/score_rougehausse45.gif
Normal file
BIN
www/img/score_rougehausse45.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 981 B |
BIN
www/img/score_vertbaisse45.gif
Normal file
BIN
www/img/score_vertbaisse45.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 991 B |
BIN
www/img/score_verthausse45.gif
Normal file
BIN
www/img/score_verthausse45.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 996 B |
@ -83,7 +83,6 @@ $(document).ready(function()
|
||||
tooltip: 'topMiddle' } }
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -98,7 +97,6 @@ $(document).ready(function()
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2>Surveillance Score</h2>
|
||||
|
||||
<?php
|
||||
@ -167,11 +165,11 @@ $couleurRisque20 = array(
|
||||
'vert' => array('min'=>11, 'max'=>20),
|
||||
);
|
||||
|
||||
|
||||
if(count($listSurveillance)>0)
|
||||
{
|
||||
foreach($listSurveillance as $item)
|
||||
{
|
||||
//Classe de risque
|
||||
$couleurV = ${'couleurRisque'.$maxIndiscore};
|
||||
foreach($couleurV as $couleur => $intervalle)
|
||||
{
|
||||
@ -183,6 +181,14 @@ if(count($listSurveillance)>0)
|
||||
$indiScore = $item['indiScore'.$typeScore];
|
||||
$indiScorePre = empty($item['indiScore'.$typeScore.'Pre']) ?
|
||||
0 : $item['indiScore'.$typeScore.'Pre'];
|
||||
|
||||
//Variation du risque
|
||||
$variation = abs($item['indiScore']-$item['indiScorePre']);
|
||||
if($variation>=5 && $variation<=9){
|
||||
$deg = '45';
|
||||
}else{
|
||||
$deg = '';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
@ -257,12 +263,12 @@ if(count($listSurveillance)>0)
|
||||
//Hausse
|
||||
}elseif($indiScore>$indiScorePre){
|
||||
?>
|
||||
<img src="./img/score_<?=$couleur?>hausse.gif"/>
|
||||
<img src="./img/score_<?=$couleur?>hausse<?=$deg?>.gif"/>
|
||||
<?php
|
||||
//Baisse
|
||||
}elseif($indiScore<$indiScorePre){
|
||||
?>
|
||||
<img src="./img/score_<?=$couleur?>baisse.gif"/>
|
||||
<img src="./img/score_<?=$couleur?>baisse<?=$deg?>.gif"/>
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user