first commit
This commit is contained in:
7
gestionsite/.htaccess
Normal file
7
gestionsite/.htaccess
Normal file
@ -0,0 +1,7 @@
|
||||
Options -Indexes
|
||||
AuthName "back_office"
|
||||
AuthBasicProvider file
|
||||
AuthType Basic
|
||||
AuthUserFile "/var/www/html/gestionsite/.htpasswd"
|
||||
require valid-user
|
||||
|
1
gestionsite/.htpasswd
Normal file
1
gestionsite/.htpasswd
Normal file
@ -0,0 +1 @@
|
||||
daniel:$apr1$Up83RCLZ$x46wYId2latEFsJARi/cL/
|
73
gestionsite/entete.html
Normal file
73
gestionsite/entete.html
Normal file
@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Kevin PITA - Daniel Tartavel">
|
||||
|
||||
<title>Lyon Association Libre Informatique Solidaire</title>
|
||||
|
||||
<!-- Bootstrap Core CSS - Uses Bootswatch Flatly Theme: http://bootswatch.com/flatly/ -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link href="../css/freelancer.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body id="page-top" class="index">
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header page-scroll">
|
||||
<!--button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button-->
|
||||
<a class="navbar-brand" href="#page-top">LALIS</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="hidden">
|
||||
<a href="https://lalis.fr/index.html#page-top"></a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="https://lalis.fr/index.html#content">Présentation</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="https://lalis.fr/index.html#about">Nos engagements</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="https://lalis.fr/index.html#horaires">Horaires</a>
|
||||
</li>
|
||||
<li class="page-scroll">
|
||||
<a href="https://lalis.fr/index.html#contact">Contact</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div><div><a>Association loi 1901</a></div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</nav>
|
79
gestionsite/envoiMailing.php
Normal file
79
gestionsite/envoiMailing.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once 'entete.html';
|
||||
|
||||
$idVotation =$_GET["id"];
|
||||
|
||||
print('<br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
|
||||
<section id="content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h3>VOTE</h3>');
|
||||
|
||||
$db = new db();
|
||||
$dolibarr = new dbDolibarr();
|
||||
|
||||
if (empty($idVotation))
|
||||
{
|
||||
choixVotation('/gestionsite/envoiMailing.php') ;
|
||||
}else
|
||||
{
|
||||
//chargement des données de la votation
|
||||
$db->query("SELECT *, UNIX_TIMESTAMP( DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf FROM liste_votations WHERE id=" . $idVotation);
|
||||
$votation = $db->result->fetch_array();
|
||||
|
||||
if(empty($_GET['status']))
|
||||
{
|
||||
print('<form method="get" action="envoiMailing.php">
|
||||
<input type="hidden" name="id" value="' . $idVotation . '">
|
||||
<pre><h4>Êtes-vous sûr de vouloir envoyer le Mailing pour la votation : ' . $votation['libelle'] .'</h4>
|
||||
</pre><br>
|
||||
<div>
|
||||
<input type="submit" name="status" value="Oui">
|
||||
<input type="submit" name="status" value="Non">
|
||||
<input type="submit" name="status" value="Test">
|
||||
</div>
|
||||
</form>
|
||||
');
|
||||
}elseif($_GET['status'] == 'Oui' OR $_GET['status'] == 'Test')
|
||||
{
|
||||
// message
|
||||
|
||||
//chargement de la liste des adhérents
|
||||
$dolibarr->query("SELECT login, firstname, lastname, email FROM llx_adherent");
|
||||
$adherents = $dolibarr->result->fetch_all(MYSQLI_ASSOC);
|
||||
$dolibarr->close();
|
||||
|
||||
$sujet = "[LALIS] Convocation à un vote";
|
||||
$textDebut = "Bonjour,\nL'association Lalis vous invite à un vote.\nMotif du vote : " . $votation['libelle'] . "\n\nPour voter, cliquez sur le lien suivant :\nhttps://lalis69.ddns.net:10443/vote.form.php?v=" . $idVotation . "&id=";
|
||||
$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.resultat.php?id=" . $idVotation . "\n\nPour Lalis, Le Président, David Larochette.";
|
||||
foreach($adherents as $adherent)
|
||||
{
|
||||
$text = $textDebut . base64_encode($adherent['login']) . $textFin;
|
||||
print '<pre>' . $adherent['email'] . ' ' . $adherent['firstname'] . ' ' . $adherent['lastname'] . EOLH . nl2br($text) . '</pre>';
|
||||
if ( $_GET['status'] == 'Oui')
|
||||
{
|
||||
//envoiMail($adherent['email'], $sujet, $text, $html=false, $cc='', $bcc='');
|
||||
envoiMail('david@larochette.me', $sujet, $text, $html=false, $cc='', $bcc='');
|
||||
envoiMail('ric.libr4d@protonmail.com', $sujet, $text, $html=false, $cc='', $bcc='');
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
print("<pre><h4>Annulation de l'envoi du Mailing pour la votation : " . $votation['libelle'] . "</h4>
|
||||
</pre><br>");
|
||||
}
|
||||
|
||||
print(' </div>
|
||||
</div>
|
||||
</div>
|
||||
</section>');
|
||||
}
|
||||
require_once("footer.html");
|
||||
?>
|
56
gestionsite/footer.html
Normal file
56
gestionsite/footer.html
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="text-center">
|
||||
<div class="footer-above">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="footer-col col-md-4">
|
||||
<h5>adresse</h5>
|
||||
<p>7 place Louis Chazette<br>69001 Lyon</p>
|
||||
</div>
|
||||
<div class="footer-col col-md-4">
|
||||
<h5>LALIS</h5>
|
||||
<p>Lyon Association Libre Informatique Solidaire</p>
|
||||
</div>
|
||||
<div class="footer-col col-md-4">
|
||||
<h5>Mail</h5>
|
||||
<p>contact[arobase]lalis.fr</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-below">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/zero/1.0/88x31.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div class="scroll-top page-scroll visible-xs visible-sm">
|
||||
<a class="btn btn-primary" href="#page-top">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="../js/lalis.js"></script>
|
||||
<script src="../js/jquery.js"></script>
|
||||
|
||||
<script src="../js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
|
||||
<script src="../js/classie.js"></script>
|
||||
<script src="../js/cbpAnimatedHeader.js"></script>
|
||||
|
||||
<script src="../js/jqBootstrapValidation.js"></script>
|
||||
<script src="../js/contact_me.js"></script>
|
||||
|
||||
<script src="../js/freelancer.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
29
gestionsite/index.php
Normal file
29
gestionsite/index.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once './entete.html';
|
||||
|
||||
print(' <br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
|
||||
<section id="content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h3>Gestion du site</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<ul>
|
||||
<li><a href="../vote.resultat.php">Consulter les résultats d\'une votation</a></li>
|
||||
<li><a href="creationVotation.php">nouvelle votations</a></li>
|
||||
<li><a href="modifVotation.php">Modifier une votation</a></li>
|
||||
<li><a href="cloturerVotation.php?action=cloture">Fermer une votation</a></li>
|
||||
<li><a href="envoiMailing.php.php">Envoyer le mailing</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>');
|
||||
|
||||
require_once './footer.html';
|
50
gestionsite/modifVotation.php
Normal file
50
gestionsite/modifVotation.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
require_once '../session_init.php';
|
||||
require_once 'config.inc.php';
|
||||
require_once 'db.class.php';
|
||||
require_once './entete.html';
|
||||
require_once 'fonctions.inc.php';
|
||||
|
||||
$action = $_GET["action"];
|
||||
$idVotation =$_GET["id"];
|
||||
|
||||
print('<br><br>
|
||||
<!-- lalis Grid Section -->
|
||||
|
||||
<section id="content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-center">
|
||||
<h4>Choisissez une votations à modifier</h4>' . EOL);
|
||||
|
||||
$db = new db();
|
||||
if (empty($action))
|
||||
{
|
||||
$action="modif";
|
||||
choixVotation('/gestionsite/modifVotation.php') ;
|
||||
|
||||
}else
|
||||
{
|
||||
if ($action == "cloture")
|
||||
{
|
||||
if ( empty($idVotation))
|
||||
{
|
||||
// choix de la votation à cloturer
|
||||
choixVotation('/gestionsite/modifVotation.php',1 );
|
||||
}else
|
||||
{
|
||||
$query = "UPDATE liste_votations SET status=0 WHERE id=" . $db->protect($idVotation); // clotûre
|
||||
$db->query($query);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print(' </div>
|
||||
</div>
|
||||
</div>
|
||||
</section>');
|
||||
require_once './footer.html';
|
||||
?>
|
Reference in New Issue
Block a user