update
This commit is contained in:
@ -3,8 +3,9 @@ require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'entete.php';
|
||||
require_once 'fonctions.inc.php';
|
||||
|
||||
$idVotation = $_GET["idVotation"];
|
||||
$idVotation = getpost("idVotation");
|
||||
|
||||
print('<br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
@ -17,6 +18,7 @@ print('<br><br>
|
||||
|
||||
$db = new db();
|
||||
$dolibarr = new dbDolibarr();
|
||||
$status = getpost("status");
|
||||
|
||||
if (empty($idVotation))
|
||||
{
|
||||
@ -27,7 +29,7 @@ if (empty($idVotation))
|
||||
$db->query("SELECT *, UNIX_TIMESTAMP( DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf, UNIX_TIMESTAMP(dateFin) as df, UNIX_TIMESTAMP(dateDebut) as dd FROM liste_votations WHERE id=" . $idVotation);
|
||||
$votation = $db->result->fetch_array();
|
||||
|
||||
if(empty($_GET['status']))
|
||||
if(empty($status))
|
||||
{
|
||||
print('<form method="get" action="envoiMailing.php">
|
||||
<input type="hidden" name="idVotation" value="' . $idVotation . '">
|
||||
@ -40,7 +42,7 @@ if (empty($idVotation))
|
||||
</div>
|
||||
</form>
|
||||
');
|
||||
}elseif($_GET['status'] == 'Oui' OR $_GET['status'] == 'Test')
|
||||
}elseif($status == 'Oui' OR $status == 'Test')
|
||||
{
|
||||
// message
|
||||
|
||||
@ -54,20 +56,25 @@ if (empty($idVotation))
|
||||
$textFin = "\n\nNous vous rappelons que pour pouvoir voter, vous devez être à jour de cotisation à la date du vote.\nLes résultats seront visibles dès le " . formatteDate('fr', $votation['tf'], 'Europe/Paris') . " par le lien suivant : https://lalis69.ddns.net:10443/vote/vote.resultat.php?id=" . $idVotation . "\nAttention: ce lien contient votre identifiant de vote, ne le transmettez pas car la personne pourra voter à votre place.\n\nEn cas de problème appeler le 09 53 00 03 20 ou le 06 52 34 07 60\n\nVous pouvez voter par procuration en envoyant un courriel avec vos nom, prénom, et le nom de la personne à laquelle vous donnez procuration (voir modèle ci-dessous). Si vous ne précisez pas le nom du bénéficiaire de la procuration, celle-ci sera assignée aléatoirement à une personne ayant voté.\n\n";
|
||||
$textFin .= "Modèle de procuration\n\nJe soussigné (nom, prénom)................................. demeurant à ........................... donne pouvoir à (nom, prénom)................... pour me représenter et prendre part aux votes en mon nom lors de l'Assemblée Générale Ordinaire de l'association .... du .... (date).\nDate et signature\n\n";
|
||||
$textFin .= "Pour Lalis, Le Président, David Larochette.";
|
||||
if ($_GET['status'] == 'Oui')
|
||||
if ($status == 'Oui')
|
||||
{
|
||||
foreach($adherents as $adherent)
|
||||
{
|
||||
$text = $textDebut . base64_encode($adherent['login']) . $textFin;
|
||||
print '<pre>' . $adherent['email'] . ' ' . $adherent['firstname'] . ' ' . $adherent['lastname'] . EOLH . nl2br($text) . '</pre>';
|
||||
//print $text;
|
||||
envoiMail($adherent['email'], $sujet, $text, $html=false, $cc='', $bcc='');
|
||||
//envoiMail('dtux@free.fr', $sujet, $text, $html=false, $cc='', $bcc='');
|
||||
if (!empty($adherent['email']))
|
||||
{
|
||||
if (envoiMail($adherent['email'], $sujet, $text, $html=false, $cc='', $bcc='') == false)
|
||||
{
|
||||
$erreurEnvoiMail[] = $adherent["firstname"] . " " . $adherent['lastname'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
//print $text;
|
||||
$text = $textDebut . base64_encode("login") . $textFin;
|
||||
$text = $textDebut . base64_encode($dolibarrAdmin) . $textFin;
|
||||
envoiMail($admin, $sujet, $text, $html=false, $cc='', $bcc='');
|
||||
}
|
||||
}else
|
||||
@ -75,7 +82,11 @@ if (empty($idVotation))
|
||||
print("<pre><h4>Annulation de l'envoi du Mailing pour la votation : " . $votation['libelle'] . "</h4>
|
||||
</pre><br>");
|
||||
}
|
||||
|
||||
print('Liste des envoi en erreur: ' . EOLH);
|
||||
foreach ($erreurEnvoiMail as $adherent)
|
||||
{
|
||||
print ($adherent . EOLH);
|
||||
}
|
||||
print(' </div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,7 +5,7 @@ require_once 'entete.php';
|
||||
|
||||
if (!empty($_SERVER["PHP_AUTH_USER"]))
|
||||
|
||||
/*print(' <br><br>
|
||||
print(' <br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
|
||||
<section id="content">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
require_once 'session_init.php';
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'fonctions.inc.php';
|
||||
@ -12,9 +12,8 @@ $idVote = getpost("idVote");
|
||||
$candidat = getpost("candidat");
|
||||
$idCandidat = getpost("idCandidat");
|
||||
$libelle = getpost("libelle");
|
||||
$action = getpost("action");
|
||||
|
||||
if (!empty($candidat) and $action != "modif")
|
||||
if (!empty($candidat))
|
||||
{
|
||||
$query = "INSERT INTO liste_candidats VALUES (0, " . $db->protect($idVotation) . ", " . $db->protect($idVote) . ",'" . $db->protect($libelle) . "', '". $db->protect($candidat) . "')";
|
||||
$db->query($query);
|
||||
@ -36,7 +35,7 @@ if (!empty($candidat) and $action != "modif")
|
||||
}elseif (empty($idVote))
|
||||
{
|
||||
choixVote($path, $idVotation);
|
||||
}elseif ($action == "modif" and !empty($idCandidat))
|
||||
}elseif (!empty($idCandidat))
|
||||
{
|
||||
|
||||
}else
|
||||
@ -54,8 +53,8 @@ if (!empty($candidat) and $action != "modif")
|
||||
print('<h4>Liste des candidats</h4>');
|
||||
foreach($candidatsList as $line)
|
||||
{
|
||||
print("<b><u>" . $line["candidat"] . "</u></b><br>");
|
||||
print(nl2br($line["libelle"]) . EOLH);
|
||||
print("<b><u>" . $line["candidat"] . "</u></b><br>");
|
||||
}
|
||||
}
|
||||
candidatsForm($path, $idVotation, $idVote);
|
||||
|
Reference in New Issue
Block a user