a
This commit is contained in:
parent
be28246f64
commit
d42877c3e9
|
|
@ -23,63 +23,6 @@ class ControleurAjaxenregistrerdemandederogation extends Controleur {
|
|||
$this->derogation->enregistrerdemandederogation($codeDerogation, $observations);
|
||||
}
|
||||
|
||||
public function maildemandederogation()
|
||||
{
|
||||
$emailDestination = $_SESSION['p_emailAdherent_C'];
|
||||
|
||||
if($emailDestination>" ")
|
||||
{
|
||||
$emailDestination .= ";".$_SESSION['p_emailGestionBon_C'];
|
||||
}
|
||||
|
||||
/* Pour les tests */
|
||||
$email_standard = $_SESSION['p_email_standard'];
|
||||
if($email_standard>" ")
|
||||
{
|
||||
$emailDestination .= ";".$email_standard ;
|
||||
}
|
||||
/* Fin mails tests */
|
||||
|
||||
/* Pour empêcher les envois de mails */
|
||||
$emailDestination = "lkane@ebene.info";
|
||||
/* Fin Pour empêcher les envois de mails */
|
||||
|
||||
if($emailDestination>" ")
|
||||
{
|
||||
$codeDerogation = $this->requete->getParametreFormulaire("codeDerogation");
|
||||
$libelleDerogation = $this->requete->getParametreFormulaire("libelleDerogation");
|
||||
$observations = $this->requete->getParametreFormulaire("observations");
|
||||
|
||||
// DEBUT ENVOI DU MAIL
|
||||
|
||||
require_once 'Framework/Ebenegmail.php';
|
||||
|
||||
$obejt = "DEMANDE DE DEROGATION";
|
||||
|
||||
$body = "- Prestataire : ".$_SESSION['p_prestataire_C']."
|
||||
|
||||
- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].")
|
||||
|
||||
- Date : ".heureCourante()."
|
||||
|
||||
- Dérogation : ".$libelleDerogation."
|
||||
|
||||
- Motivations : ".$observations."
|
||||
|
||||
Merci et bonne réception.";
|
||||
|
||||
$body = convertirc($body);
|
||||
|
||||
$addr = explode(';', $emailDestination);
|
||||
foreach ($addr as $ad)
|
||||
{
|
||||
$mail->AddAddress(trim($ad) );
|
||||
}
|
||||
$mail->Subject = $obejt;
|
||||
$mail->Body=$body;
|
||||
$mail->send();
|
||||
}
|
||||
}
|
||||
|
||||
public function enregistrerdemandederogationbareme()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -90,62 +90,4 @@ class ControleurAjaxenregistrerdemandefraisfuneraire extends Controleur {
|
|||
|
||||
// $this->genererVueAjax();
|
||||
}
|
||||
|
||||
public function maildemandefraisfuneraire()
|
||||
{
|
||||
$emailDestination = $_SESSION['emailAdherent_C'];
|
||||
|
||||
if($emailDestination>" ")
|
||||
{
|
||||
$emailDestination .= ";".$_SESSION['emailGestionBon_C'];
|
||||
}
|
||||
|
||||
/* Pour les tests */
|
||||
$email_standard = $_SESSION['email_standard'];
|
||||
if($email_standard>" ")
|
||||
{
|
||||
$emailDestination .= ";".$email_standard ;
|
||||
}
|
||||
/* Fin mails tests */
|
||||
|
||||
/* Pour empêcher les envois de mails */
|
||||
$emailDestination = "lkane@ebene.info";
|
||||
/* Fin Pour empêcher les envois de mails */
|
||||
|
||||
if($emailDestination>" ")
|
||||
{
|
||||
$codeDerogation = $this->requete->getParametreFormulaire("codeDerogation");
|
||||
$libelleDerogation = $this->requete->getParametreFormulaire("libelleDerogation");
|
||||
$observations = $this->requete->getParametreFormulaire("observations");
|
||||
|
||||
// DEBUT ENVOI DU MAIL
|
||||
|
||||
require_once 'Framework/Ebenegmail.php';
|
||||
|
||||
$obejt = "DEMANDE DE DEROGATION";
|
||||
|
||||
$body = "- Prestataire : ".$_SESSION['prestataire_C']."
|
||||
|
||||
- Patient : ".$_SESSION['beneficiaire_C']." (".$_SESSION['numeroBeneficiaire_C'].")
|
||||
|
||||
- Date : ".heureCouranteLang($_SESSION['lang'])."
|
||||
|
||||
- Dérogation : ".$libelleDerogation."
|
||||
|
||||
- Motivations : ".$observations."
|
||||
|
||||
Merci et bonne réception.";
|
||||
|
||||
$body = convertirc($body);
|
||||
|
||||
$addr = explode(';', $emailDestination);
|
||||
foreach ($addr as $ad)
|
||||
{
|
||||
$mail->AddAddress(trim($ad) );
|
||||
}
|
||||
$mail->Subject = $obejt;
|
||||
$mail->Body=$body;
|
||||
$mail->send();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -25,94 +25,4 @@ class ControleurAjaxenvoimaildivers extends Controleur {
|
|||
// $this->executerAction("index");
|
||||
$this->genererVueAjax(array('nbTentative' => $nbTentative));
|
||||
}
|
||||
|
||||
public function mailfraudeidentite()
|
||||
{
|
||||
require_once 'Framework/Ebenegmail.php';
|
||||
|
||||
$emailDestination = $_SESSION['p_emailGestionBon_C'];
|
||||
|
||||
/* Pour les tests */
|
||||
$email_standard = $_SESSION['p_email_standard'];
|
||||
if($email_standard>" ")
|
||||
{
|
||||
$emailDestination .= ";".$email_standard ;
|
||||
}
|
||||
/* Fin mails tests */
|
||||
|
||||
/* Pour empêcher les envois de mails */
|
||||
$emailDestination = "lkane@ebene.info";
|
||||
/* Fin Pour empêcher les envois de mails */
|
||||
|
||||
$obejt = "ALERTE PLUS DE 3 TENTATIVES D'IDENTIFICATION";
|
||||
|
||||
$body = "- Prestataire : ".$_SESSION['p_prestataire_C']."
|
||||
|
||||
- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].")
|
||||
|
||||
- Date : ".heureCourante()."
|
||||
|
||||
Merci et bonne réception.";
|
||||
|
||||
$body = convertirc($body);
|
||||
|
||||
$addr = explode(';', $emailDestination);
|
||||
foreach ($addr as $ad)
|
||||
{
|
||||
$mail->AddAddress(trim($ad) );
|
||||
}
|
||||
|
||||
$mail->Subject = $obejt;
|
||||
|
||||
$mail->Body=$body;
|
||||
|
||||
$mail->send();
|
||||
}
|
||||
|
||||
public function mailententeprealable()
|
||||
{
|
||||
$numeroBon = $this->requete->getParametreFormulaire("numeroBon");
|
||||
|
||||
require_once 'Framework/Ebenegmail.php';
|
||||
|
||||
$emailDestination = $_SESSION['p_emailMedecinConseil_C'];
|
||||
|
||||
/* Pour les tests */
|
||||
$email_standard = $_SESSION['p_email_standard'];
|
||||
if($email_standard>" ")
|
||||
{
|
||||
$emailDestination .= ";".$email_standard ;
|
||||
}
|
||||
/* Fin mails tests */
|
||||
|
||||
/* Pour empêcher les envois de mails */
|
||||
$emailDestination = "lkane@ebene.info";
|
||||
/* Fin Pour empêcher les envois de mails */
|
||||
|
||||
$obejt = "ALERTE HOSPITALISATION";
|
||||
|
||||
$body = "- Prestataire : ".$_SESSION['p_prestataire_C']."
|
||||
|
||||
- Patient : ".$_SESSION['p_beneficiaire_C']." (".$_SESSION['p_numeroBeneficiaire_C'].")
|
||||
|
||||
- Date : ".heureCourante()."
|
||||
|
||||
- No Bon Hospitalisation : ".$numeroBon."
|
||||
|
||||
Merci et bonne réception.";
|
||||
|
||||
$body = convertirc($body);
|
||||
|
||||
$addr = explode(';', $emailDestination);
|
||||
foreach ($addr as $ad)
|
||||
{
|
||||
$mail->AddAddress(trim($ad) );
|
||||
}
|
||||
|
||||
$mail->Subject = $obejt;
|
||||
|
||||
$mail->Body=$body;
|
||||
|
||||
$mail->send();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
require_once 'Functions.php';
|
||||
|
||||
class Cronenvoimailadhrent
|
||||
{
|
||||
public function __construct() {
|
||||
}
|
||||
|
||||
public function charger_les_mails($nbMail)
|
||||
{
|
||||
require_once 'Envoimailadherentcron.php';
|
||||
|
||||
$this->mailcron = new Envoimailadherentcron();
|
||||
|
||||
$this->lesMails = $this->mailcron->get_les_mails_aenvoyer($nbMail);
|
||||
}
|
||||
|
||||
public function marquermail($idMail, $etat)
|
||||
{
|
||||
require_once 'Envoimailadherentcron.php';
|
||||
|
||||
$this->mailcron = new Envoimailadherentcron();
|
||||
$this->mailcron->marquermail($idMail, $etat);
|
||||
}
|
||||
|
||||
|
||||
public function chargersociete()
|
||||
{
|
||||
require_once 'Societeuser.php';
|
||||
|
||||
$this->societe = new Societeuser();
|
||||
$societe = $this->societe->getparametressociete();
|
||||
|
||||
$this->emailMedecinConseil = $societe['emailMedecinConseil'];
|
||||
$this->emailGestionBon = $societe['emailGestionBon'];
|
||||
$this->emailCcomptabilite = $societe['emailCcomptabilite'];
|
||||
$this->emailDerogation = $societe['emailDerogation'];
|
||||
$this->emailAccordPrealable = $societe['emailAccordPrealable'];
|
||||
$this->emailFraudeFinger = $societe['emailFraudeFinger'];
|
||||
$this->email_standard = $societe['email_standard'];
|
||||
$this->devise = $societe['devise'];
|
||||
$this->nbMailParCron = $societe['nbMailParCron'];
|
||||
$this->nomProduitSante = $societe['nomProduitSante'];
|
||||
}
|
||||
|
||||
public function traiterdestinationmail()
|
||||
{
|
||||
// require_once 'Ebenegmail.php';
|
||||
require_once 'Ebeneovhmail.php';
|
||||
$this->email = $mail;
|
||||
}
|
||||
|
||||
public function envoyer_un_des_mail()
|
||||
{
|
||||
$this->body = convertirc($this->body);
|
||||
|
||||
$this->email->clearAllRecipients();
|
||||
|
||||
$this->email->clearAttachments();
|
||||
|
||||
if($this->emailDestination<=" ")
|
||||
{
|
||||
$this->emailDestination = "gmebene@gmail.com";
|
||||
}
|
||||
|
||||
$addr = explode(';', $this->emailDestination);
|
||||
foreach ($addr as $ad)
|
||||
{
|
||||
$this->email->addAddress(trim($ad) );
|
||||
}
|
||||
|
||||
// $this->email->Subject = $this->objet;
|
||||
// : ".$this->nomProduitSante;
|
||||
$this->email->Subject = $this->objet . " : ".$this->nomProduitSante;
|
||||
$this->email->Body = $this->body;
|
||||
|
||||
// A supprimer
|
||||
$this->email->send();
|
||||
// var_dump($this->email);
|
||||
exit();
|
||||
|
||||
if(!$this->email->send())
|
||||
{
|
||||
$this->marquermail($this->idMail, "9");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->marquermail($this->idMail, "1");
|
||||
}
|
||||
|
||||
usleep(2000); // Stoppe pour 2 millisecondes
|
||||
}
|
||||
|
||||
public function envoyer_les_mails()
|
||||
{
|
||||
$this->traiterdestinationmail();
|
||||
|
||||
$lesMails = $this->lesMails;
|
||||
|
||||
foreach ($lesMails as $un_mail)
|
||||
{
|
||||
$this->idMail = $un_mail['idMail'];
|
||||
$this->emailDestination = $un_mail['email'];
|
||||
$this->objet = $un_mail['objet'];
|
||||
$this->body = $un_mail['message'];
|
||||
|
||||
|
||||
$this->envoyer_un_des_mail();
|
||||
|
||||
usleep(2000); // Stoppe pour 2 millisecondes
|
||||
}
|
||||
}
|
||||
} // FIN CLASSE
|
||||
|
||||
// envoi des emails
|
||||
|
||||
$envoimaildivers = new Cronenvoimailadhrent();
|
||||
|
||||
$envoimaildivers->chargersociete();
|
||||
|
||||
$nbMail = $envoimaildivers->nbMailParCron;
|
||||
|
||||
$envoimaildivers->charger_les_mails($nbMail);
|
||||
|
||||
$envoimaildivers->envoyer_les_mails();
|
||||
Loading…
Reference in New Issue
Block a user