Initial commit
This commit is contained in:
commit
f7d86c1194
|
|
@ -0,0 +1,82 @@
|
||||||
|
# Fonts
|
||||||
|
*.ttf
|
||||||
|
*.woff
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
*.7z
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
|
||||||
|
# Logs and databases
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
# JPEG
|
||||||
|
*.jpg
|
||||||
|
*.jpeg
|
||||||
|
*.jpe
|
||||||
|
*.jif
|
||||||
|
*.jfif
|
||||||
|
*.jfi
|
||||||
|
|
||||||
|
# JPEG 2000
|
||||||
|
*.jp2
|
||||||
|
*.j2k
|
||||||
|
*.jpf
|
||||||
|
*.jpx
|
||||||
|
*.jpm
|
||||||
|
*.mj2
|
||||||
|
|
||||||
|
# JPEG XR
|
||||||
|
*.jxr
|
||||||
|
*.hdp
|
||||||
|
*.wdp
|
||||||
|
|
||||||
|
# Graphics Interchange Format
|
||||||
|
*.gif
|
||||||
|
|
||||||
|
# RAW
|
||||||
|
*.raw
|
||||||
|
|
||||||
|
# Web P
|
||||||
|
*.webp
|
||||||
|
|
||||||
|
# Portable Network Graphics
|
||||||
|
*.png
|
||||||
|
|
||||||
|
# Animated Portable Network Graphics
|
||||||
|
*.apng
|
||||||
|
|
||||||
|
# Multiple-image Network Graphics
|
||||||
|
*.mng
|
||||||
|
|
||||||
|
# Tagged Image File Format
|
||||||
|
*.tiff
|
||||||
|
*.tif
|
||||||
|
|
||||||
|
# Scalable Vector Graphics
|
||||||
|
*.svg
|
||||||
|
*.svgz
|
||||||
|
|
||||||
|
# Portable Document Format
|
||||||
|
*.pdf
|
||||||
|
|
||||||
|
# X BitMap
|
||||||
|
*.xbm
|
||||||
|
|
||||||
|
# BMP
|
||||||
|
*.bmp
|
||||||
|
*.dib
|
||||||
|
|
||||||
|
# ICO
|
||||||
|
*.ico
|
||||||
|
|
||||||
|
# 3D Images
|
||||||
|
*.3dm
|
||||||
|
*.max
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#AuthUserFile /private/.htpasswd
|
||||||
|
#AuthName "Acces reserve"
|
||||||
|
#AuthType Basic
|
||||||
|
#Require valid-user
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
include "inc/auth.inc.php";
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<?php include("../theme/header.php"); ?>
|
||||||
|
<section id="pageadmin">
|
||||||
|
<div id="auth-form">
|
||||||
|
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post">
|
||||||
|
<?php
|
||||||
|
// Rencontre-t-on une erreur ?
|
||||||
|
if(!empty($errorMessage))
|
||||||
|
{
|
||||||
|
echo '<p class="red">', htmlspecialchars($errorMessage) ,'</p>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<h3>Identifiez-vous :</h3>
|
||||||
|
<label for="login">Login :</label>
|
||||||
|
<input type="text" name="login" id="login" value="" autofocus /><br />
|
||||||
|
|
||||||
|
<label for="password">Password :</label>
|
||||||
|
<input type="password" name="password" id="password" value="" /><br />
|
||||||
|
<input type="submit" name="submit" value="S'enregistrer" />
|
||||||
|
</form>
|
||||||
|
<p>Ou <a href="../index.php">retournez à l'accueil</a>.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,157 @@
|
||||||
|
<?php
|
||||||
|
include "inc/session.inc.php";
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
// On regarde si il y a une AGE
|
||||||
|
if (checkage()) {$age = true;} else {$age = false;}
|
||||||
|
// Préparation de la requete MySQL pour chercher les options actuelles
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// On regarde le nombre de résolution d'ago qui sera important par la suite pour créer des variables de sessions et le formulaire de vote
|
||||||
|
$option = 'resolution_ago_nb';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_ago_nb = $results['option_value'];
|
||||||
|
// On regarde le nombre de résolution d'age qui sera important par la suite pour créer des variables de sessions et le formulaire de vote
|
||||||
|
$option = 'resolution_age_nb';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_age_nb = $results['option_value'];
|
||||||
|
// On regarde combien de postes sont à pourvoir
|
||||||
|
$option = 'cs_nb_poste';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$cs_nb_poste = $results['option_value'];
|
||||||
|
// On va chercehr l'url des documents relatifs à l'AG
|
||||||
|
$option = 'url_docs';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$url_docs = $results['option_value'];
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php include("theme/header.php");?>
|
||||||
|
<section id="pageadmin">
|
||||||
|
<div class="auth">Vous êtes authentifié sous l'utilisateur : <?php echo $_SESSION['login']; ?>
|
||||||
|
<br />
|
||||||
|
<a href="inc/disconnect.inc.php">Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Configuration générale</h2>
|
||||||
|
<form id='mod-config-global' method="post" action="inc/config-mod.inc.php">
|
||||||
|
<ul class="conf_global_form">
|
||||||
|
<li><label class="bold" for="nb_resolutions">Nombre de résolutions d'AG ordinaire</label><input type="text" name="nb_resolutions_ago" id="nb_resolutions_ago" value="<?php echo $resolution_ago_nb;?>" /></li>
|
||||||
|
<li><label class="bold" for="nb_resolutions">Nombre de résolutions d'AG extraordinaire (indiquer 0 si il n'y a pas d'AGE)</label><input type="text" name="nb_resolutions_age" id="nb_resolutions_age" value="<?php echo $resolution_age_nb;?>" /></li>
|
||||||
|
<li><label class="bold" for="nb_postes_cs">Nombre de postes au Conseil de Surveillance à pourvoir (ou nombre de candidats si inférieur au nombre de poste à pourvoir)</label><input type="text" name="nb_postes_cs" id="nb_postes_cs" value="<?php echo $cs_nb_poste;?>" /></li>
|
||||||
|
<li><label class="bold" for="url_docs">URL des documents de l'AG</label><input type="text" name="url_docs" id="url_docs" value="<?php echo $url_docs;?>" /></li>
|
||||||
|
</ul>
|
||||||
|
<p class="formvote"><input type="submit" value="Enregistrer"></p>
|
||||||
|
</form>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<h2>Les résolutions d'AGO</h2>
|
||||||
|
<ul class="conf_global_form">
|
||||||
|
<form id='mod-config-resolution' method="post" action="inc/config-mod.inc.php">
|
||||||
|
<?php
|
||||||
|
// On va construire le tableau des résolutions
|
||||||
|
for ($i = 1; $i <= $resolution_ago_nb; $i++) {
|
||||||
|
// On selectionne la résolution
|
||||||
|
$option = 'resolution_ago_'.$i;
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_ago_txt = $results['option_value'];
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<label class="bold" for="res_ago_<?php echo $i; ?>">Résolution n°<?php echo $i; ?></label>
|
||||||
|
<textarea name="res_ago_<?php echo $i; ?>" class="conf_resolution" tabindex="5"><?php echo $resolution_ago_txt; ?></textarea>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
<p class="formvote"><input type="submit" value="Enregistrer"></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<?php if ($age) { ?>
|
||||||
|
<h2>Les résolutions d'AGE</h2>
|
||||||
|
<ul class="conf_global_form">
|
||||||
|
<form id='mod-config-resolution' method="post" action="inc/config-mod.inc.php">
|
||||||
|
<?php
|
||||||
|
// On va construire le tableau des résolutions
|
||||||
|
for ($i = 1; $i <= $resolution_age_nb; $i++) {
|
||||||
|
// On selectionne la résolution
|
||||||
|
$option = 'resolution_age_'.$i;
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_age_txt = $results['option_value'];
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<label class="bold" for="res_age_<?php echo $i; ?>">Résolution n°<?php echo $i; ?></label>
|
||||||
|
<textarea name="res_age_<?php echo $i; ?>" class="conf_resolution" tabindex="5"><?php echo $resolution_age_txt; ?></textarea>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
<p class="formvote"><input type="submit" value="Enregistrer"></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<h2>L'élection des membres du CS</h2>
|
||||||
|
<p>Idéalement, il faut entrer les noms des candidats dans l'ordre alphabétique.</p>
|
||||||
|
<p>Pour supprimer un nom de la liste, il suffit de laisser le champ vide, il sera automatiquement supprimé lors de l'enregistrement.</p>
|
||||||
|
<form id='mod-config-cs' method="post" action="inc/config-mod.inc.php">
|
||||||
|
<ul class="conf_global_form">
|
||||||
|
<?php
|
||||||
|
// On va construire le tableau des candidats au CS
|
||||||
|
$option = 'cs_candidats';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$cs_candidats_nb = $results['option_value'];
|
||||||
|
// On récupère un array qu'il faut casser par virgule, et on compte le nombre de candidats
|
||||||
|
$cs_candidats_nb = explode(",",$cs_candidats_nb);
|
||||||
|
for ($i=0; $i < count($cs_candidats_nb); $i++) { ?>
|
||||||
|
<li>
|
||||||
|
<label class="bold" for="cs[]">Prénom et Nom du candidat</label>
|
||||||
|
<input class="conf_cs" type="text" name="CS[]" value="<?php print $cs_candidats_nb[$i]; ?>" id="<?php print $cs_candidats_nb[$i]; ?>" />
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
<div id="add_<?php echo $i+1; ?>"><p><a href="javascript:add_candidat(<?php echo $i+1; ?>)">Ajouter un autre candidat</a> (vingt candidats maximum)</p></div>
|
||||||
|
<p class="formvote"><input type="submit" value="Enregistrer"></p>
|
||||||
|
</form>
|
||||||
|
<hr />
|
||||||
|
</form>
|
||||||
|
<h2>Divers</h2>
|
||||||
|
<p>Ci-dessous la requête SQL pour obtenir la liste des coopérateurs :</p>
|
||||||
|
<p><i>SELECT reference, thirds.headquarterEmail, lastname, firstname<br />
|
||||||
|
FROM clients<br />
|
||||||
|
INNER JOIN thirds ON thirds.uid = clients.uid<br />
|
||||||
|
INNER JOIN partsSociales ON partsSociales.uid = clients.uid<br />
|
||||||
|
WHERE etat = "achetee"<br />
|
||||||
|
GROUP BY clients.uid</i></p>
|
||||||
|
<p>Pensez à modifier les dates dans explication.php et merci.php.<br />
|
||||||
|
Et également dans mail.inc.php.</p>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,573 @@
|
||||||
|
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* What follows is the result of much research on cross-browser styling.
|
||||||
|
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
|
||||||
|
* Kroc Camen, and the H5BP dev community and team.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Base styles: opinionated defaults
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
html,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
line-height: 1.4;
|
||||||
|
font: 0.9em/1.3em "Droid Sans",Helvetica,Arial,sans-serif;
|
||||||
|
}
|
||||||
|
a {color: black;}
|
||||||
|
/*
|
||||||
|
* Remove text-shadow in selection highlight: h5bp.com/i
|
||||||
|
* These selection rule sets have to be separate.
|
||||||
|
* Customize the background color to match your design.
|
||||||
|
*/
|
||||||
|
|
||||||
|
::-moz-selection {
|
||||||
|
background: #b3d4fc;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: #b3d4fc;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A better looking default horizontal rule
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
display: block;
|
||||||
|
height: 1px;
|
||||||
|
border: 0;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
margin: 1em 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
hr:last-child {
|
||||||
|
display: block;
|
||||||
|
height: 1px;
|
||||||
|
border: 0;
|
||||||
|
border-top: 4px solid #555;
|
||||||
|
margin: 1em 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
* Remove the gap between images, videos, audio and canvas and the bottom of
|
||||||
|
* their containers: h5bp.com/i/440
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
img,
|
||||||
|
video {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove default fieldset styles.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allow only vertical resizing of textareas.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Browse Happy prompt
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.browsehappy {
|
||||||
|
margin: 0.2em 0;
|
||||||
|
background: #ccc;
|
||||||
|
color: #000;
|
||||||
|
padding: 0.2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Author's custom styles
|
||||||
|
========================================================================== */
|
||||||
|
#navigationMenu {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navigationMenu li{
|
||||||
|
list-style:none;
|
||||||
|
height:25px;
|
||||||
|
padding:5px 2px;
|
||||||
|
width:25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navigationMenu span{
|
||||||
|
width:0;
|
||||||
|
left:34px;
|
||||||
|
padding:0;
|
||||||
|
position:absolute;
|
||||||
|
overflow:hidden;
|
||||||
|
font-family:'Myriad Pro',Arial, Helvetica, sans-serif;
|
||||||
|
font-size:14px;
|
||||||
|
white-space:nowrap;
|
||||||
|
line-height:28px;
|
||||||
|
-webkit-transition: 0.25s;
|
||||||
|
-moz-transition: 0.25s;
|
||||||
|
transition: 0.25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navigationMenu a{
|
||||||
|
/*background:url('../img/navigation.jpg') no-repeat;*/
|
||||||
|
height:25px;
|
||||||
|
width:25px;
|
||||||
|
display:block;
|
||||||
|
position:relative;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navigationMenu a:hover span, #navigationMenu a:hover span{ width:auto; padding:0 20px;overflow:visible; }
|
||||||
|
#navigationMenu a:hover, #navigationMenu a:hover{
|
||||||
|
text-decoration:none;
|
||||||
|
-moz-box-shadow:0 0 5px #E2E2E2;
|
||||||
|
-webkit-box-shadow:0 0 5px #E2E2E2;
|
||||||
|
box-shadow:0 0 5px #E2E2E2;
|
||||||
|
}
|
||||||
|
#navigationMenu span{
|
||||||
|
background-color:#E2E2E2;
|
||||||
|
color:#004F9B;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
#navigationMenu .home { background-position: 0 0;}
|
||||||
|
|
||||||
|
#navigationMenu .password { background-position: -150px -50px;}
|
||||||
|
#navigationMenu .password:hover { background-position:-150px 0;}
|
||||||
|
|
||||||
|
#navigationMenu .mail { background-position: -100px -50px;}
|
||||||
|
#navigationMenu .mail:hover { background-position:-100px 0;}
|
||||||
|
|
||||||
|
#navigationMenu .listecooperateurs { background-position: -200px -50px;}
|
||||||
|
#navigationMenu .listecooperateurs:hover { background-position:-200px 0;}
|
||||||
|
|
||||||
|
#navigationMenu .listenonvotants { background-position: -300px -50px;}
|
||||||
|
#navigationMenu .listenonvotants:hover{ background-position:-300px 0;}
|
||||||
|
|
||||||
|
#navigationMenu .listevotants { background-position: -250px -50px;}
|
||||||
|
#navigationMenu .listevotants:hover { background-position:-250px 0;}
|
||||||
|
|
||||||
|
#navigationMenu .resultats { background-position: -50px -50px;}
|
||||||
|
#navigationMenu .resultats:hover { background-position: -50px 0;}
|
||||||
|
|
||||||
|
#navigationMenu .config { background-position: -350px -50px;}
|
||||||
|
#navigationMenu .config:hover { background-position: -350px 0;}
|
||||||
|
*/
|
||||||
|
.mt1 {margin-top:1em;}
|
||||||
|
.mr1 {margin-right:1em;}
|
||||||
|
.mb1 {margin-bottom:1em;}
|
||||||
|
.ml1 {margin-left:1em;}
|
||||||
|
.mt2 {margin-top:2em;}
|
||||||
|
.mr2 {margin-right:2em;}
|
||||||
|
.mb2 {margin-bottom:2em;}
|
||||||
|
.ml2 {margin-left:2em;}
|
||||||
|
.pt1 {padding-top:1em;}
|
||||||
|
.pr1 {padding-right:1em;}
|
||||||
|
.pb1 {padding-bottom:1em;}
|
||||||
|
.pl1 {padding-left:1em;}
|
||||||
|
.pt2 {padding-top:2em;}
|
||||||
|
.pr2 {padding-right:2em;}
|
||||||
|
.pb2 {padding-bottom:2em;}
|
||||||
|
.pl2 {padding-left:2em;}
|
||||||
|
.red {color: red; text-align: center;}
|
||||||
|
.bold {font-weight: bold;}
|
||||||
|
.clr {clear: both;}
|
||||||
|
.txtctr {text-align: center;}
|
||||||
|
|
||||||
|
#login, #password {
|
||||||
|
width: 120px;
|
||||||
|
margin: 2px 2px 8px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
border: 1px solid #999;
|
||||||
|
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
width: 1.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=submit] {
|
||||||
|
width:15em;
|
||||||
|
background:#004F9B;
|
||||||
|
color:#fff;
|
||||||
|
height:30px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 1px solid #999;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=submit]:hover {
|
||||||
|
background:#fff;
|
||||||
|
color:#004F9B;
|
||||||
|
}
|
||||||
|
header {
|
||||||
|
margin-bottom: 2em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#top-bg {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
top: -4px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
header h1 {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
||||||
|
header h1,header h4 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 2em;
|
||||||
|
border-top: 1px solid #222;
|
||||||
|
}
|
||||||
|
#pageresults, #pageadmin {
|
||||||
|
text-align: center;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
min-height: 160px;
|
||||||
|
}
|
||||||
|
.result_pres {
|
||||||
|
width: 20%;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.result_pres_cs {
|
||||||
|
width: 25%;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 0.5em 0;
|
||||||
|
}
|
||||||
|
.conf_resolution {
|
||||||
|
height:5em;
|
||||||
|
}
|
||||||
|
.conf_cs {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.conf_global_form { margin: 0; padding: 0; list-style: none }
|
||||||
|
.conf_global_form li { overflow: auto }
|
||||||
|
.conf_global_form li + li { margin-top: 5px }
|
||||||
|
|
||||||
|
.conf_global_form label { float: left; width: auto; margin-right: 10px }
|
||||||
|
.conf_global_form label + div { width: auto; overflow: auto }
|
||||||
|
.conf_global_form input, .conf_global_form textarea { width: 100%; -moz-box-sizing: border-box; box-sizing: border-box }
|
||||||
|
|
||||||
|
.admin-boxes {
|
||||||
|
width: 200px;
|
||||||
|
height: 100px;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 1em;
|
||||||
|
margin: 1em;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
.admin-boxes span {font-size: 1.2em; font-weight: bold; line-height: 40px;}
|
||||||
|
|
||||||
|
.onoffswitch {
|
||||||
|
position: relative; width: 90px;
|
||||||
|
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
|
||||||
|
left: 28%;
|
||||||
|
top: 25%;
|
||||||
|
}
|
||||||
|
.onoffswitch-checkbox {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.onoffswitch-label {
|
||||||
|
display: block; overflow: hidden; cursor: pointer;
|
||||||
|
border: 2px solid #999999; border-radius: 20px;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner {
|
||||||
|
width: 200%; margin-left: -100%;
|
||||||
|
-moz-transition: margin 0.3s ease-in 0s; -webkit-transition: margin 0.3s ease-in 0s;
|
||||||
|
-o-transition: margin 0.3s ease-in 0s; transition: margin 0.3s ease-in 0s;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner:before, .onoffswitch-inner:after {
|
||||||
|
float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
|
||||||
|
font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
|
||||||
|
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner:before {
|
||||||
|
content: "Fermé";
|
||||||
|
padding-right: 15px;
|
||||||
|
background-color: #D91912; color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner:after {
|
||||||
|
content: "Ouvert";
|
||||||
|
padding-right: 10px;
|
||||||
|
background-color: #09BA0A; color: #FFFFFF;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.onoffswitch-switch {
|
||||||
|
width: 18px; margin: 6px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border: 2px solid #999999; border-radius: 20px;
|
||||||
|
position: absolute; top: 0; bottom: 0; right: 56px;
|
||||||
|
-moz-transition: all 0.3s ease-in 0s; -webkit-transition: all 0.3s ease-in 0s;
|
||||||
|
-o-transition: all 0.3s ease-in 0s; transition: all 0.3s ease-in 0s;
|
||||||
|
}
|
||||||
|
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
/* Popup */
|
||||||
|
.ui-dialog, .ui-widget {
|
||||||
|
background-color: #EA6B6B;
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
.ui-corner-all {
|
||||||
|
border-radius: 1em;
|
||||||
|
}
|
||||||
|
.ui-dialog-titlebar-close {
|
||||||
|
margin-left: 6em;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
.raz-mdp a {text-decoration: none;}
|
||||||
|
/* ==========================================================================
|
||||||
|
Helper classes
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Image replacement
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ir {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
/* IE 6/7 fallback */
|
||||||
|
*text-indent: -9999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ir:before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hide from both screenreaders and browsers: h5bp.com/u
|
||||||
|
*/
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none !important;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hide only visually, but have it available for screenreaders: h5bp.com/v
|
||||||
|
*/
|
||||||
|
|
||||||
|
.visuallyhidden {
|
||||||
|
border: 0;
|
||||||
|
clip: rect(0 0 0 0);
|
||||||
|
height: 1px;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extends the .visuallyhidden class to allow the element to be focusable
|
||||||
|
* when navigated to via the keyboard: h5bp.com/p
|
||||||
|
*/
|
||||||
|
|
||||||
|
.visuallyhidden.focusable:active,
|
||||||
|
.visuallyhidden.focusable:focus {
|
||||||
|
clip: auto;
|
||||||
|
height: auto;
|
||||||
|
margin: 0;
|
||||||
|
overflow: visible;
|
||||||
|
position: static;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hide visually and from screenreaders, but maintain layout
|
||||||
|
*/
|
||||||
|
|
||||||
|
.invisible {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clearfix: contain floats
|
||||||
|
*
|
||||||
|
* For modern browsers
|
||||||
|
* 1. The space content is one way to avoid an Opera bug when the
|
||||||
|
* `contenteditable` attribute is included anywhere else in the document.
|
||||||
|
* Otherwise it causes space to appear at the top and bottom of elements
|
||||||
|
* that receive the `clearfix` class.
|
||||||
|
* 2. The use of `table` rather than `block` is only necessary if using
|
||||||
|
* `:before` to contain the top-margins of child elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.clearfix:before,
|
||||||
|
.clearfix:after {
|
||||||
|
content: " "; /* 1 */
|
||||||
|
display: table; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For IE 6/7 only
|
||||||
|
* Include this rule to trigger hasLayout and contain floats.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.clearfix {
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
EXAMPLE Media Queries for Responsive Design.
|
||||||
|
These examples override the primary ('mobile first') styles.
|
||||||
|
Modify as content requires.
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
@media only screen and (min-width: 832px) {
|
||||||
|
#identform {
|
||||||
|
width: 40%;
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 4%;
|
||||||
|
height: 12em;
|
||||||
|
}
|
||||||
|
#checkvoteform {
|
||||||
|
width: 40%;
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 2%;
|
||||||
|
height: 12em;
|
||||||
|
}
|
||||||
|
#identform input, #checkvoteform input {
|
||||||
|
width: 70%
|
||||||
|
}
|
||||||
|
#pagevote {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
#pagefinal {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print,
|
||||||
|
(-o-min-device-pixel-ratio: 5/4),
|
||||||
|
(-webkit-min-device-pixel-ratio: 1.25),
|
||||||
|
(min-resolution: 120dpi) {
|
||||||
|
/* Style adjustments for high resolution devices */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Print styles.
|
||||||
|
Inlined to avoid required HTTP connection: h5bp.com/r
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
* {
|
||||||
|
background: transparent !important;
|
||||||
|
color: #000 !important; /* Black prints faster: h5bp.com/s */
|
||||||
|
box-shadow: none !important;
|
||||||
|
text-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
a:visited {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a[href]:after {
|
||||||
|
content: " (" attr(href) ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title]:after {
|
||||||
|
content: " (" attr(title) ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't show links for images, or javascript/internal links
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ir a:after,
|
||||||
|
a[href^="javascript:"]:after,
|
||||||
|
a[href^="#"]:after {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid #999;
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
display: table-header-group; /* h5bp.com/t */
|
||||||
|
}
|
||||||
|
|
||||||
|
tr,
|
||||||
|
img {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@page {
|
||||||
|
margin: 0.5cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
orphans: 3;
|
||||||
|
widows: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
page-break-after: avoid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,527 @@
|
||||||
|
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
HTML5 display definitions
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
article,
|
||||||
|
aside,
|
||||||
|
details,
|
||||||
|
figcaption,
|
||||||
|
figure,
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
hgroup,
|
||||||
|
main,
|
||||||
|
nav,
|
||||||
|
section,
|
||||||
|
summary {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
video {
|
||||||
|
display: inline-block;
|
||||||
|
*display: inline;
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent modern browsers from displaying `audio` without controls.
|
||||||
|
* Remove excess height in iOS 5 devices.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio:not([controls]) {
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
|
||||||
|
* Known issue: no IE 6 support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Base
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
|
||||||
|
* `em` units.
|
||||||
|
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||||
|
* user zoom.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 100%; /* 1 */
|
||||||
|
-ms-text-size-adjust: 100%; /* 2 */
|
||||||
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `font-family` inconsistency between `textarea` and other form
|
||||||
|
* elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margins handled incorrectly in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Links
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `outline` inconsistency between Chrome and other browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:focus {
|
||||||
|
outline: thin dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve readability when focused and also mouse hovered in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:active,
|
||||||
|
a:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Typography
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address font sizes and margins set differently in IE 6/7.
|
||||||
|
* Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
|
||||||
|
* and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.6em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.4em;
|
||||||
|
margin: 0.83em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.17em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1em;
|
||||||
|
margin: 1.33em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 0.83em;
|
||||||
|
margin: 1.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 0.67em;
|
||||||
|
margin: 2.33em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 7/8/9, Safari 5, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
abbr[title] {
|
||||||
|
border-bottom: 1px dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 1em 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in Safari 5 and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dfn {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address differences between Firefox and other browsers.
|
||||||
|
* Known issue: no IE 6/7 normalization.
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 6/7/8/9.
|
||||||
|
*/
|
||||||
|
|
||||||
|
mark {
|
||||||
|
background: #ff0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margins set differently in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
p,
|
||||||
|
pre {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
pre,
|
||||||
|
samp {
|
||||||
|
font-family: monospace, serif;
|
||||||
|
_font-family: 'courier new', monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve readability of pre-formatted text in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pre {
|
||||||
|
white-space: pre;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address CSS quotes not supported in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `quotes` property not supported in Safari 4.
|
||||||
|
*/
|
||||||
|
|
||||||
|
q:before,
|
||||||
|
q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent and variable font size in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Lists
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margins set differently in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dl,
|
||||||
|
menu,
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin: 0 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address paddings set differently in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
menu,
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
padding: 0 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct list images handled incorrectly in IE 7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
nav ul,
|
||||||
|
nav ol {
|
||||||
|
list-style: none;
|
||||||
|
list-style-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Embedded content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
|
||||||
|
* 2. Improve image quality when scaled in IE 7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0; /* 1 */
|
||||||
|
-ms-interpolation-mode: bicubic; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct overflow displayed oddly in IE 9.
|
||||||
|
*/
|
||||||
|
|
||||||
|
svg:not(:root) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Figures
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Forms
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct margin displayed oddly in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define consistent border, margin, and padding.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 0.35em 0.625em 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct color not being inherited in IE 6/7/8/9.
|
||||||
|
* 2. Correct text not wrapping in Firefox 3.
|
||||||
|
* 3. Correct alignment displayed oddly in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
legend {
|
||||||
|
border: 0; /* 1 */
|
||||||
|
padding: 0;
|
||||||
|
white-space: normal; /* 2 */
|
||||||
|
*margin-left: -7px; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct font size not being inherited in all browsers.
|
||||||
|
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
|
||||||
|
* and Chrome.
|
||||||
|
* 3. Improve appearance and consistency in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-size: 100%; /* 1 */
|
||||||
|
margin: 0; /* 2 */
|
||||||
|
vertical-align: baseline; /* 3 */
|
||||||
|
*vertical-align: middle; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
|
||||||
|
* the UA stylesheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||||
|
* All other form control elements do not inherit `text-transform` values.
|
||||||
|
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
|
||||||
|
* Correct `select` style inheritance in Firefox 4+ and Opera.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||||
|
* and `video` controls.
|
||||||
|
* 2. Correct inability to style clickable `input` types in iOS.
|
||||||
|
* 3. Improve usability and consistency of cursor style between image-type
|
||||||
|
* `input` and others.
|
||||||
|
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
|
||||||
|
* Known issue: inner spacing remains in IE 6.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
html input[type="button"], /* 1 */
|
||||||
|
input[type="reset"],
|
||||||
|
input[type="submit"] {
|
||||||
|
-webkit-appearance: button; /* 2 */
|
||||||
|
cursor: pointer; /* 3 */
|
||||||
|
*overflow: visible; /* 4 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Re-set default cursor for disabled elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button[disabled],
|
||||||
|
html input[disabled] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Address box sizing set to content-box in IE 8/9.
|
||||||
|
* 2. Remove excess padding in IE 8/9.
|
||||||
|
* 3. Remove excess padding in IE 7.
|
||||||
|
* Known issue: excess padding remains in IE 6.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
box-sizing: border-box; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
*height: 13px; /* 3 */
|
||||||
|
*width: 13px; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||||
|
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||||
|
* (include `-moz` to future-proof).
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"] {
|
||||||
|
-webkit-appearance: textfield; /* 1 */
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
-webkit-box-sizing: content-box; /* 2 */
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and search cancel button in Safari 5 and Chrome
|
||||||
|
* on OS X.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"]::-webkit-search-cancel-button,
|
||||||
|
input[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and border in Firefox 3+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
input::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
|
||||||
|
* 2. Improve readability and alignment in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto; /* 1 */
|
||||||
|
vertical-align: top; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Tables
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove most spacing between table cells.
|
||||||
|
*/
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
if(isset($_POST['value'])) {
|
||||||
|
$value=$_POST['value'];
|
||||||
|
$sql = "UPDATE admin SET option_value = :value WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// On regarde si le vote est ouvert
|
||||||
|
$option = 'vote_ouvert';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':value', $value, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
// Definition des constantes et variables
|
||||||
|
define('LOGIN','');
|
||||||
|
// TODO : hacher le pass
|
||||||
|
define('PASSWORD','');
|
||||||
|
$errorMessage = '';
|
||||||
|
// Test de l'envoi du formulaire
|
||||||
|
if(!empty($_POST))
|
||||||
|
{
|
||||||
|
// Les identifiants sont transmis ?
|
||||||
|
if(!empty($_POST['login']) && !empty($_POST['password']))
|
||||||
|
{
|
||||||
|
// Sont-ils les mêmes que les constantes ?
|
||||||
|
if($_POST['login'] !== LOGIN)
|
||||||
|
{
|
||||||
|
$errorMessage = 'Mauvais identifiant et/ou mot de passe...';
|
||||||
|
}
|
||||||
|
elseif($_POST['password'] !== PASSWORD)
|
||||||
|
{
|
||||||
|
$errorMessage = 'Mauvais identifiant et/ou mot de passe...';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// On ouvre la session
|
||||||
|
session_start();
|
||||||
|
// On enregistre le login en session
|
||||||
|
$_SESSION['login'] = LOGIN;
|
||||||
|
// On redirige vers le fichier admin.php
|
||||||
|
header('Location: index.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$errorMessage = 'Veuillez inscrire vos identifiants svp !';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
include("fonctions.inc.php");
|
||||||
|
if (isset ($_POST['reference']) && isset ($_POST['password'])) {
|
||||||
|
$reference = (int) $_POST['reference'];
|
||||||
|
$password = secure($_POST['password']);
|
||||||
|
if (verification($reference, $password)) {
|
||||||
|
$_SESSION['reference'] = $reference;
|
||||||
|
header('Location: ../explication.php');
|
||||||
|
} else { header('Location: ../index.php?$wrong=true');}
|
||||||
|
} else { header('Location: ../index.php?$wrong=true');}
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
<?php
|
||||||
|
header("Content-Type: text/html; charset=utf-8");
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
|
||||||
|
// On modifie la config globale
|
||||||
|
if (isset($_POST['nb_resolutions_ago']) && isset($_POST['nb_resolutions_age']) &&isset($_POST['nb_postes_cs']) && isset($_POST['url_docs'])) {
|
||||||
|
$nb_postes_cs = (int)$_POST['nb_postes_cs'];
|
||||||
|
$nb_resolutions_ago = (int)$_POST['nb_resolutions_ago'];
|
||||||
|
$nb_resolutions_age = (int)$_POST['nb_resolutions_age'];
|
||||||
|
$url_docs = $_POST['url_docs'];
|
||||||
|
$sql="
|
||||||
|
UPDATE admin SET option_value =
|
||||||
|
CASE
|
||||||
|
WHEN option_id = 4 THEN :nb_postes_cs
|
||||||
|
WHEN option_id = 6 THEN :nb_resolutions_ago
|
||||||
|
WHEN option_id = 7 THEN :nb_resolutions_age
|
||||||
|
WHEN option_id = 8 THEN :url_docs
|
||||||
|
ELSE option_value
|
||||||
|
END
|
||||||
|
WHERE option_id IN (4,6,7,8)
|
||||||
|
";
|
||||||
|
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':nb_postes_cs', $nb_postes_cs);
|
||||||
|
$stmt->bindParam(':nb_resolutions_ago', $nb_resolutions_ago);
|
||||||
|
$stmt->bindParam(':nb_resolutions_age', $nb_resolutions_age);
|
||||||
|
$stmt->bindParam(':url_docs', $url_docs);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt = null;
|
||||||
|
header('Location: ../config.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
// On modifie les résolutions d'AGO
|
||||||
|
if (isset($_POST['res_ago_1'])) {
|
||||||
|
$sql="
|
||||||
|
UPDATE admin SET option_value =
|
||||||
|
CASE option_id
|
||||||
|
WHEN 20 THEN :res_ago_1
|
||||||
|
WHEN 21 THEN :res_ago_2
|
||||||
|
WHEN 22 THEN :res_ago_3
|
||||||
|
WHEN 23 THEN :res_ago_4
|
||||||
|
WHEN 24 THEN :res_ago_5
|
||||||
|
WHEN 25 THEN :res_ago_6
|
||||||
|
WHEN 26 THEN :res_ago_7
|
||||||
|
WHEN 27 THEN :res_ago_8
|
||||||
|
WHEN 28 THEN :res_ago_9
|
||||||
|
WHEN 29 THEN :res_ago_10
|
||||||
|
ELSE option_value
|
||||||
|
END
|
||||||
|
WHERE option_id IN (20,21,22,23,24,25,26,27,28,29)
|
||||||
|
";
|
||||||
|
|
||||||
|
// Si un champ est vide, on le passe à NULL
|
||||||
|
// Inutile depuis que nb_res_agoolutions est là
|
||||||
|
$blank = NULL;
|
||||||
|
if (empty($_POST['res_ago_1'])) {$res_ago_1 = $blank;} else {$res_ago_1 = $_POST['res_ago_1'];}
|
||||||
|
if (empty($_POST['res_ago_2'])) {$res_ago_2 = $blank;} else {$res_ago_2 = $_POST['res_ago_2'];}
|
||||||
|
if (empty($_POST['res_ago_3'])) {$res_ago_3 = $blank;} else {$res_ago_3 = $_POST['res_ago_3'];}
|
||||||
|
if (empty($_POST['res_ago_4'])) {$res_ago_4 = $blank;} else {$res_ago_4 = $_POST['res_ago_4'];}
|
||||||
|
if (empty($_POST['res_ago_5'])) {$res_ago_5 = $blank;} else {$res_ago_5 = $_POST['res_ago_5'];}
|
||||||
|
if (empty($_POST['res_ago_6'])) {$res_ago_6 = $blank;} else {$res_ago_6 = $_POST['res_ago_6'];}
|
||||||
|
if (empty($_POST['res_ago_7'])) {$res_ago_7 = $blank;} else {$res_ago_7 = $_POST['res_ago_7'];}
|
||||||
|
if (empty($_POST['res_ago_8'])) {$res_ago_8 = $blank;} else {$res_ago_8 = $_POST['res_ago_8'];}
|
||||||
|
if (empty($_POST['res_ago_9'])) {$res_ago_9 = $blank;} else {$res_ago_9 = $_POST['res_ago_9'];}
|
||||||
|
if (empty($_POST['res_ago_10'])) {$res_ago_10 = $blank;} else {$res_ago_10 = $_POST['res_ago_10'];}
|
||||||
|
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':res_ago_1', $res_ago_1);
|
||||||
|
$stmt->bindParam(':res_ago_2', $res_ago_2);
|
||||||
|
$stmt->bindParam(':res_ago_3', $res_ago_3);
|
||||||
|
$stmt->bindParam(':res_ago_4', $res_ago_4);
|
||||||
|
$stmt->bindParam(':res_ago_5', $res_ago_5);
|
||||||
|
$stmt->bindParam(':res_ago_6', $res_ago_6);
|
||||||
|
$stmt->bindParam(':res_ago_7', $res_ago_7);
|
||||||
|
$stmt->bindParam(':res_ago_8', $res_ago_8);
|
||||||
|
$stmt->bindParam(':res_ago_9', $res_ago_9);
|
||||||
|
$stmt->bindParam(':res_ago_10', $res_ago_10);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt = null;
|
||||||
|
header('Location: ../config.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
// On modifie les résolutions d'AGE
|
||||||
|
if (isset($_POST['res_age_1'])) {
|
||||||
|
$sql="
|
||||||
|
UPDATE admin SET option_value =
|
||||||
|
CASE option_id
|
||||||
|
WHEN 30 THEN :res_age_1
|
||||||
|
WHEN 31 THEN :res_age_2
|
||||||
|
WHEN 32 THEN :res_age_3
|
||||||
|
WHEN 33 THEN :res_age_4
|
||||||
|
WHEN 34 THEN :res_age_5
|
||||||
|
WHEN 35 THEN :res_age_6
|
||||||
|
WHEN 36 THEN :res_age_7
|
||||||
|
WHEN 37 THEN :res_age_8
|
||||||
|
WHEN 38 THEN :res_age_9
|
||||||
|
WHEN 39 THEN :res_age_10
|
||||||
|
ELSE option_value
|
||||||
|
END
|
||||||
|
WHERE option_id IN (30,31,32,33,34,35,36,37,38,39)
|
||||||
|
";
|
||||||
|
|
||||||
|
// Si un champ est vide, on le passe à NULL
|
||||||
|
// Inutile depuis que nb_res_ageolutions est là
|
||||||
|
$blank = NULL;
|
||||||
|
if (empty($_POST['res_age_1'])) {$res_age_1 = $blank;} else {$res_age_1 = $_POST['res_age_1'];}
|
||||||
|
if (empty($_POST['res_age_2'])) {$res_age_2 = $blank;} else {$res_age_2 = $_POST['res_age_2'];}
|
||||||
|
if (empty($_POST['res_age_3'])) {$res_age_3 = $blank;} else {$res_age_3 = $_POST['res_age_3'];}
|
||||||
|
if (empty($_POST['res_age_4'])) {$res_age_4 = $blank;} else {$res_age_4 = $_POST['res_age_4'];}
|
||||||
|
if (empty($_POST['res_age_5'])) {$res_age_5 = $blank;} else {$res_age_5 = $_POST['res_age_5'];}
|
||||||
|
if (empty($_POST['res_age_6'])) {$res_age_6 = $blank;} else {$res_age_6 = $_POST['res_age_6'];}
|
||||||
|
if (empty($_POST['res_age_7'])) {$res_age_7 = $blank;} else {$res_age_7 = $_POST['res_age_7'];}
|
||||||
|
if (empty($_POST['res_age_8'])) {$res_age_8 = $blank;} else {$res_age_8 = $_POST['res_age_8'];}
|
||||||
|
if (empty($_POST['res_age_9'])) {$res_age_9 = $blank;} else {$res_age_9 = $_POST['res_age_9'];}
|
||||||
|
if (empty($_POST['res_age_10'])) {$res_age_10 = $blank;} else {$res_age_10 = $_POST['res_age_10'];}
|
||||||
|
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':res_age_1', $res_age_1);
|
||||||
|
$stmt->bindParam(':res_age_2', $res_age_2);
|
||||||
|
$stmt->bindParam(':res_age_3', $res_age_3);
|
||||||
|
$stmt->bindParam(':res_age_4', $res_age_4);
|
||||||
|
$stmt->bindParam(':res_age_5', $res_age_5);
|
||||||
|
$stmt->bindParam(':res_age_6', $res_age_6);
|
||||||
|
$stmt->bindParam(':res_age_7', $res_age_7);
|
||||||
|
$stmt->bindParam(':res_age_8', $res_age_8);
|
||||||
|
$stmt->bindParam(':res_age_9', $res_age_9);
|
||||||
|
$stmt->bindParam(':res_age_10', $res_age_10);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt = null;
|
||||||
|
header('Location: ../config.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
// On modifie les candidats au CS
|
||||||
|
if (isset($_POST['CS'])) {
|
||||||
|
$nb_vote_cs = count($_POST['CS']);
|
||||||
|
$vote_cs = implode(",", $_POST['CS']);
|
||||||
|
// On retire les éventuelles double virgules pour éviter un champ vide au milieu du formulaire
|
||||||
|
$vote_cs = str_replace(",,", ",", $vote_cs);
|
||||||
|
// On retire l'enventuelle virgule finale pour éviter un champ vide à la fin du formulaire
|
||||||
|
$vote_cs = rtrim($vote_cs, ",");
|
||||||
|
$sql="UPDATE admin SET option_value = :vote_cs WHERE option_id = 5";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':vote_cs', $vote_cs);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt = null;
|
||||||
|
header('Location: ../config.php');
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
$PARAM_host=''; // server
|
||||||
|
$PARAM_port='3306'; // db port
|
||||||
|
$PARAM_dbname=''; // db name
|
||||||
|
$PARAM_user=''; // user
|
||||||
|
$PARAM_password=''; // password
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$arrExtraParam = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');
|
||||||
|
$bdd = new PDO('mysql:host='.$PARAM_host.';dbname='.$PARAM_dbname, $PARAM_user, $PARAM_password, $arrExtraParam);
|
||||||
|
$bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
catch(PDOException $e)
|
||||||
|
{
|
||||||
|
// Display dev or prod error message
|
||||||
|
$msg = 'ERREUR PDO dans ' . $e->getFile() . ' Ligne ' . $e->getLine() . ' : ' . $e->getMessage();
|
||||||
|
//$msg = "Une erreur PDO est survenue !";
|
||||||
|
die($msg);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
// Démarrage ou restauration de la session
|
||||||
|
session_start();
|
||||||
|
// Réinitialisation du tableau de session
|
||||||
|
// On le vide intégralement
|
||||||
|
$_SESSION = array();
|
||||||
|
// Destruction de la session
|
||||||
|
session_destroy();
|
||||||
|
// Destruction du tableau de session
|
||||||
|
unset($_SESSION);
|
||||||
|
// On redirige
|
||||||
|
header('Location: ../index.php');
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
// Génération des mots de passe
|
||||||
|
function passwdgen ($longueur){
|
||||||
|
$mdp = "";
|
||||||
|
// Définir tout les caractères possibles dans le mot de passe,
|
||||||
|
$possible = "#-_12346789abcdefghjklmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||||
|
// Nombre de caractères dans la chaîne précédente
|
||||||
|
$longueurMax = strlen($possible);
|
||||||
|
|
||||||
|
if ($longueur > $longueurMax) {
|
||||||
|
$longueur = $longueurMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
// Ajouter un caractère aléatoire à $mdp jusqu'à ce que $longueur soit atteint
|
||||||
|
while ($i < $longueur) {
|
||||||
|
// Prendre un caractère aléatoire
|
||||||
|
$caractere = substr($possible, mt_rand(0, $longueurMax-1), 1);
|
||||||
|
|
||||||
|
// Vérifier si le caractère est déjà utilisé dans $mdp
|
||||||
|
if (!strstr($mdp, $caractere)) {
|
||||||
|
// Si non, ajouter le caractère à $mdp et augmenter le compteur
|
||||||
|
$mdp .= $caractere;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $mdp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fonction de vérification du couple identifiant mot de passe
|
||||||
|
function verification($reference,$password) {
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
|
||||||
|
$reference_sql = $bdd->quote($reference);
|
||||||
|
$password_sql = $bdd->quote($password);
|
||||||
|
|
||||||
|
$sql = "SELECT count(*) as number from clients WHERE reference=$reference_sql AND password=$password_sql";
|
||||||
|
|
||||||
|
$result = $bdd->query($sql);
|
||||||
|
$row = $result->fetch();
|
||||||
|
$result = null;
|
||||||
|
if ($row['number'] == 1) {
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Sécurisation des données en sortie
|
||||||
|
function secure($var) {
|
||||||
|
$var = htmlspecialchars(strip_tags($var));
|
||||||
|
return $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vérification de la tenue du AGE
|
||||||
|
function checkago() {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$option = 'resolution_ago_nb';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
if ($results['option_value'] == 0) return false; else return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vérification de la tenue du AGE
|
||||||
|
function checkage() {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$option = 'resolution_age_nb';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
if ($results['option_value'] == 0) return false; else return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vérification de la tenue du vote du CS
|
||||||
|
function checkcs() {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$option = 'cs_nb_poste';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
if ($results['option_value'] == 0) return false; else return true;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
// On teste si la variable de session existe et contient une valeur
|
||||||
|
if(empty($_SESSION['login']))
|
||||||
|
{
|
||||||
|
// Si inexistante ou nulle, on redirige vers le formulaire de login
|
||||||
|
header('Location: ../auth.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
include("fonctions.inc.php");
|
||||||
|
|
||||||
|
// Requête MySQL
|
||||||
|
$query = $bdd->query('SELECT reference,password FROM clients WHERE password IS NULL');
|
||||||
|
$nb = $query->rowCount();
|
||||||
|
// Si le retour est vide, on affiche un petit message
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
// on génére un password pour chaque référence
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
$ref = $results->reference;
|
||||||
|
$mdp = passwdgen(10);
|
||||||
|
|
||||||
|
// Préparation de la requête
|
||||||
|
$sql ="
|
||||||
|
UPDATE clients
|
||||||
|
SET password = :mdp
|
||||||
|
WHERE reference = :ref
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':mdp', $mdp, PDO::PARAM_STR);
|
||||||
|
$stmt->bindParam(':ref', $ref, PDO::PARAM_STR);
|
||||||
|
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
// On enregistre que les mots de passe sont générés
|
||||||
|
$sql ="
|
||||||
|
UPDATE admin
|
||||||
|
SET option_value = 1
|
||||||
|
WHERE option_id = 9
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
// Clore la requête
|
||||||
|
$stmt->closeCursor();
|
||||||
|
$stmt = NULL;
|
||||||
|
header('Location: ../index.php?$generate=true&$nb='.$nb);
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {header('Location: ../index.php?$generate=false');}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Tr<EFBFBD>meaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once 'model/ChartConfig.php';
|
||||||
|
require_once 'model/Point.php';
|
||||||
|
require_once 'model/DataSet.php';
|
||||||
|
require_once 'model/XYDataSet.php';
|
||||||
|
require_once 'model/XYSeriesDataSet.php';
|
||||||
|
|
||||||
|
require_once 'view/primitive/Padding.php';
|
||||||
|
require_once 'view/primitive/Rectangle.php';
|
||||||
|
require_once 'view/primitive/Primitive.php';
|
||||||
|
require_once 'view/text/Text.php';
|
||||||
|
require_once 'view/color/Color.php';
|
||||||
|
require_once 'view/color/ColorSet.php';
|
||||||
|
require_once 'view/color/Palette.php';
|
||||||
|
require_once 'view/axis/Bound.php';
|
||||||
|
require_once 'view/axis/Axis.php';
|
||||||
|
require_once 'view/plot/Plot.php';
|
||||||
|
require_once 'view/caption/Caption.php';
|
||||||
|
require_once 'view/chart/Chart.php';
|
||||||
|
require_once 'view/chart/BarChart.php';
|
||||||
|
require_once 'view/chart/VerticalBarChart.php';
|
||||||
|
require_once 'view/chart/HorizontalBarChart.php';
|
||||||
|
require_once 'view/chart/LineChart.php';
|
||||||
|
require_once 'view/chart/PieChart.php';
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
// On teste si la variable de session existe et contient une valeur
|
||||||
|
if(empty($_SESSION['login']))
|
||||||
|
{
|
||||||
|
// Si inexistante ou nulle, on redirige vers le formulaire de login
|
||||||
|
header('Location: ../auth.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
include("fonctions.inc.php");
|
||||||
|
|
||||||
|
// Requête MySQL
|
||||||
|
$query = $bdd->query('SELECT * FROM clients WHERE vote = 0');
|
||||||
|
// Si le retour est vide, on affiche un petit message
|
||||||
|
$nb = $query->rowCount();
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
// On affiche les resultats
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
// recipients
|
||||||
|
$to = $results->email;
|
||||||
|
// subject
|
||||||
|
$subject = 'Ouvaton : Convocation AG 2015 et vote en ligne';
|
||||||
|
// message
|
||||||
|
$message = "
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Ouvaton.coop AG 2015</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p><strong>CECI EST UN TEST INTERNE</strong></p>
|
||||||
|
<p>Cher Coopérateur/Chère Coopératrice,</p>
|
||||||
|
|
||||||
|
<p>Nous avons le plaisir de vous indiquer que les coopérateurs et coopératrices de la société OUVATON sont convoqués en Assemblée Générale Ordinaire le vendredi 30 mai 2014 à 21h à
|
||||||
|
Locmaria Guidel, afin de délibérer sur l’ordre du jour suivant :</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Présentation du rapport moral et financier par le Président du Directoire</li>
|
||||||
|
<li>Présentation du rapport du Conseil de Surveillance</li>
|
||||||
|
<li>Approbation des comptes 2013</li>
|
||||||
|
<li>Affectation du résultat</li>
|
||||||
|
<li>Quitus au Directoire et Conseil de Surveillance pour ledit exercice</li>
|
||||||
|
<li>Élection des membres du Conseil de Surveillance</li>
|
||||||
|
<li>Questions diverses</li>
|
||||||
|
<li>Pouvoirs pour formalités.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Dans l'hypothèse où le quorum ne serait pas atteint suite à cette première convocation, <strong>une deuxième assemblée serait convoquée le samedi 7 juin 2014 à à la Mairie du 2ème arrondissement,
|
||||||
|
8 rue de la Banque 75002 Paris, à 10h</strong>. Les votes émis avant le 30 mai 2014 à 21h resteront valables pour l'éventuelle assemblée de seconde convocation.</p>
|
||||||
|
|
||||||
|
<p>Nous vous rappelons que le droit de participer à l’assemblée est subordonné à l’inscription de titres sur le registre des parts sociales de la coopérative au jour de l’Assemblée Générale.</p>
|
||||||
|
|
||||||
|
<p>Vous trouverez tous les documents relatifs à l'Assemblée Générale 2014 statuant sur l'exercice 2013 (documents comptables, rapports, candidatures) sur le site de la
|
||||||
|
Coopérative en <a href=\"https://www.ouvaton.coop/Assemblee-Generale-2014\">https://www.ouvaton.coop/Assemblee-Generale-2014</a>.<br />
|
||||||
|
Ils peuvent être discutées sur <a href=\"https://forums.ouvaton.coop\">les forums Ouvaton</a>.</p>
|
||||||
|
|
||||||
|
<p>Conformément à la possibilité ouverte par la résolution n°5 adoptée par l'Assemblée Générale du 4 mai 2013, le vote sur les résolutions s'effectuera par scrutin électronique sécurisé
|
||||||
|
(voir modalités plus bas).</p>
|
||||||
|
|
||||||
|
<p>Le formulaire de vote en ligne de notre Assemblée Générale est disponible sur <a href=\"https://ag.ouvaton.coop\">https://ag.ouvaton.coop</a>.</p>
|
||||||
|
|
||||||
|
<p><strong>Voici les instructions pour voter :</strong></p>
|
||||||
|
|
||||||
|
<p>Quand elles vous seront demandées saisissez les informations suivantes :</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Numéro de coopérateur : ".$results->reference."</li>
|
||||||
|
<li>Code d'accès : ".$results->password."</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><strong>Le vote se déroule en 4 étapes :</strong></p>
|
||||||
|
|
||||||
|
<p>D'abord vous devez vous identifier en utilisant votre numéro de coopérateur et le code d'accès donné ci-dessus.</p>
|
||||||
|
|
||||||
|
<p>Ensuite vous devez compléter le questionnaire avec vos choix.</p>
|
||||||
|
|
||||||
|
<p>Dans la troisième étape vos choix seront affichés, et il vous sera demandé de les confirmer, ou de retourner à l'étape précédente si vous souhaitez modifier votre vote.</p>
|
||||||
|
|
||||||
|
<p>Enfin, après avoir confirmé votre choix, un clé de contrôle unique vous sera donné, qui vous permettra de vérifier que votre réponse a été correctement enregistrée. Pour assurer l'anonymat, aucun
|
||||||
|
lien ne sera conservé entre cette clé et vos identifiants d'accès, gardez donc précieusement cette clé. Une fois que vous aurez voté, vous ne pourrez plus le faire à nouveau.</p>
|
||||||
|
|
||||||
|
<p>Merci par avance pour votre participation à ce vote électronique.</p>
|
||||||
|
|
||||||
|
<p>Cordialement,<br />
|
||||||
|
Le Président du Directoire</p>
|
||||||
|
<p>Ouvaton Coopérative SA à directoire et conseil de surveillance à capital variable Siège Social 16 bis rue d’Odessa 75014 PARIS R.C.S. Paris 438 168 718</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
";
|
||||||
|
|
||||||
|
// To send HTML mail, the Content-type header must be set
|
||||||
|
$headers = 'MIME-Version: 1.0' . "\r\n";
|
||||||
|
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
|
||||||
|
|
||||||
|
// Additional headers
|
||||||
|
$headers .= 'From: Ouvaton.coop AG 2015 <contact@ouvaton.coop>' . "\r\n";
|
||||||
|
|
||||||
|
// Mail it
|
||||||
|
mail($to, $subject, $message, $headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
// On actualise la date et on incrémente le compteur
|
||||||
|
$nb_mail_sent = $_SESSION['nb_mail_sent'] + 1;
|
||||||
|
$sql ="
|
||||||
|
UPDATE admin SET option_value =
|
||||||
|
CASE
|
||||||
|
WHEN option_id = 2 THEN :last_mail_sent
|
||||||
|
WHEN option_id = 3 THEN :nb_mail_sent
|
||||||
|
ELSE option_value
|
||||||
|
END
|
||||||
|
WHERE option_id IN (2,3)
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':last_mail_sent', date("Y-m-d H:i:s"));
|
||||||
|
$stmt->bindParam(':nb_mail_sent', $nb_mail_sent);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
//Clore la requête
|
||||||
|
$stmt = null;
|
||||||
|
header('Location: ../index.php?$sent=true&$nb='.$nb);
|
||||||
|
} else {echo '<p>Aucune données !</p>';}
|
||||||
|
|
@ -0,0 +1,324 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
echo $_SESSION['nb_mail_sent'];
|
||||||
|
// On teste si la variable de session existe et contient une valeur
|
||||||
|
if(empty($_SESSION['login']))
|
||||||
|
{
|
||||||
|
// Si inexistante ou nulle, on redirige vers le formulaire de login
|
||||||
|
header('Location: ../auth.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
include("fonctions.inc.php");
|
||||||
|
require("../../inc/PHPMailer/PHPMailerAutoload.php");
|
||||||
|
|
||||||
|
// Time start
|
||||||
|
$timestart=microtime(true);
|
||||||
|
$new_nb_mail_sent = $_SESSION['nb_mail_sent']+1;
|
||||||
|
|
||||||
|
if ($_SESSION['nb_mail_sent'] == 0) {
|
||||||
|
// On envoie les mails par paquet de 75
|
||||||
|
$query = $bdd->prepare("SELECT * FROM clients WHERE vote = 0 AND mailed = ? LIMIT 75");
|
||||||
|
$query->execute(array(0));
|
||||||
|
// Si tout le monde n'a pas voté, on balance les mails
|
||||||
|
$nbs = $query->rowCount();
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
// On utilise PHPMailer
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
$mail = new PHPMailer;
|
||||||
|
$mail->isSMTP();
|
||||||
|
$mail->CharSet = "UTF-8";
|
||||||
|
//Enable SMTP debugging
|
||||||
|
// 0 = off (for production use)
|
||||||
|
// 1 = client messages
|
||||||
|
// 2 = client and server messages
|
||||||
|
//$mail->SMTPDebug = 2;
|
||||||
|
//Ask for HTML-friendly debug output
|
||||||
|
//$mail->Debugoutput = 'html';
|
||||||
|
// To load the French version
|
||||||
|
$mail->setLanguage('fr', 'PHPMailer/language/');
|
||||||
|
$mail->Host = 'smtp.ouvaton.coop';
|
||||||
|
$mail->SMTPAuth = true;
|
||||||
|
$mail->SMTPKeepAlive = true;
|
||||||
|
$mail->Username = '';
|
||||||
|
$mail->Password = '';
|
||||||
|
$mail->SMTPSecure = 'tls';
|
||||||
|
$mail->Port = 587;
|
||||||
|
|
||||||
|
$mail->From = '';
|
||||||
|
$mail->FromName = 'Ouvaton.coop AG 2019';
|
||||||
|
$mail->addAddress($results->email);
|
||||||
|
$mail->addReplyTo('');
|
||||||
|
|
||||||
|
$mail->isHTML(true);
|
||||||
|
$mail->Subject = 'Ouvaton AG 2019 : convocation et vote en ligne';
|
||||||
|
|
||||||
|
// On prépare le contenu du mail
|
||||||
|
$body = "
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Ouvaton.coop AG 2019</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Cher Coopérateur/Chère Coopératrice,</p>
|
||||||
|
|
||||||
|
<p>Vous détenez une ou plusieurs parts sociales de la Coopérative Ouvaton. À ce titre, nous avons le plaisir de vous indiquer que les sociétaires sont convoqués en Assemblée Générale Ordinaire le vendredi 19 juin 2019 à 21h à Locmaria Guidel, afin de délibérer sur l’ordre du jour suivant :</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Présentation du rapport moral et financier par le Président du Directoire</li>
|
||||||
|
<li>Présentation du rapport du Conseil de Surveillance</li>
|
||||||
|
<li>Approbation des comptes 2018</li>
|
||||||
|
<li>Affectation du résultat</li>
|
||||||
|
<li>Quitus au Directoire et Conseil de Surveillance pour ledit exercice</li>
|
||||||
|
<li>Élection des membres du Conseil de Surveillance</li>
|
||||||
|
<li>Questions diverses</li>
|
||||||
|
<li>Pouvoirs pour formalités</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Dans l'hypothèse où le quorum ne serait pas atteint suite à cette première convocation, <strong>une deuxième assemblée serait convoquée le samedi 29 juin 2019, au 187 montée de Choulans 69005 Lyon, à 13h</strong>. Les votes émis avant le 19 juin 2019 à 21h resteront valables pour l'éventuelle assemblée de seconde convocation.</p>
|
||||||
|
|
||||||
|
<p>Vous trouverez tous les documents relatifs à l'Assemblée Générale 2019 statuant sur l'exercice 2018 (documents comptables, rapports, candidatures) sur le site de la
|
||||||
|
Coopérative en <a href=\"https://ouvaton.coop/la-cooperative/assemblees-generales/ag-2019/\">https://ouvaton.coop/la-cooperative/assemblees-generales/ag-2019/</a>.<br />
|
||||||
|
Ils peuvent être discutés sur <a href=\"https://forums.ouvaton.coop\">les forums Ouvaton</a>.</p>
|
||||||
|
|
||||||
|
<p>Conformément à la possibilité ouverte par la résolution n°5 adoptée par l'Assemblée Générale du 4 mai 2013, le vote sur les résolutions s'effectuera par scrutin électronique sécurisé (voir modalités plus bas).</p>
|
||||||
|
|
||||||
|
<p>Le formulaire de vote en ligne de notre Assemblée Générale est disponible sur <a href=\"https://ag.ouvaton.coop\">https://ag.ouvaton.coop</a>.</p>
|
||||||
|
|
||||||
|
<p>Il est accessible dès maintenant et le restera jusqu'au jour de l'Assemblée Générale à 15h.<br />
|
||||||
|
Nous attirons votre attention sur le fait que vous ne pourrez pas corriger votre vote une fois que vous l'aurez émis.<br />
|
||||||
|
Vous pouvez prendre le temps de la réflexion, une nouvelle invitation à voter vous sera envoyée dans deux semaines, puis quelques jours avant l'assemblée de seconde convocation.</p>
|
||||||
|
|
||||||
|
<p><strong>Voici les instructions pour voter :</strong></p>
|
||||||
|
|
||||||
|
<p>Quand elles vous seront demandées, saisissez les informations suivantes :</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Numéro de coopérateur : ".$results->reference."</li>
|
||||||
|
<li>Mot de passe : ".$results->password."</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><strong>Le vote se déroule en 4 étapes :</strong></p>
|
||||||
|
|
||||||
|
<p>1. Vous devez vous identifier en utilisant votre numéro de coopérateur et le code d'accès donné ci-dessus.</p>
|
||||||
|
|
||||||
|
<p>2. Vous devez compléter le questionnaire avec vos choix.</p>
|
||||||
|
|
||||||
|
<p>3. Vos choix seront affichés, et il vous sera demandé de les confirmer, ou de retourner à l'étape précédente si vous souhaitez modifier votre vote.</p>
|
||||||
|
|
||||||
|
<p>4. Après avoir confirmé vos choix, une clé de contrôle unique vous sera donnée, qui vous permettra de vérifier que votre réponse a été correctement enregistrée. Pour assurer l'anonymat, aucun lien ne sera conservé entre cette clé et vos identifiants d'accès, gardez donc précieusement cette clé.<br />
|
||||||
|
<strong>Une fois que vous aurez voté, vous ne pourrez plus le faire à nouveau.</strong></p>
|
||||||
|
|
||||||
|
<p>Merci par avance pour votre participation à ce vote électronique.</p>
|
||||||
|
|
||||||
|
<p>Coopérativement,<br />
|
||||||
|
Le Président du Directoire</p>
|
||||||
|
<p>Ouvaton Coopérative SA à directoire et conseil de surveillance à capital variable Siège Social 16 bis rue d’Odessa 75014 PARIS R.C.S. Paris 438 168 718</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
";
|
||||||
|
$mail->msgHTML($body);
|
||||||
|
if ($mail->send()) {
|
||||||
|
// On fait le ménage dans PHPMailer avant la prochaine boucle
|
||||||
|
$mail->clearAddresses();
|
||||||
|
$mail->clearAttachments();
|
||||||
|
|
||||||
|
// On marque que le mail est envoyé pour ce coopérateur
|
||||||
|
$sql ="
|
||||||
|
UPDATE clients
|
||||||
|
SET mailed = :new_nb_mail_sent
|
||||||
|
WHERE reference = :reference
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':reference', $results->reference);
|
||||||
|
$stmt->bindParam(':new_nb_mail_sent', $new_nb_mail_sent);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
} else {echo 'Mailer Error: ' . $mail->ErrorInfo . '<br />';}
|
||||||
|
}
|
||||||
|
// On regarde combien de coopérateurs n'ont pas encore de mails
|
||||||
|
$sql = "SELECT COUNT(*) FROM clients WHERE vote = 0 AND mailed = :nb_mail_sent";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':nb_mail_sent', $_SESSION['nb_mail_sent']);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$nbl = $results[0];
|
||||||
|
|
||||||
|
// On actualise la date et on incrémente le compteur
|
||||||
|
if ($nbl == 0) {
|
||||||
|
$nb_mail_sent = 1;
|
||||||
|
$sql ="
|
||||||
|
UPDATE admin SET option_value =
|
||||||
|
CASE
|
||||||
|
WHEN option_id = 2 THEN :last_mail_sent
|
||||||
|
WHEN option_id = 3 THEN :nb_mail_sent
|
||||||
|
ELSE option_value
|
||||||
|
END
|
||||||
|
WHERE option_id IN (2,3)
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':last_mail_sent', date("Y-m-d H:i:s"));
|
||||||
|
$stmt->bindParam(':nb_mail_sent', $nb_mail_sent);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
}
|
||||||
|
// Time Stop
|
||||||
|
$timeend=microtime(true);
|
||||||
|
$time=$timeend-$timestart;
|
||||||
|
|
||||||
|
//Exec Time
|
||||||
|
$page_load_time = number_format($time, 3);
|
||||||
|
echo "Start : ".date("H:i:s", $timestart);
|
||||||
|
echo "<br>Stop: ".date("H:i:s", $timeend);
|
||||||
|
echo "<br>Script execute en " . $page_load_time . " sec";
|
||||||
|
header('Location: ../index.php?$sent=true&$nbs='.$nbs.'&$nbl='.$nbl.'&$plt='.$page_load_time);
|
||||||
|
} else {echo '<p>Aucune données ?</p>';}
|
||||||
|
} else {
|
||||||
|
// On envoie les mails par paquet de 75
|
||||||
|
$query = $bdd->prepare("SELECT * FROM clients WHERE vote = 0 AND mailed = ? LIMIT 75");
|
||||||
|
$query->execute(array($_SESSION['nb_mail_sent']));
|
||||||
|
// Si tout le monde n'a pas voté, on balance les mails
|
||||||
|
$nbs = $query->rowCount();
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
// On utilise PHPMailer
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
$mail = new PHPMailer;
|
||||||
|
$mail->isSMTP();
|
||||||
|
$mail->CharSet = "UTF-8";
|
||||||
|
//Enable SMTP debugging
|
||||||
|
// 0 = off (for production use)
|
||||||
|
// 1 = client messages
|
||||||
|
// 2 = client and server messages
|
||||||
|
//$mail->SMTPDebug = 2;
|
||||||
|
//Ask for HTML-friendly debug output
|
||||||
|
//$mail->Debugoutput = 'html';
|
||||||
|
// To load the French version
|
||||||
|
$mail->setLanguage('fr', 'PHPMailer/language/');
|
||||||
|
$mail->Host = 'smtp.ouvaton.coop';
|
||||||
|
$mail->SMTPAuth = true;
|
||||||
|
$mail->SMTPKeepAlive = true;
|
||||||
|
$mail->Username = '';
|
||||||
|
$mail->Password = '';
|
||||||
|
$mail->SMTPSecure = 'tls';
|
||||||
|
$mail->Port = 587;
|
||||||
|
|
||||||
|
$mail->From = '';
|
||||||
|
$mail->FromName = 'Ouvaton.coop AG 2019';
|
||||||
|
$mail->addAddress($results->email);
|
||||||
|
$mail->addReplyTo('');
|
||||||
|
|
||||||
|
$mail->isHTML(true);
|
||||||
|
$mail->Subject = 'Ouvaton AG 2019 : quelques minutes pour participer au vote';
|
||||||
|
|
||||||
|
// On prépare le contenu du mail
|
||||||
|
$body = "
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Ouvaton.coop AG 2019</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Cher Coopérateur/Chère Coopératrice,</p>
|
||||||
|
|
||||||
|
<p>Plus que quelques semaines pour voter et participer à notre AG 2019 !</p>
|
||||||
|
|
||||||
|
<p>Notre AG se déroulera le vendredi 29 juin 2019 au 187 montée de Choulans 69005 Lyon, à 13h.</p>
|
||||||
|
|
||||||
|
<p>Vous trouverez tous les documents relatifs à l'Assemblée Générale 2019 statuant sur l'exercice 2018 (documents comptables, rapports, candidatures) sur le site de la Coopérative en <a href=\"https://ouvaton.coop/la-cooperative/assemblees-generales/ag-2019/\">https://ouvaton.coop/la-cooperative/assemblees-generales/ag-2019/</a>.<br />
|
||||||
|
Ils peuvent être discutées sur <a href=\"https://forums.ouvaton.org\">les forums Ouvaton</a>.</p>
|
||||||
|
|
||||||
|
<p>Le formulaire de vote en ligne de notre Assemblée Générale est disponible sur <a href=\"https://ag.ouvaton.coop\">https://ag.ouvaton.coop</a>.</p>
|
||||||
|
|
||||||
|
<p>Il est accessible dès maintenant et le restera jusqu'au jour de l'Assemblée Générale à 15h.<br />
|
||||||
|
Nous attirons votre attention sur le fait que vous ne pourrez pas corriger votre vote une fois que vous l'aurez émis.</p>
|
||||||
|
|
||||||
|
<p><strong>Voici les instructions pour voter :</strong></p>
|
||||||
|
|
||||||
|
<p>Quand elles vous seront demandées saisissez les informations suivantes :</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Numéro de coopérateur : ".$results->reference."</li>
|
||||||
|
<li>Mot de passe : ".$results->password."</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p><strong>Le vote se déroule en 4 étapes :</strong></p>
|
||||||
|
|
||||||
|
<p>1. Vous devez vous identifier en utilisant votre numéro de coopérateur et le code d'accès donné ci-dessus.</p>
|
||||||
|
|
||||||
|
<p>2. Vous devez compléter le questionnaire avec vos choix.</p>
|
||||||
|
|
||||||
|
<p>3. Vos choix seront affichés, et il vous sera demandé de les confirmer, ou de retourner à l'étape précédente si vous souhaitez modifier votre vote.</p>
|
||||||
|
|
||||||
|
<p>4. Après avoir confirmé vos choix, une clé de contrôle unique vous sera donnée, qui vous permettra de vérifier que votre réponse a été correctement enregistrée. Pour assurer l'anonymat, aucun lien ne sera conservé entre cette clé et vos identifiants d'accès, gardez donc précieusement cette clé. Une fois que vous aurez voté, vous ne pourrez plus le faire à nouveau.</p>
|
||||||
|
|
||||||
|
<p>Merci par avance pour votre participation à ce vote électronique.</p>
|
||||||
|
|
||||||
|
<p>Coopérativement,<br />
|
||||||
|
Le Président du Directoire</p>
|
||||||
|
<p>Ouvaton Coopérative SA à directoire et conseil de surveillance à capital variable Siège Social 16 bis rue d’Odessa 75014 PARIS R.C.S. Paris 438 168 718</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
";
|
||||||
|
$mail->msgHTML($body);
|
||||||
|
if ($mail->send()) {
|
||||||
|
// On fait le ménage dans PHPMailer avant la prochaine boucle
|
||||||
|
$mail->clearAddresses();
|
||||||
|
$mail->clearAttachments();
|
||||||
|
|
||||||
|
// On marque que le mail est envoyé pour ce coopérateur
|
||||||
|
$sql ="
|
||||||
|
UPDATE clients
|
||||||
|
SET mailed = :new_nb_mail_sent
|
||||||
|
WHERE reference = :reference
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':reference', $results->reference);
|
||||||
|
$stmt->bindParam(':new_nb_mail_sent', $new_nb_mail_sent);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
} else {echo 'Mailer Error: ' . $mail->ErrorInfo . '<br />';}
|
||||||
|
}
|
||||||
|
|
||||||
|
// On regarde combien de coopérateurs n'ont pas encore de mails
|
||||||
|
$sql = "SELECT COUNT(*) FROM clients WHERE vote = 0 AND mailed = :nb_mail_sent";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':nb_mail_sent', $_SESSION['nb_mail_sent']);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$nbl = $results[0];
|
||||||
|
|
||||||
|
// On actualise la date et on incrémente le compteur
|
||||||
|
if ($nbl == 0) {
|
||||||
|
$nb_mail_sent = $_SESSION['nb_mail_sent']+1;
|
||||||
|
$sql ="
|
||||||
|
UPDATE admin SET option_value =
|
||||||
|
CASE
|
||||||
|
WHEN option_id = 2 THEN :last_mail_sent
|
||||||
|
WHEN option_id = 3 THEN :nb_mail_sent
|
||||||
|
ELSE option_value
|
||||||
|
END
|
||||||
|
WHERE option_id IN (2,3)
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':last_mail_sent', date("Y-m-d H:i:s"));
|
||||||
|
$stmt->bindParam(':nb_mail_sent', $nb_mail_sent);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
}
|
||||||
|
//Clore la requête
|
||||||
|
$stmt = null;
|
||||||
|
|
||||||
|
// Time Stop
|
||||||
|
$timeend=microtime(true);
|
||||||
|
$time=$timeend-$timestart;
|
||||||
|
|
||||||
|
//Exec Time
|
||||||
|
$page_load_time = number_format($time, 3);
|
||||||
|
echo "Start : ".date("H:i:s", $timestart);
|
||||||
|
echo "<br>Stop: ".date("H:i:s", $timeend);
|
||||||
|
echo "<br>Script execute en " . $page_load_time . " sec";
|
||||||
|
header('Location: ../index.php?$sent=true&$nbs='.$nbs.'&$nbl='.$nbl.'&$plt='.$page_load_time);
|
||||||
|
} else {echo '<p>Aucune données !!</p>';}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration attributes of the chart.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class ChartConfig {
|
||||||
|
/**
|
||||||
|
* Use several colors for a single data set chart (as if it was a multiple data set).
|
||||||
|
*
|
||||||
|
* @var Boolean
|
||||||
|
*/
|
||||||
|
private $useMultipleColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show caption on individual data points.
|
||||||
|
*
|
||||||
|
* @var Boolean
|
||||||
|
*/
|
||||||
|
private $showPointCaption;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort data points (only pie charts).
|
||||||
|
*
|
||||||
|
* @var Boolean
|
||||||
|
*/
|
||||||
|
private $sortDataPoint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new ChartConfig with default options.
|
||||||
|
*/
|
||||||
|
public function ChartConfig() {
|
||||||
|
$this->useMultipleColor = false;
|
||||||
|
$this->showPointCaption = true;
|
||||||
|
$this->sortDataPoint = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true the chart will use several colors for a single data set chart
|
||||||
|
* (as if it was a multiple data set).
|
||||||
|
*
|
||||||
|
* @param $useMultipleColor Use several colors : boolean
|
||||||
|
*/
|
||||||
|
public function setUseMultipleColor($useMultipleColor) {
|
||||||
|
$this->useMultipleColor = $useMultipleColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true the chart will use several colors for a single data set chart
|
||||||
|
* (as if it was a multiple data set).
|
||||||
|
*
|
||||||
|
* @return $useMultipleColor Use several colors : boolean
|
||||||
|
*/
|
||||||
|
public function getUseMultipleColor() {
|
||||||
|
return $this->useMultipleColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the option to show caption on individual data points.
|
||||||
|
*
|
||||||
|
* @param $showPointCaption Show caption on individual data points : boolean
|
||||||
|
*/
|
||||||
|
public function setShowPointCaption($showPointCaption) {
|
||||||
|
$this->showPointCaption = $showPointCaption;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the option to show caption on individual data points.
|
||||||
|
*
|
||||||
|
* @return Show caption on individual data points : boolean
|
||||||
|
*/
|
||||||
|
public function getShowPointCaption() {
|
||||||
|
return $this->showPointCaption;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the option to sort data points (only pie charts).
|
||||||
|
*
|
||||||
|
* @param $sortDataPoint Sort data points : boolean
|
||||||
|
*/
|
||||||
|
public function setSortDataPoint($sortDataPoint) {
|
||||||
|
$this->sortDataPoint = $sortDataPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the option to sort data points (only pie charts).
|
||||||
|
*
|
||||||
|
* @return Sort data points : boolean
|
||||||
|
*/
|
||||||
|
public function getSortDataPoint() {
|
||||||
|
return $this->sortDataPoint;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Superclass of all data sets.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 10 may 2007
|
||||||
|
*/
|
||||||
|
abstract class DataSet {
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Point of coordinates (X,Y).
|
||||||
|
* The value of X isn't really of interest, but X is used as a label to display on the horizontal axis.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class Point {
|
||||||
|
private $x;
|
||||||
|
private $y;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new sampling point of coordinates (x, y)
|
||||||
|
*
|
||||||
|
* @param integer x coordinate (label)
|
||||||
|
* @param integer y coordinate (value)
|
||||||
|
*/
|
||||||
|
public function Point($x, $y) {
|
||||||
|
$this->x = $x;
|
||||||
|
$this->y = $y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the x coordinate (label).
|
||||||
|
*
|
||||||
|
* @return integer x coordinate (label)
|
||||||
|
*/
|
||||||
|
public function getX() {
|
||||||
|
return $this->x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the y coordinate (value).
|
||||||
|
*
|
||||||
|
* @return integer y coordinate (value)
|
||||||
|
*/
|
||||||
|
public function getY() {
|
||||||
|
return $this->y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set of data in the form of (x, y) items.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 10 may 2007
|
||||||
|
*/
|
||||||
|
class XYDataSet extends DataSet {
|
||||||
|
private $pointList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of XYDataSet.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function XYDataSet() {
|
||||||
|
$this->pointList = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new point to the dataset.
|
||||||
|
*
|
||||||
|
* @param Point Point to add to the dataset
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function addPoint($point) {
|
||||||
|
array_push($this->pointList, $point);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter of pointList.
|
||||||
|
*
|
||||||
|
* @return List of points.
|
||||||
|
*/
|
||||||
|
public function getPointList() {
|
||||||
|
return $this->pointList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This dataset comprises several series of points and is used to plot multiple lines charts.
|
||||||
|
* Each serie is a XYDataSet.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 20 july 2007
|
||||||
|
*/
|
||||||
|
class XYSeriesDataSet extends DataSet {
|
||||||
|
/**
|
||||||
|
* List of titles
|
||||||
|
*/
|
||||||
|
private $titleList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of XYDataSet.
|
||||||
|
*/
|
||||||
|
private $serieList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of XYSeriesDataSet.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function XYSeriesDataSet() {
|
||||||
|
$this->titleList = array();
|
||||||
|
$this->serieList = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new serie to the dataset.
|
||||||
|
*
|
||||||
|
* @param string Title (label) of the serie.
|
||||||
|
* @param XYDataSet Serie of points to add
|
||||||
|
*/
|
||||||
|
public function addSerie($title, $serie) {
|
||||||
|
array_push($this->titleList, $title);
|
||||||
|
array_push($this->serieList, $serie);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter of titleList.
|
||||||
|
*
|
||||||
|
* @return List of titles.
|
||||||
|
*/
|
||||||
|
public function getTitleList() {
|
||||||
|
return $this->titleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter of serieList.
|
||||||
|
*
|
||||||
|
* @return List of series.
|
||||||
|
*/
|
||||||
|
public function getSerieList() {
|
||||||
|
return $this->serieList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
// On prolonge la session
|
||||||
|
session_start();
|
||||||
|
// On teste si la variable de session existe et contient une valeur
|
||||||
|
if(empty($_SESSION['login']))
|
||||||
|
{
|
||||||
|
// Si inexistante ou nulle, on redirige vers le formulaire de login
|
||||||
|
header('Location: auth.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$errorMessage = '';
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
// On teste si la variable de session existe et contient une valeur
|
||||||
|
if(empty($_SESSION['login']))
|
||||||
|
{
|
||||||
|
// Si inexistante ou nulle, on redirige vers le formulaire de login
|
||||||
|
header('Location: ../auth.php');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
include("config.inc.php");
|
||||||
|
include("connect.inc.php");
|
||||||
|
include("fonctions.inc.php");
|
||||||
|
// On donne comme valeur NULL à tous les mots de passe
|
||||||
|
$sql ="UPDATE clients SET password = NULL";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
// On enregistre que les mots de passe ne sont pas générés
|
||||||
|
$sql ="UPDATE admin SET option_value = 0 WHERE option_id = 9";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
//Clore la requête
|
||||||
|
$stmt = null;
|
||||||
|
header('Location: ../index.php?$ungenerate=true');
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Automatic axis boundaries and ticks calibration
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class Axis {
|
||||||
|
private $min;
|
||||||
|
private $max;
|
||||||
|
private $guide;
|
||||||
|
private $delta;
|
||||||
|
private $magnitude;
|
||||||
|
private $displayMin;
|
||||||
|
private $displayMax;
|
||||||
|
private $tics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new axis formatter.
|
||||||
|
*
|
||||||
|
* @param integer minimum value on the axis
|
||||||
|
* @param integer maximum value on the axis
|
||||||
|
*/
|
||||||
|
public function Axis($min, $max) {
|
||||||
|
$this->min = $min;
|
||||||
|
$this->max = $max;
|
||||||
|
|
||||||
|
$this->guide = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes value between two ticks.
|
||||||
|
*/
|
||||||
|
public function quantizeTics() {
|
||||||
|
// Approximate number of decades, in [1..10[
|
||||||
|
$norm = $this->delta / $this->magnitude;
|
||||||
|
|
||||||
|
// Approximate number of tics per decade
|
||||||
|
$posns = $this->guide / $norm;
|
||||||
|
|
||||||
|
if ($posns > 20) {
|
||||||
|
$tics = 0.05; // e.g. 0, .05, .10, ...
|
||||||
|
} else if ($posns > 10) {
|
||||||
|
$tics = 0.2; // e.g. 0, .1, .2, ...
|
||||||
|
} else if ($posns > 5) {
|
||||||
|
$tics = 0.4; // e.g. 0, 0.2, 0.4, ...
|
||||||
|
} else if ($posns > 3) {
|
||||||
|
$tics = 0.5; // e.g. 0, 0.5, 1, ...
|
||||||
|
} else if ($posns > 2) {
|
||||||
|
$tics = 1; // e.g. 0, 1, 2, ...
|
||||||
|
} else if ($posns > 0.25) {
|
||||||
|
$tics = 2; // e.g. 0, 2, 4, 6
|
||||||
|
} else {
|
||||||
|
$tics = ceil($norm);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->tics = $tics * $this->magnitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes automatic boundaries on the axis
|
||||||
|
*/
|
||||||
|
public function computeBoundaries() {
|
||||||
|
// Range
|
||||||
|
$this->delta = abs($this->max - $this->min);
|
||||||
|
|
||||||
|
// Check for null distribution
|
||||||
|
if ($this->delta == 0)
|
||||||
|
$this->delta = 1;
|
||||||
|
|
||||||
|
// Order of magnitude of range
|
||||||
|
$this->magnitude = pow(10, floor(log10($this->delta)));
|
||||||
|
|
||||||
|
$this->quantizeTics();
|
||||||
|
|
||||||
|
$this->displayMin = floor($this->min / $this->tics) * $this->tics;
|
||||||
|
$this->displayMax = ceil($this->max / $this->tics) * $this->tics;
|
||||||
|
$this->displayDelta = $this->displayMax - $this->displayMin;
|
||||||
|
|
||||||
|
// Check for null distribution
|
||||||
|
if ($this->displayDelta == 0) {
|
||||||
|
$this->displayDelta = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the lower boundary on the axis3
|
||||||
|
*
|
||||||
|
* @return integer lower boundary on the axis
|
||||||
|
*/
|
||||||
|
public function getLowerBoundary() {
|
||||||
|
return $this->displayMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the upper boundary on the axis3
|
||||||
|
*
|
||||||
|
* @return integer upper boundary on the axis
|
||||||
|
*/
|
||||||
|
public function getUpperBoundary() {
|
||||||
|
return $this->displayMax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value between two ticks3
|
||||||
|
*
|
||||||
|
* @return integer value between two ticks
|
||||||
|
*/
|
||||||
|
public function getTics() {
|
||||||
|
return $this->tics;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,156 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object representing the bounds of a dataset (its minimal and maximal values) on its vertical axis.
|
||||||
|
* The bounds are automatically calculated from a XYDataSet or XYSeriesDataSet.
|
||||||
|
* Default (calculated) bounds can be overriden using the setLowerBound() and setUpperBound() methods.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 25 july 2007
|
||||||
|
*/
|
||||||
|
class Bound {
|
||||||
|
/**
|
||||||
|
* Manually set lower bound, overrides the value calculated by computeBound().
|
||||||
|
*/
|
||||||
|
private $lowerBound = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manually set upper bound, overrides the value calculated by computeBound().
|
||||||
|
*/
|
||||||
|
private $upperBound = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computed min bound.
|
||||||
|
*/
|
||||||
|
private $yMinValue = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computed max bound.
|
||||||
|
*/
|
||||||
|
private $yMaxValue = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the boundaries on the axis.
|
||||||
|
*
|
||||||
|
* @param dataSet The data set
|
||||||
|
*/
|
||||||
|
public function computeBound($dataSet) {
|
||||||
|
// Check if the data set is empty
|
||||||
|
$dataSetEmpty = true;
|
||||||
|
$serieList = null;
|
||||||
|
if ($dataSet instanceof XYDataSet) {
|
||||||
|
$pointList = $dataSet->getPointList();
|
||||||
|
$dataSetEmpty = count($pointList) == 0;
|
||||||
|
|
||||||
|
if (!$dataSetEmpty) {
|
||||||
|
// Process it as a serie
|
||||||
|
$serieList = array();
|
||||||
|
array_push($serieList, $dataSet);
|
||||||
|
}
|
||||||
|
} else if ($dataSet instanceof XYSeriesDataSet) {
|
||||||
|
$serieList = $dataSet->getSerieList();
|
||||||
|
if (count($serieList) > 0) {
|
||||||
|
$serie = current($serieList);
|
||||||
|
$dataSetEmpty = count($serie) == 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
die("Error: unknown dataset type");
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the dataset is empty, default some bounds
|
||||||
|
$yMin = 0;
|
||||||
|
$yMax = 1;
|
||||||
|
if (!$dataSetEmpty) {
|
||||||
|
// Compute lower and upper bound on the value axis
|
||||||
|
unset($yMin);
|
||||||
|
unset($yMax);
|
||||||
|
|
||||||
|
foreach ($serieList as $serie) {
|
||||||
|
foreach ($serie->getPointList() as $point) {
|
||||||
|
$y = $point->getY();
|
||||||
|
|
||||||
|
if (!isset($yMin)) {
|
||||||
|
$yMin = $y;
|
||||||
|
$yMax = $y;
|
||||||
|
} else {
|
||||||
|
if ($y < $yMin) {
|
||||||
|
$yMin = $y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($y > $yMax) {
|
||||||
|
$yMax = $y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If user specified bounds and they are actually greater than computer bounds, override computed bounds
|
||||||
|
if (isset($this->lowerBound) && $this->lowerBound < $yMin) {
|
||||||
|
$this->yMinValue = $this->lowerBound;
|
||||||
|
} else {
|
||||||
|
$this->yMinValue = $yMin;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->upperBound) && $this->upperBound > $yMax) {
|
||||||
|
$this->yMaxValue = $this->upperBound;
|
||||||
|
} else {
|
||||||
|
$this->yMaxValue = $yMax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter of yMinValue.
|
||||||
|
*
|
||||||
|
* @return min bound
|
||||||
|
*/
|
||||||
|
public function getYMinValue() {
|
||||||
|
return $this->yMinValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Getter of yMaxValue.
|
||||||
|
*
|
||||||
|
* @return max bound
|
||||||
|
*/
|
||||||
|
public function getYMaxValue() {
|
||||||
|
return $this->yMaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set manually the lower boundary value (overrides the automatic formatting).
|
||||||
|
* Typical usage is to set the bars starting from zero.
|
||||||
|
*
|
||||||
|
* @param double lower boundary value
|
||||||
|
*/
|
||||||
|
public function setLowerBound($lowerBound) {
|
||||||
|
$this->lowerBound = $lowerBound;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set manually the upper boundary value (overrides the automatic formatting).
|
||||||
|
*
|
||||||
|
* @param double upper boundary value
|
||||||
|
*/
|
||||||
|
public function setUpperBound($upperBound) {
|
||||||
|
$this->upperBound = $upperBound;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Caption.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 30 july 2007
|
||||||
|
*/
|
||||||
|
class Caption {
|
||||||
|
protected $labelBoxWidth;
|
||||||
|
protected $labelBoxHeight;
|
||||||
|
|
||||||
|
// Plot
|
||||||
|
protected $plot;
|
||||||
|
|
||||||
|
// Label list
|
||||||
|
protected $labelList;
|
||||||
|
|
||||||
|
// Color set
|
||||||
|
protected $colorSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of Caption
|
||||||
|
*/
|
||||||
|
public function Caption() {
|
||||||
|
$this->labelBoxWidth = 15;
|
||||||
|
$this->labelBoxHeight = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the caption.
|
||||||
|
*/
|
||||||
|
public function render() {
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
$primitive = $this->plot->getPrimitive();
|
||||||
|
|
||||||
|
// Get the caption area
|
||||||
|
$captionArea = $this->plot->getCaptionArea();
|
||||||
|
|
||||||
|
// Get the pie color set
|
||||||
|
$colorSet = $this->colorSet;
|
||||||
|
$colorSet->reset();
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
foreach ($this->labelList as $label) {
|
||||||
|
// Get the next color
|
||||||
|
$color = $colorSet->currentColor();
|
||||||
|
$colorSet->next();
|
||||||
|
|
||||||
|
$boxX1 = $captionArea->x1;
|
||||||
|
$boxX2 = $boxX1 + $this->labelBoxWidth;
|
||||||
|
$boxY1 = $captionArea->y1 + 5 + $i * ($this->labelBoxHeight + 5);
|
||||||
|
$boxY2 = $boxY1 + $this->labelBoxHeight;
|
||||||
|
|
||||||
|
$primitive->outlinedBox($boxX1, $boxY1, $boxX2, $boxY2, $palette->axisColor[0], $palette->axisColor[1]);
|
||||||
|
imagefilledrectangle($img, $boxX1 + 2, $boxY1 + 2, $boxX2 - 2, $boxY2 - 2, $color->getColor($img));
|
||||||
|
|
||||||
|
$text->printText($img, $boxX2 + 5, $boxY1 + $this->labelBoxHeight / 2, $this->plot->getTextColor(), $label, $text->fontCondensed, $text->VERTICAL_CENTER_ALIGN);
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the plot.
|
||||||
|
*
|
||||||
|
* @param Plot The plot
|
||||||
|
*/
|
||||||
|
public function setPlot($plot) {
|
||||||
|
$this->plot = $plot;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the label list.
|
||||||
|
*
|
||||||
|
* @param Array label list
|
||||||
|
*/
|
||||||
|
public function setLabelList($labelList) {
|
||||||
|
$this->labelList = $labelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the color set.
|
||||||
|
*
|
||||||
|
* @param Array Color set
|
||||||
|
*/
|
||||||
|
public function setColorSet($colorSet) {
|
||||||
|
$this->colorSet = $colorSet;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,183 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base abstract class for rendering both horizontal and vertical bar charts.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
abstract class BarChart extends Chart {
|
||||||
|
protected $bound;
|
||||||
|
protected $axis;
|
||||||
|
protected $hasSeveralSerie;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new bar chart.
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
protected function BarChart($width, $height) {
|
||||||
|
parent::Chart($width, $height);
|
||||||
|
|
||||||
|
// Initialize the bounds
|
||||||
|
$this->bound = new Bound();
|
||||||
|
$this->bound->setLowerBound(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the axis.
|
||||||
|
*/
|
||||||
|
protected function computeAxis() {
|
||||||
|
$this->axis = new Axis($this->bound->getYMinValue(), $this->bound->getYMaxValue());
|
||||||
|
$this->axis->computeBoundaries();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the image.
|
||||||
|
*/
|
||||||
|
protected function createImage() {
|
||||||
|
parent::createImage();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
$primitive = $this->plot->getPrimitive();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Aqua-like background
|
||||||
|
for ($i = $graphArea->y1; $i < $graphArea->y2; $i++) {
|
||||||
|
$color = $palette->backgroundColor[($i + 3) % 4];
|
||||||
|
$primitive->line($graphArea->x1, $i, $graphArea->x2, $i, $color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Axis
|
||||||
|
imagerectangle($img, $graphArea->x1 - 1, $graphArea->y1, $graphArea->x1, $graphArea->y2, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $graphArea->x1 - 1, $graphArea->y2, $graphArea->x2, $graphArea->y2 + 1, $palette->axisColor[0]->getColor($img));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the data set has some data.
|
||||||
|
* @param minNumberOfPoint Minimum number of points (1 for bars, 2 for lines).
|
||||||
|
*
|
||||||
|
* @return true if data set empty
|
||||||
|
*/
|
||||||
|
protected function isEmptyDataSet($minNumberOfPoint) {
|
||||||
|
if ($this->dataSet instanceof XYDataSet) {
|
||||||
|
$pointList = $this->dataSet->getPointList();
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
return $pointCount < $minNumberOfPoint;
|
||||||
|
} else if ($this->dataSet instanceof XYSeriesDataSet) {
|
||||||
|
$serieList = $this->dataSet->getSerieList();
|
||||||
|
reset($serieList);
|
||||||
|
if (count($serieList) > 0) {
|
||||||
|
$serie = current($serieList);
|
||||||
|
$pointList = $serie->getPointList();
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
return $pointCount < $minNumberOfPoint;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
die("Error: unknown dataset type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the data model before rendering the graph.
|
||||||
|
*/
|
||||||
|
protected function checkDataModel() {
|
||||||
|
// Check if a dataset was defined
|
||||||
|
if (!$this->dataSet) {
|
||||||
|
die("Error: No dataset defined.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bar charts accept both XYDataSet and XYSeriesDataSet
|
||||||
|
if ($this->dataSet instanceof XYDataSet) {
|
||||||
|
// The dataset contains only one serie
|
||||||
|
$this->hasSeveralSerie = false;
|
||||||
|
} else if ($this->dataSet instanceof XYSeriesDataSet) {
|
||||||
|
// Check if each series has the same number of points
|
||||||
|
unset($lastPointCount);
|
||||||
|
$serieList = $this->dataSet->getSerieList();
|
||||||
|
for ($i = 0; $i < count($serieList); $i++) {
|
||||||
|
$serie = $serieList[$i];
|
||||||
|
$pointCount = count($serie->getPointList());
|
||||||
|
if (isset($lastPointCount) && $pointCount != $lastPointCount) {
|
||||||
|
die("Error: serie <" . $i . "> doesn't have the same number of points as last serie (last one: <" . $lastPointCount. ">, this one: <" . $pointCount. ">).");
|
||||||
|
}
|
||||||
|
$lastPointCount = $pointCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The dataset contains several series
|
||||||
|
$this->hasSeveralSerie = true;
|
||||||
|
} else {
|
||||||
|
die("Error: Bar chart accept only XYDataSet and XYSeriesDataSet");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the data as a series list (for consistency).
|
||||||
|
*
|
||||||
|
* @return List of series
|
||||||
|
*/
|
||||||
|
protected function getDataAsSerieList() {
|
||||||
|
// Get the data as a series list
|
||||||
|
$serieList = null;
|
||||||
|
if ($this->dataSet instanceof XYSeriesDataSet) {
|
||||||
|
$serieList = $this->dataSet->getSerieList();
|
||||||
|
} else if ($this->dataSet instanceof XYDataSet) {
|
||||||
|
$serieList = array();
|
||||||
|
array_push($serieList, $this->dataSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $serieList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the first serie of the list, or the dataSet itself if there is no serie.
|
||||||
|
*
|
||||||
|
* @return XYDataSet
|
||||||
|
*/
|
||||||
|
protected function getFirstSerieOfList() {
|
||||||
|
$pointList = null;
|
||||||
|
if ($this->dataSet instanceof XYSeriesDataSet) {
|
||||||
|
// For a series dataset, print the legend from the first serie
|
||||||
|
$serieList = $this->dataSet->getSerieList();
|
||||||
|
reset($serieList);
|
||||||
|
$serie = current($serieList);
|
||||||
|
$pointList = $serie->getPointList();
|
||||||
|
} else if ($this->dataSet instanceof XYDataSet) {
|
||||||
|
$pointList = $this->dataSet->getPointList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $pointList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourns the bound.
|
||||||
|
*
|
||||||
|
* @return bound Bound
|
||||||
|
*/
|
||||||
|
public function getBound() {
|
||||||
|
return $this->bound;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! \mainpage Libchart
|
||||||
|
*
|
||||||
|
* This is the reference API, automatically compiled by <a href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</a>.
|
||||||
|
* You can find here information that is not covered by the <a href="../samplecode/">tutorial</a>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base chart class.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
abstract class Chart {
|
||||||
|
/**
|
||||||
|
* The chart configuration.
|
||||||
|
*/
|
||||||
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The data set.
|
||||||
|
*/
|
||||||
|
protected $dataSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plot (holds graphical attributes).
|
||||||
|
*/
|
||||||
|
protected $plot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract constructor of Chart.
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
protected function Chart($width, $height) {
|
||||||
|
// Initialize the configuration
|
||||||
|
$this->config = new ChartConfig();
|
||||||
|
|
||||||
|
// Creates the plot
|
||||||
|
$this->plot = new Plot($width, $height);
|
||||||
|
$this->plot->setTitle("Untitled chart");
|
||||||
|
$this->plot->setLogoFileName(dirname(__FILE__) . "/../../../images/PoweredBy.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the data model before rendering the graph.
|
||||||
|
*/
|
||||||
|
protected function checkDataModel() {
|
||||||
|
// Check if a dataset was defined
|
||||||
|
if (!$this->dataSet) {
|
||||||
|
die("Error: No dataset defined.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Maybe no points are defined, but that's ok. This will yield and empty graph with default boundaries.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the image.
|
||||||
|
*/
|
||||||
|
protected function createImage() {
|
||||||
|
$this->plot->createImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the data set.
|
||||||
|
*
|
||||||
|
* @param dataSet The data set
|
||||||
|
*/
|
||||||
|
public function setDataSet($dataSet) {
|
||||||
|
$this->dataSet = $dataSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the chart configuration.
|
||||||
|
*
|
||||||
|
* @return configuration : ChartConfig
|
||||||
|
*/
|
||||||
|
public function getConfig() {
|
||||||
|
return $this->config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the plot.
|
||||||
|
*
|
||||||
|
* @return plot
|
||||||
|
*/
|
||||||
|
public function getPlot() {
|
||||||
|
return $this->plot;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the title.
|
||||||
|
*
|
||||||
|
* @param string New title
|
||||||
|
*/
|
||||||
|
public function setTitle($title) {
|
||||||
|
$this->plot->setTitle($title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Horizontal bar chart
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class HorizontalBarChart extends BarChart {
|
||||||
|
/**
|
||||||
|
* Ratio of empty space beside the bars.
|
||||||
|
*/
|
||||||
|
private $emptyToFullRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new horizontal bar chart.
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
public function HorizontalBarChart($width = 600, $height = 250) {
|
||||||
|
parent::BarChart($width, $height);
|
||||||
|
|
||||||
|
$this->emptyToFullRatio = 1 / 5;
|
||||||
|
$this->plot->setGraphPadding(new Padding(5, 30, 30, 50));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the layout.
|
||||||
|
*/
|
||||||
|
protected function computeLayout() {
|
||||||
|
if ($this->hasSeveralSerie) {
|
||||||
|
$this->plot->setHasCaption(true);
|
||||||
|
}
|
||||||
|
$this->plot->computeLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the axis.
|
||||||
|
*/
|
||||||
|
protected function printAxis() {
|
||||||
|
$minValue = $this->axis->getLowerBoundary();
|
||||||
|
$maxValue = $this->axis->getUpperBoundary();
|
||||||
|
$stepValue = $this->axis->getTics();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Horizontal axis
|
||||||
|
for ($value = $minValue; $value <= $maxValue; $value += $stepValue) {
|
||||||
|
$x = $graphArea->x1 + ($value - $minValue) * ($graphArea->x2 - $graphArea->x1) / ($this->axis->displayDelta);
|
||||||
|
|
||||||
|
imagerectangle($img, $x - 1, $graphArea->y2 + 2, $x, $graphArea->y2 + 3, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $x - 1, $graphArea->y2, $x, $graphArea->y2 + 1, $palette->axisColor[1]->getColor($img));
|
||||||
|
|
||||||
|
$text->printText($img, $x, $graphArea->y2 + 5, $this->plot->getTextColor(), $value, $text->fontCondensed, $text->HORIZONTAL_CENTER_ALIGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get first serie of a list
|
||||||
|
$pointList = $this->getFirstSerieOfList();
|
||||||
|
|
||||||
|
// Vertical Axis
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
reset($pointList);
|
||||||
|
$rowHeight = ($graphArea->y2 - $graphArea->y1) / $pointCount;
|
||||||
|
reset($pointList);
|
||||||
|
for ($i = 0; $i <= $pointCount; $i++) {
|
||||||
|
$y = $graphArea->y2 - $i * $rowHeight;
|
||||||
|
|
||||||
|
imagerectangle($img, $graphArea->x1 - 3, $y, $graphArea->x1 - 2, $y + 1, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $graphArea->x1 - 1, $y, $graphArea->x1, $y + 1, $palette->axisColor[1]->getColor($img));
|
||||||
|
|
||||||
|
if ($i < $pointCount) {
|
||||||
|
$point = current($pointList);
|
||||||
|
next($pointList);
|
||||||
|
|
||||||
|
$label = $point->getX();
|
||||||
|
|
||||||
|
$text->printText($img, $graphArea->x1 - 5, $y - $rowHeight / 2, $this->plot->getTextColor(), $label, $text->fontCondensed, $text->HORIZONTAL_RIGHT_ALIGN | $text->VERTICAL_CENTER_ALIGN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the bars.
|
||||||
|
*/
|
||||||
|
protected function printBar() {
|
||||||
|
// Get the data as a list of series for consistency
|
||||||
|
$serieList = $this->getDataAsSerieList();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
$minValue = $this->axis->getLowerBoundary();
|
||||||
|
$maxValue = $this->axis->getUpperBoundary();
|
||||||
|
$stepValue = $this->axis->getTics();
|
||||||
|
|
||||||
|
// Start from the first color for the first serie
|
||||||
|
$barColorSet = $palette->barColorSet;
|
||||||
|
$barColorSet->reset();
|
||||||
|
|
||||||
|
$serieCount = count($serieList);
|
||||||
|
for ($j = 0; $j < $serieCount; $j++) {
|
||||||
|
$serie = $serieList[$j];
|
||||||
|
$pointList = $serie->getPointList();
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
reset($pointList);
|
||||||
|
|
||||||
|
// Select the next color for the next serie
|
||||||
|
if (!$this->config->getUseMultipleColor()) {
|
||||||
|
$color = $barColorSet->currentColor();
|
||||||
|
$shadowColor = $barColorSet->currentShadowColor();
|
||||||
|
$barColorSet->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
$rowHeight = ($graphArea->y2 - $graphArea->y1) / $pointCount;
|
||||||
|
for ($i = 0; $i < $pointCount; $i++) {
|
||||||
|
$y = $graphArea->y2 - $i * $rowHeight;
|
||||||
|
|
||||||
|
$point = current($pointList);
|
||||||
|
next($pointList);
|
||||||
|
|
||||||
|
$value = $point->getY();
|
||||||
|
|
||||||
|
$xmax = $graphArea->x1 + ($value - $minValue) * ($graphArea->x2 - $graphArea->x1) / ($this->axis->displayDelta);
|
||||||
|
|
||||||
|
// Bar dimensions
|
||||||
|
$yWithMargin = $y - $rowHeight * $this->emptyToFullRatio;
|
||||||
|
$rowWidthWithMargin = $rowHeight * (1 - $this->emptyToFullRatio * 2);
|
||||||
|
$barWidth = $rowWidthWithMargin / $serieCount;
|
||||||
|
$barOffset = $barWidth * $j;
|
||||||
|
$y1 = $yWithMargin - $barWidth - $barOffset;
|
||||||
|
$y2 = $yWithMargin - $barOffset - 1;
|
||||||
|
|
||||||
|
// Select the next color for the next item in the serie
|
||||||
|
if ($this->config->getUseMultipleColor()) {
|
||||||
|
$color = $barColorSet->currentColor();
|
||||||
|
$shadowColor = $barColorSet->currentShadowColor();
|
||||||
|
$barColorSet->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw caption text on bar
|
||||||
|
if ($this->config->getShowPointCaption()) {
|
||||||
|
$text->printText($img, $xmax + 5, $y2 - $barWidth / 2, $this->plot->getTextColor(), $value, $text->fontCondensed, $text->VERTICAL_CENTER_ALIGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the horizontal bar
|
||||||
|
imagefilledrectangle($img, $graphArea->x1 + 1, $y1, $xmax, $y2, $shadowColor->getColor($img));
|
||||||
|
|
||||||
|
// Prevents drawing a small box when x = 0
|
||||||
|
if ($graphArea->x1 != $xmax) {
|
||||||
|
imagefilledrectangle($img, $graphArea->x1 + 2, $y1 + 1, $xmax - 4, $y2, $color->getColor($img));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the caption.
|
||||||
|
*/
|
||||||
|
protected function printCaption() {
|
||||||
|
// Get the list of labels
|
||||||
|
$labelList = $this->dataSet->getTitleList();
|
||||||
|
|
||||||
|
// Create the caption
|
||||||
|
$caption = new Caption();
|
||||||
|
$caption->setPlot($this->plot);
|
||||||
|
$caption->setLabelList($labelList);
|
||||||
|
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$barColorSet = $palette->barColorSet;
|
||||||
|
$caption->setColorSet($barColorSet);
|
||||||
|
|
||||||
|
// Render the caption
|
||||||
|
$caption->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the chart image.
|
||||||
|
*
|
||||||
|
* @param string name of the file to render the image to (optional)
|
||||||
|
*/
|
||||||
|
public function render($fileName = null) {
|
||||||
|
// Check the data model
|
||||||
|
$this->checkDataModel();
|
||||||
|
|
||||||
|
$this->bound->computeBound($this->dataSet);
|
||||||
|
$this->computeAxis();
|
||||||
|
$this->computeLayout();
|
||||||
|
$this->createImage();
|
||||||
|
$this->plot->printLogo();
|
||||||
|
$this->plot->printTitle();
|
||||||
|
if (!$this->isEmptyDataSet(1)) {
|
||||||
|
$this->printAxis();
|
||||||
|
$this->printBar();
|
||||||
|
if ($this->hasSeveralSerie) {
|
||||||
|
$this->printCaption();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->plot->render($fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,200 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Line chart.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class LineChart extends BarChart {
|
||||||
|
/**
|
||||||
|
* Creates a new line chart.
|
||||||
|
* Line charts allow for XYDataSet and XYSeriesDataSet in order to plot several lines.
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
public function LineChart($width = 600, $height = 250) {
|
||||||
|
parent::BarChart($width, $height);
|
||||||
|
|
||||||
|
$this->plot->setGraphPadding(new Padding(5, 30, 50, 50));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the layout.
|
||||||
|
*/
|
||||||
|
protected function computeLayout() {
|
||||||
|
if ($this->hasSeveralSerie) {
|
||||||
|
$this->plot->setHasCaption(true);
|
||||||
|
}
|
||||||
|
$this->plot->computeLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the axis.
|
||||||
|
*/
|
||||||
|
protected function printAxis() {
|
||||||
|
$minValue = $this->axis->getLowerBoundary();
|
||||||
|
$maxValue = $this->axis->getUpperBoundary();
|
||||||
|
$stepValue = $this->axis->getTics();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Vertical axis
|
||||||
|
for ($value = $minValue; $value <= $maxValue; $value += $stepValue) {
|
||||||
|
$y = $graphArea->y2 - ($value - $minValue) * ($graphArea->y2 - $graphArea->y1) / ($this->axis->displayDelta);
|
||||||
|
|
||||||
|
imagerectangle($img, $graphArea->x1 - 3, $y, $graphArea->x1 - 2, $y + 1, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $graphArea->x1 - 1, $y, $graphArea->x1, $y + 1, $palette->axisColor[1]->getColor($img));
|
||||||
|
|
||||||
|
$text->printText($img, $graphArea->x1 - 5, $y, $this->plot->getTextColor(), $value, $text->fontCondensed, $text->HORIZONTAL_RIGHT_ALIGN | $text->VERTICAL_CENTER_ALIGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get first serie of a list
|
||||||
|
$pointList = $this->getFirstSerieOfList();
|
||||||
|
|
||||||
|
// Horizontal Axis
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
reset($pointList);
|
||||||
|
$columnWidth = ($graphArea->x2 - $graphArea->x1) / ($pointCount - 1);
|
||||||
|
|
||||||
|
for ($i = 0; $i < $pointCount; $i++) {
|
||||||
|
$x = $graphArea->x1 + $i * $columnWidth;
|
||||||
|
|
||||||
|
imagerectangle($img, $x - 1, $graphArea->y2 + 2, $x, $graphArea->y2 + 3, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $x - 1, $graphArea->y2, $x, $graphArea->y2 + 1, $palette->axisColor[1]->getColor($img));
|
||||||
|
|
||||||
|
$point = current($pointList);
|
||||||
|
next($pointList);
|
||||||
|
|
||||||
|
$label = $point->getX();
|
||||||
|
|
||||||
|
$text->printDiagonal($img, $x - 5, $graphArea->y2 + 10, $this->plot->getTextColor(), $label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the lines.
|
||||||
|
*/
|
||||||
|
protected function printLine() {
|
||||||
|
$minValue = $this->axis->getLowerBoundary();
|
||||||
|
$maxValue = $this->axis->getUpperBoundary();
|
||||||
|
|
||||||
|
// Get the data as a list of series for consistency
|
||||||
|
$serieList = $this->getDataAsSerieList();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
$primitive = $this->plot->getPrimitive();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
$lineColorSet = $palette->lineColorSet;
|
||||||
|
$lineColorSet->reset();
|
||||||
|
for ($j = 0; $j < count($serieList); $j++) {
|
||||||
|
$serie = $serieList[$j];
|
||||||
|
$pointList = $serie->getPointList();
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
reset($pointList);
|
||||||
|
|
||||||
|
$columnWidth = ($graphArea->x2 - $graphArea->x1) / ($pointCount - 1);
|
||||||
|
|
||||||
|
$lineColor = $lineColorSet->currentColor();
|
||||||
|
$lineColorShadow = $lineColorSet->currentShadowColor();
|
||||||
|
$lineColorSet->next();
|
||||||
|
$x1 = null;
|
||||||
|
$y1 = null;
|
||||||
|
for ($i = 0; $i < $pointCount; $i++) {
|
||||||
|
$x2 = $graphArea->x1 + $i * $columnWidth;
|
||||||
|
|
||||||
|
$point = current($pointList);
|
||||||
|
next($pointList);
|
||||||
|
|
||||||
|
$value = $point->getY();
|
||||||
|
|
||||||
|
$y2 = $graphArea->y2 - ($value - $minValue) * ($graphArea->y2 - $graphArea->y1) / ($this->axis->displayDelta);
|
||||||
|
|
||||||
|
// Draw line
|
||||||
|
if ($x1) {
|
||||||
|
$primitive->line($x1, $y1, $x2, $y2, $lineColor, 4);
|
||||||
|
$primitive->line($x1, $y1 - 1, $x2, $y2 - 1, $lineColorShadow, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$x1 = $x2;
|
||||||
|
$y1 = $y2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the caption.
|
||||||
|
*/
|
||||||
|
protected function printCaption() {
|
||||||
|
// Get the list of labels
|
||||||
|
$labelList = $this->dataSet->getTitleList();
|
||||||
|
|
||||||
|
// Create the caption
|
||||||
|
$caption = new Caption();
|
||||||
|
$caption->setPlot($this->plot);
|
||||||
|
$caption->setLabelList($labelList);
|
||||||
|
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$lineColorSet = $palette->lineColorSet;
|
||||||
|
$caption->setColorSet($lineColorSet);
|
||||||
|
|
||||||
|
// Render the caption
|
||||||
|
$caption->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the chart image.
|
||||||
|
*
|
||||||
|
* @param string name of the file to render the image to (optional)
|
||||||
|
*/
|
||||||
|
public function render($fileName = null) {
|
||||||
|
// Check the data model
|
||||||
|
$this->checkDataModel();
|
||||||
|
|
||||||
|
$this->bound->computeBound($this->dataSet);
|
||||||
|
$this->computeAxis();
|
||||||
|
$this->computeLayout();
|
||||||
|
$this->createImage();
|
||||||
|
$this->plot->printLogo();
|
||||||
|
$this->plot->printTitle();
|
||||||
|
if (!$this->isEmptyDataSet(2)) {
|
||||||
|
$this->printAxis();
|
||||||
|
$this->printLine();
|
||||||
|
if ($this->hasSeveralSerie) {
|
||||||
|
$this->printCaption();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->plot->render($fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,266 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pie chart.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class PieChart extends Chart {
|
||||||
|
protected $pieCenterX;
|
||||||
|
protected $pieCenterY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of a pie chart.
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
public function PieChart($width = 600, $height = 250) {
|
||||||
|
parent::Chart($width, $height);
|
||||||
|
$this->plot->setGraphPadding(new Padding(15, 10, 30, 30));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the layout.
|
||||||
|
*/
|
||||||
|
protected function computeLayout() {
|
||||||
|
$this->plot->setHasCaption(true);
|
||||||
|
$this->plot->computeLayout();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Compute the coordinates of the pie
|
||||||
|
$this->pieCenterX = $graphArea->x1 + ($graphArea->x2 - $graphArea->x1) / 2;
|
||||||
|
$this->pieCenterY = $graphArea->y1 + ($graphArea->y2 - $graphArea->y1) / 2;
|
||||||
|
|
||||||
|
$this->pieWidth = round(($graphArea->x2 - $graphArea->x1) * 4 / 5);
|
||||||
|
$this->pieHeight = round(($graphArea->y2 - $graphArea->y1) * 3.7 / 5);
|
||||||
|
$this->pieDepth = round($this->pieWidth * 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare two sampling point values, order from biggest to lowest value.
|
||||||
|
*
|
||||||
|
* @param double first value
|
||||||
|
* @param double second value
|
||||||
|
* @return integer result of the comparison
|
||||||
|
*/
|
||||||
|
protected function sortPie($v1, $v2) {
|
||||||
|
return $v1[0] == $v2[0] ? 0 :
|
||||||
|
$v1[0] > $v2[0] ? -1 :
|
||||||
|
1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute pie values in percentage and sort them.
|
||||||
|
*/
|
||||||
|
protected function computePercent() {
|
||||||
|
$this->total = 0;
|
||||||
|
$this->percent = array();
|
||||||
|
|
||||||
|
$pointList = $this->dataSet->getPointList();
|
||||||
|
foreach ($pointList as $point) {
|
||||||
|
$this->total += $point->getY();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($pointList as $point) {
|
||||||
|
$percent = $this->total == 0 ? 0 : 100 * $point->getY() / $this->total;
|
||||||
|
|
||||||
|
array_push($this->percent, array($percent, $point));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sort data points
|
||||||
|
if ($this->config->getSortDataPoint()) {
|
||||||
|
usort($this->percent, array("PieChart", "sortPie"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the pie chart image.
|
||||||
|
*/
|
||||||
|
protected function createImage() {
|
||||||
|
parent::createImage();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$primitive = $this->plot->getPrimitive();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Legend box
|
||||||
|
$primitive->outlinedBox($graphArea->x1, $graphArea->y1, $graphArea->x2, $graphArea->y2, $palette->axisColor[0], $palette->axisColor[1]);
|
||||||
|
|
||||||
|
// Aqua-like background
|
||||||
|
for ($i = $graphArea->y1 + 2; $i < $graphArea->y2 - 1; $i++) {
|
||||||
|
$color = $palette->backgroundColor[($i + 3) % 4];
|
||||||
|
$primitive->line($graphArea->x1 + 2, $i, $graphArea->x2 - 2, $i, $color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the caption.
|
||||||
|
*/
|
||||||
|
protected function printCaption() {
|
||||||
|
// Create a list of labels
|
||||||
|
$labelList = array();
|
||||||
|
foreach($this->percent as $percent) {
|
||||||
|
list($percent, $point) = $percent;
|
||||||
|
$label = $point->getX();
|
||||||
|
|
||||||
|
array_push($labelList, $label);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the caption
|
||||||
|
$caption = new Caption();
|
||||||
|
$caption->setPlot($this->plot);
|
||||||
|
$caption->setLabelList($labelList);
|
||||||
|
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$pieColorSet = $palette->pieColorSet;
|
||||||
|
$caption->setColorSet($pieColorSet);
|
||||||
|
|
||||||
|
// Render the caption
|
||||||
|
$caption->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draw a 2D disc.
|
||||||
|
*
|
||||||
|
* @param integer Center coordinate (y)
|
||||||
|
* @param array Colors for each portion
|
||||||
|
* @param bitfield Drawing mode
|
||||||
|
*/
|
||||||
|
protected function drawDisc($cy, $colorArray, $mode) {
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
$oldAngle = 0;
|
||||||
|
$percentTotal = 0;
|
||||||
|
|
||||||
|
foreach ($this->percent as $a) {
|
||||||
|
list ($percent, $point) = $a;
|
||||||
|
|
||||||
|
// If value is null, don't draw this arc
|
||||||
|
if ($percent <= 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$color = $colorArray[$i % count($colorArray)];
|
||||||
|
|
||||||
|
$percentTotal += $percent;
|
||||||
|
$newAngle = $percentTotal * 360 / 100;
|
||||||
|
|
||||||
|
// imagefilledarc doesn't like null values (#1)
|
||||||
|
if ($newAngle - $oldAngle >= 1) {
|
||||||
|
imagefilledarc($img, $this->pieCenterX, $cy, $this->pieWidth, $this->pieHeight, $oldAngle, $newAngle, $color->getColor($img), $mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
$oldAngle = $newAngle;
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the percentage text.
|
||||||
|
*/
|
||||||
|
protected function drawPercent() {
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
$primitive = $this->plot->getPrimitive();
|
||||||
|
|
||||||
|
$angle1 = 0;
|
||||||
|
$percentTotal = 0;
|
||||||
|
|
||||||
|
foreach ($this->percent as $a) {
|
||||||
|
list ($percent, $point) = $a;
|
||||||
|
|
||||||
|
// If value is null, the arc isn't drawn, no need to display percent
|
||||||
|
if ($percent <= 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$percentTotal += $percent;
|
||||||
|
$angle2 = $percentTotal * 2 * M_PI / 100;
|
||||||
|
|
||||||
|
$angle = $angle1 + ($angle2 - $angle1) / 2;
|
||||||
|
$label = number_format($percent) . "%";
|
||||||
|
|
||||||
|
$x = cos($angle) * ($this->pieWidth + 35) / 2 + $this->pieCenterX;
|
||||||
|
$y = sin($angle) * ($this->pieHeight + 35) / 2 + $this->pieCenterY;
|
||||||
|
|
||||||
|
$text->printText($img, $x, $y, $this->plot->getTextColor(), $label, $text->fontCondensed, $text->HORIZONTAL_CENTER_ALIGN | $text->VERTICAL_CENTER_ALIGN);
|
||||||
|
|
||||||
|
$angle1 = $angle2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the pie chart.
|
||||||
|
*/
|
||||||
|
protected function printPie() {
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
$primitive = $this->plot->getPrimitive();
|
||||||
|
|
||||||
|
// Get the pie color set
|
||||||
|
$pieColorSet = $palette->pieColorSet;
|
||||||
|
$pieColorSet->reset();
|
||||||
|
|
||||||
|
// Silhouette
|
||||||
|
for ($cy = $this->pieCenterY + $this->pieDepth / 2; $cy >= $this->pieCenterY - $this->pieDepth / 2; $cy--) {
|
||||||
|
$this->drawDisc($cy, $palette->pieColorSet->shadowColorList, IMG_ARC_EDGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Top
|
||||||
|
$this->drawDisc($this->pieCenterY - $this->pieDepth / 2, $palette->pieColorSet->colorList, IMG_ARC_PIE);
|
||||||
|
|
||||||
|
// Top Outline
|
||||||
|
if ($this->config->getShowPointCaption()) {
|
||||||
|
$this->drawPercent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the chart image.
|
||||||
|
*
|
||||||
|
* @param string name of the file to render the image to (optional)
|
||||||
|
*/
|
||||||
|
public function render($fileName = null) {
|
||||||
|
$this->computePercent();
|
||||||
|
$this->computeLayout();
|
||||||
|
$this->createImage();
|
||||||
|
$this->plot->printLogo();
|
||||||
|
$this->plot->printTitle();
|
||||||
|
$this->printPie();
|
||||||
|
$this->printCaption();
|
||||||
|
|
||||||
|
$this->plot->render($fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,229 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chart composed of vertical bars.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class VerticalBarChart extends BarChart {
|
||||||
|
/**
|
||||||
|
* Ratio of empty space beside the bars.
|
||||||
|
*/
|
||||||
|
private $emptyToFullRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new vertical bar chart
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
public function VerticalBarChart($width = 600, $height = 250) {
|
||||||
|
parent::BarChart($width, $height);
|
||||||
|
|
||||||
|
$this->emptyToFullRatio = 1 / 5;
|
||||||
|
$this->plot->setGraphPadding(new Padding(5, 30, 50, 50));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the layout.
|
||||||
|
*/
|
||||||
|
protected function computeLayout() {
|
||||||
|
if ($this->hasSeveralSerie) {
|
||||||
|
$this->plot->setHasCaption(true);
|
||||||
|
}
|
||||||
|
$this->plot->computeLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the horizontal and veritcal axis.
|
||||||
|
*/
|
||||||
|
protected function printAxis() {
|
||||||
|
$minValue = $this->axis->getLowerBoundary();
|
||||||
|
$maxValue = $this->axis->getUpperBoundary();
|
||||||
|
$stepValue = $this->axis->getTics();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Vertical axis
|
||||||
|
for ($value = $minValue; $value <= $maxValue; $value += $stepValue) {
|
||||||
|
$y = $graphArea->y2 - ($value - $minValue) * ($graphArea->y2 - $graphArea->y1) / ($this->axis->displayDelta);
|
||||||
|
|
||||||
|
imagerectangle($img, $graphArea->x1 - 3, $y, $graphArea->x1 - 2, $y + 1, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $graphArea->x1 - 1, $y, $graphArea->x1, $y + 1, $palette->axisColor[1]->getColor($img));
|
||||||
|
|
||||||
|
$text->printText($img, $graphArea->x1 - 5, $y, $this->plot->getTextColor(), $value, $text->fontCondensed, $text->HORIZONTAL_RIGHT_ALIGN | $text->VERTICAL_CENTER_ALIGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get first serie of a list
|
||||||
|
$pointList = $this->getFirstSerieOfList();
|
||||||
|
|
||||||
|
// Horizontal Axis
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
reset($pointList);
|
||||||
|
$columnWidth = ($graphArea->x2 - $graphArea->x1) / $pointCount;
|
||||||
|
for ($i = 0; $i <= $pointCount; $i++) {
|
||||||
|
$x = $graphArea->x1 + $i * $columnWidth;
|
||||||
|
|
||||||
|
imagerectangle($img, $x - 1, $graphArea->y2 + 2, $x, $graphArea->y2 + 3, $palette->axisColor[0]->getColor($img));
|
||||||
|
imagerectangle($img, $x - 1, $graphArea->y2, $x, $graphArea->y2 + 1, $palette->axisColor[1]->getColor($img));
|
||||||
|
|
||||||
|
if ($i < $pointCount) {
|
||||||
|
$point = current($pointList);
|
||||||
|
next($pointList);
|
||||||
|
|
||||||
|
$label = $point->getX();
|
||||||
|
|
||||||
|
$text->printDiagonal($img, $x + $columnWidth * 1 / 3, $graphArea->y2 + 10, $this->plot->getTextColor(), $label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the bars.
|
||||||
|
*/
|
||||||
|
protected function printBar() {
|
||||||
|
// Get the data as a list of series for consistency
|
||||||
|
$serieList = $this->getDataAsSerieList();
|
||||||
|
|
||||||
|
// Get graphical obects
|
||||||
|
$img = $this->plot->getImg();
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$text = $this->plot->getText();
|
||||||
|
|
||||||
|
// Get the graph area
|
||||||
|
$graphArea = $this->plot->getGraphArea();
|
||||||
|
|
||||||
|
// Start from the first color for the first serie
|
||||||
|
$barColorSet = $palette->barColorSet;
|
||||||
|
$barColorSet->reset();
|
||||||
|
|
||||||
|
$minValue = $this->axis->getLowerBoundary();
|
||||||
|
$maxValue = $this->axis->getUpperBoundary();
|
||||||
|
$stepValue = $this->axis->getTics();
|
||||||
|
|
||||||
|
$serieCount = count($serieList);
|
||||||
|
for ($j = 0; $j < $serieCount; $j++) {
|
||||||
|
$serie = $serieList[$j];
|
||||||
|
$pointList = $serie->getPointList();
|
||||||
|
$pointCount = count($pointList);
|
||||||
|
reset($pointList);
|
||||||
|
|
||||||
|
// Select the next color for the next serie
|
||||||
|
if (!$this->config->getUseMultipleColor()) {
|
||||||
|
$color = $barColorSet->currentColor();
|
||||||
|
$shadowColor = $barColorSet->currentShadowColor();
|
||||||
|
$barColorSet->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
$columnWidth = ($graphArea->x2 - $graphArea->x1) / $pointCount;
|
||||||
|
for ($i = 0; $i < $pointCount; $i++) {
|
||||||
|
$x = $graphArea->x1 + $i * $columnWidth;
|
||||||
|
|
||||||
|
$point = current($pointList);
|
||||||
|
next($pointList);
|
||||||
|
|
||||||
|
$value = $point->getY();
|
||||||
|
|
||||||
|
$ymin = $graphArea->y2 - ($value - $minValue) * ($graphArea->y2 - $graphArea->y1) / ($this->axis->displayDelta);
|
||||||
|
|
||||||
|
// Bar dimensions
|
||||||
|
$xWithMargin = $x + $columnWidth * $this->emptyToFullRatio;
|
||||||
|
$columnWidthWithMargin = $columnWidth * (1 - $this->emptyToFullRatio * 2);
|
||||||
|
$barWidth = $columnWidthWithMargin / $serieCount;
|
||||||
|
$barOffset = $barWidth * $j;
|
||||||
|
$x1 = $xWithMargin + $barOffset;
|
||||||
|
$x2 = $xWithMargin + $barWidth + $barOffset - 1;
|
||||||
|
|
||||||
|
// Select the next color for the next item in the serie
|
||||||
|
if ($this->config->getUseMultipleColor()) {
|
||||||
|
$color = $barColorSet->currentColor();
|
||||||
|
$shadowColor = $barColorSet->currentShadowColor();
|
||||||
|
$barColorSet->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw caption text on bar
|
||||||
|
if ($this->config->getShowPointCaption()) {
|
||||||
|
$text->printText($img, $x1 + $barWidth / 2 , $ymin - 5, $this->plot->getTextColor(), $value, $text->fontCondensed, $text->HORIZONTAL_CENTER_ALIGN | $text->VERTICAL_BOTTOM_ALIGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the vertical bar
|
||||||
|
imagefilledrectangle($img, $x1, $ymin, $x2, $graphArea->y2 - 1, $shadowColor->getColor($img));
|
||||||
|
|
||||||
|
// Prevents drawing a small box when y = 0
|
||||||
|
if ($ymin != $graphArea->y2) {
|
||||||
|
imagefilledrectangle($img, $x1 + 1, $ymin + 1, $x2 - 4, $graphArea->y2 - 1, $color->getColor($img));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the caption.
|
||||||
|
*/
|
||||||
|
protected function printCaption() {
|
||||||
|
// Get the list of labels
|
||||||
|
$labelList = $this->dataSet->getTitleList();
|
||||||
|
|
||||||
|
// Create the caption
|
||||||
|
$caption = new Caption();
|
||||||
|
$caption->setPlot($this->plot);
|
||||||
|
$caption->setLabelList($labelList);
|
||||||
|
|
||||||
|
$palette = $this->plot->getPalette();
|
||||||
|
$barColorSet = $palette->barColorSet;
|
||||||
|
$caption->setColorSet($barColorSet);
|
||||||
|
|
||||||
|
// Render the caption
|
||||||
|
$caption->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the chart image.
|
||||||
|
*
|
||||||
|
* @param string name of the file to render the image to (optional)
|
||||||
|
*/
|
||||||
|
public function render($fileName = null) {
|
||||||
|
// Check the data model
|
||||||
|
$this->checkDataModel();
|
||||||
|
|
||||||
|
$this->bound->computeBound($this->dataSet);
|
||||||
|
$this->computeAxis();
|
||||||
|
$this->computeLayout();
|
||||||
|
$this->createImage();
|
||||||
|
$this->plot->printLogo();
|
||||||
|
$this->plot->printTitle();
|
||||||
|
if (!$this->isEmptyDataSet(1)) {
|
||||||
|
$this->printAxis();
|
||||||
|
$this->printBar();
|
||||||
|
if ($this->hasSeveralSerie) {
|
||||||
|
$this->printCaption();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->plot->render($fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Color.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class Color {
|
||||||
|
private $red;
|
||||||
|
private $green;
|
||||||
|
private $blue;
|
||||||
|
private $alpha;
|
||||||
|
private $gdColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new color
|
||||||
|
*
|
||||||
|
* @param integer red [0..255]
|
||||||
|
* @param integer green [0..255]
|
||||||
|
* @param integer blue [0..255]
|
||||||
|
* @param integer alpha [0..255]
|
||||||
|
*/
|
||||||
|
public function Color($red, $green, $blue, $alpha = 0) {
|
||||||
|
$this->red = (int) $red;
|
||||||
|
$this->green = (int) $green;
|
||||||
|
$this->blue = (int) $blue;
|
||||||
|
$this->alpha = (int) round($alpha * 127.0 / 255);
|
||||||
|
|
||||||
|
$this->gdColor = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get GD color.
|
||||||
|
*
|
||||||
|
* @param $img GD image resource
|
||||||
|
*/
|
||||||
|
public function getColor($img) {
|
||||||
|
// Checks if color has already been allocated
|
||||||
|
if (!$this->gdColor) {
|
||||||
|
if ($this->alpha == 0 || !function_exists('imagecolorallocatealpha')) {
|
||||||
|
$this->gdColor = imagecolorallocate($img, $this->red, $this->green, $this->blue);
|
||||||
|
} else {
|
||||||
|
$this->gdColor = imagecolorallocatealpha($img, $this->red, $this->green, $this->blue, $this->alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns GD color
|
||||||
|
return $this->gdColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clip a color component in the interval [0..255]
|
||||||
|
*
|
||||||
|
* @param integer Component
|
||||||
|
* @return Clipped component
|
||||||
|
*/
|
||||||
|
public function clip($component) {
|
||||||
|
if ($component < 0) {
|
||||||
|
$component = 0;
|
||||||
|
} else if ($component > 255) {
|
||||||
|
$component = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $component;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a new color, which is a shadow of this one.
|
||||||
|
*
|
||||||
|
* @param double Multiplication factor
|
||||||
|
* @return Shadow color
|
||||||
|
*/
|
||||||
|
public function getShadowColor($shadowFactor) {
|
||||||
|
$red = $this->clip($this->red * $shadowFactor);
|
||||||
|
$green = $this->clip($this->green * $shadowFactor);
|
||||||
|
$blue = $this->clip($this->blue * $shadowFactor);
|
||||||
|
$shadowColor = new Color($red, $green, $blue);
|
||||||
|
|
||||||
|
return $shadowColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A set of colors, used for drawing series of data.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 26 july 2007
|
||||||
|
*/
|
||||||
|
class ColorSet {
|
||||||
|
public $colorList;
|
||||||
|
public $shadowColorList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ColorSet constructor.
|
||||||
|
*
|
||||||
|
* @param $shadowFactor Shadow factor
|
||||||
|
* @param $colorArray Colors as an array
|
||||||
|
*/
|
||||||
|
public function ColorSet($colorList, $shadowFactor) {
|
||||||
|
$this->colorList = $colorList;
|
||||||
|
$this->shadowColorList = array();
|
||||||
|
|
||||||
|
// Generate the shadow color set
|
||||||
|
foreach ($colorList as $color) {
|
||||||
|
$shadowColor = $color->getShadowColor($shadowFactor);
|
||||||
|
|
||||||
|
array_push($this->shadowColorList, $shadowColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the iterator over the collections of colors.
|
||||||
|
*/
|
||||||
|
public function reset() {
|
||||||
|
reset($this->colorList);
|
||||||
|
reset($this->shadowColorList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterate over the colors and shadow colors. When we go after the last one, loop over.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function next() {
|
||||||
|
$value = next($this->colorList);
|
||||||
|
next($this->shadowColorList);
|
||||||
|
|
||||||
|
// When we go after the last value, loop over.
|
||||||
|
if ($value == FALSE) {
|
||||||
|
$this->reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current color.
|
||||||
|
*
|
||||||
|
* @return Current color
|
||||||
|
*/
|
||||||
|
public function currentColor() {
|
||||||
|
return current($this->colorList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current shadow color.
|
||||||
|
*
|
||||||
|
* @return Current shadow color
|
||||||
|
*/
|
||||||
|
public function currentShadowColor() {
|
||||||
|
return current($this->shadowColorList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,156 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Color palette shared by all chart types.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 25 july 2007
|
||||||
|
*/
|
||||||
|
class Palette {
|
||||||
|
// Plot attributes
|
||||||
|
public $red;
|
||||||
|
public $axisColor;
|
||||||
|
public $backgroundColor;
|
||||||
|
|
||||||
|
// Specific chart attributes
|
||||||
|
public $barColorSet;
|
||||||
|
public $lineColorSet;
|
||||||
|
public $pieColorSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Palette constructor.
|
||||||
|
*/
|
||||||
|
public function Palette() {
|
||||||
|
$this->red = new Color(255, 0, 0);
|
||||||
|
|
||||||
|
// Set the colors for the horizontal and vertical axis
|
||||||
|
$this->setAxisColor(array(
|
||||||
|
new Color(201, 201, 201),
|
||||||
|
new Color(158, 158, 158)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Set the colors for the background
|
||||||
|
$this->setBackgroundColor(array(
|
||||||
|
new Color(242, 242, 242),
|
||||||
|
new Color(231, 231, 231),
|
||||||
|
new Color(239, 239, 239),
|
||||||
|
new Color(253, 253, 253)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Set the colors for the bars
|
||||||
|
$this->setBarColor(array(
|
||||||
|
new Color(42, 71, 181),
|
||||||
|
new Color(243, 198, 118),
|
||||||
|
new Color(128, 63, 35),
|
||||||
|
new Color(195, 45, 28),
|
||||||
|
new Color(224, 198, 165),
|
||||||
|
new Color(239, 238, 218),
|
||||||
|
new Color(40, 72, 59),
|
||||||
|
new Color(71, 112, 132),
|
||||||
|
new Color(167, 192, 199),
|
||||||
|
new Color(218, 233, 202)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Set the colors for the lines
|
||||||
|
$this->setLineColor(array(
|
||||||
|
new Color(172, 172, 210),
|
||||||
|
new Color(2, 78, 0),
|
||||||
|
new Color(148, 170, 36),
|
||||||
|
new Color(233, 191, 49),
|
||||||
|
new Color(240, 127, 41),
|
||||||
|
new Color(243, 63, 34),
|
||||||
|
new Color(190, 71, 47),
|
||||||
|
new Color(135, 81, 60),
|
||||||
|
new Color(128, 78, 162),
|
||||||
|
new Color(121, 75, 255),
|
||||||
|
new Color(142, 165, 250),
|
||||||
|
new Color(162, 254, 239),
|
||||||
|
new Color(137, 240, 166),
|
||||||
|
new Color(104, 221, 71),
|
||||||
|
new Color(98, 174, 35),
|
||||||
|
new Color(93, 129, 1)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Set the colors for the pie
|
||||||
|
$this->setPieColor(array(
|
||||||
|
new Color(2, 78, 0),
|
||||||
|
new Color(148, 170, 36),
|
||||||
|
new Color(233, 191, 49),
|
||||||
|
new Color(240, 127, 41),
|
||||||
|
new Color(243, 63, 34),
|
||||||
|
new Color(190, 71, 47),
|
||||||
|
new Color(135, 81, 60),
|
||||||
|
new Color(128, 78, 162),
|
||||||
|
new Color(121, 75, 255),
|
||||||
|
new Color(142, 165, 250),
|
||||||
|
new Color(162, 254, 239),
|
||||||
|
new Color(137, 240, 166),
|
||||||
|
new Color(104, 221, 71),
|
||||||
|
new Color(98, 174, 35),
|
||||||
|
new Color(93, 129, 1)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the colors for the axis.
|
||||||
|
*
|
||||||
|
* @param colors Array of Color
|
||||||
|
*/
|
||||||
|
public function setAxisColor($colors) {
|
||||||
|
$this->axisColor = $colors;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the colors for the background.
|
||||||
|
*
|
||||||
|
* @param colors Array of Color
|
||||||
|
*/
|
||||||
|
public function setBackgroundColor($colors) {
|
||||||
|
$this->backgroundColor = $colors;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the colors for the bar charts.
|
||||||
|
*
|
||||||
|
* @param colors Array of Color
|
||||||
|
*/
|
||||||
|
public function setBarColor($colors) {
|
||||||
|
$this->barColorSet = new ColorSet($colors, 0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the colors for the line charts.
|
||||||
|
*
|
||||||
|
* @param colors Array of Color
|
||||||
|
*/
|
||||||
|
public function setLineColor($colors) {
|
||||||
|
$this->lineColorSet = new ColorSet($colors, 0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the colors for the pie charts.
|
||||||
|
*
|
||||||
|
* @param colors Array of Color
|
||||||
|
*/
|
||||||
|
public function setPieColor($colors) {
|
||||||
|
$this->pieColorSet = new ColorSet($colors, 0.7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,443 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The plot holds graphical attributes, and is responsible for computing the layout of the graph.
|
||||||
|
* The layout is quite simple right now, with 4 areas laid out like that:
|
||||||
|
* (of course this is subject to change in the future).
|
||||||
|
*
|
||||||
|
* output area------------------------------------------------|
|
||||||
|
* | (outer padding) |
|
||||||
|
* | image area--------------------------------------------| |
|
||||||
|
* | | (title padding) | |
|
||||||
|
* | | title area----------------------------------------| | |
|
||||||
|
* | | |-------------------------------------------------| | |
|
||||||
|
* | | | |
|
||||||
|
* | | (graph padding) (caption padding) | |
|
||||||
|
* | | graph area----------------| caption area---------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |-------------------------| |--------------------| | |
|
||||||
|
* | | | |
|
||||||
|
* | |-----------------------------------------------------| |
|
||||||
|
* | |
|
||||||
|
* |----------------------------------------------------------|
|
||||||
|
*
|
||||||
|
* All area dimensions are known in advance , and the optional logo is drawn in absolute coordinates.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* Created on 27 july 2007
|
||||||
|
*/
|
||||||
|
class Plot {
|
||||||
|
// Style properties
|
||||||
|
protected $title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Location of the logo. Can be overriden to your personalized logo.
|
||||||
|
*/
|
||||||
|
protected $logoFileName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outer area, whose dimension is the same as the PNG returned.
|
||||||
|
*/
|
||||||
|
protected $outputArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Outer padding surrounding the whole image, everything outside is blank.
|
||||||
|
*/
|
||||||
|
protected $outerPadding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coordinates of the area inside the outer padding.
|
||||||
|
*/
|
||||||
|
protected $imageArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fixed title height in pixels.
|
||||||
|
*/
|
||||||
|
protected $titleHeight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Padding of the title area.
|
||||||
|
*/
|
||||||
|
protected $titlePadding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coordinates of the title area.
|
||||||
|
*/
|
||||||
|
protected $titleArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if the plot has a caption.
|
||||||
|
*/
|
||||||
|
protected $hasCaption;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ratio of graph/caption in width.
|
||||||
|
*/
|
||||||
|
protected $graphCaptionRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Padding of the graph area.
|
||||||
|
*/
|
||||||
|
protected $graphPadding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coordinates of the graph area.
|
||||||
|
*/
|
||||||
|
protected $graphArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Padding of the caption area.
|
||||||
|
*/
|
||||||
|
protected $captionPadding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coordinates of the caption area.
|
||||||
|
*/
|
||||||
|
protected $captionArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Text writer.
|
||||||
|
*/
|
||||||
|
protected $text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Color palette.
|
||||||
|
*/
|
||||||
|
protected $palette;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GD image
|
||||||
|
*/
|
||||||
|
protected $img;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drawing primitives
|
||||||
|
*/
|
||||||
|
protected $primitive;
|
||||||
|
|
||||||
|
protected $backGroundColor;
|
||||||
|
protected $textColor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of Plot.
|
||||||
|
*
|
||||||
|
* @param integer width of the image
|
||||||
|
* @param integer height of the image
|
||||||
|
*/
|
||||||
|
public function Plot($width, $height) {
|
||||||
|
$this->width = $width;
|
||||||
|
$this->height = $height;
|
||||||
|
|
||||||
|
$this->text = new Text();
|
||||||
|
$this->palette = new Palette();
|
||||||
|
|
||||||
|
// Default layout
|
||||||
|
$this->outputArea = new Rectangle(0, 0, $width - 1, $height - 1);
|
||||||
|
$this->outerPadding = new Padding(5);
|
||||||
|
$this->titleHeight = 26;
|
||||||
|
$this->titlePadding = new Padding(5);
|
||||||
|
$this->hasCaption = false;
|
||||||
|
$this->graphCaptionRatio = 0.50;
|
||||||
|
$this->graphPadding = new Padding(50);
|
||||||
|
$this->captionPadding = new Padding(15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the area inside the outer padding (outside is white).
|
||||||
|
*/
|
||||||
|
private function computeImageArea() {
|
||||||
|
$this->imageArea = $this->outputArea->getPaddedRectangle($this->outerPadding);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the title area.
|
||||||
|
*/
|
||||||
|
private function computeTitleArea() {
|
||||||
|
$titleUnpaddedBottom = $this->imageArea->y1 + $this->titleHeight + $this->titlePadding->top + $this->titlePadding->bottom;
|
||||||
|
$titleArea = new Rectangle(
|
||||||
|
$this->imageArea->x1,
|
||||||
|
$this->imageArea->y1,
|
||||||
|
$this->imageArea->x2,
|
||||||
|
$titleUnpaddedBottom - 1
|
||||||
|
);
|
||||||
|
$this->titleArea = $titleArea->getPaddedRectangle($this->titlePadding);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the graph area.
|
||||||
|
*/
|
||||||
|
private function computeGraphArea() {
|
||||||
|
$titleUnpaddedBottom = $this->imageArea->y1 + $this->titleHeight + $this->titlePadding->top + $this->titlePadding->bottom;
|
||||||
|
$graphArea = null;
|
||||||
|
if ($this->hasCaption) {
|
||||||
|
$graphUnpaddedRight = $this->imageArea->x1 + ($this->imageArea->x2 - $this->imageArea->x1) * $this->graphCaptionRatio
|
||||||
|
+ $this->graphPadding->left + $this->graphPadding->right;
|
||||||
|
$graphArea = new Rectangle(
|
||||||
|
$this->imageArea->x1,
|
||||||
|
$titleUnpaddedBottom,
|
||||||
|
$graphUnpaddedRight - 1,
|
||||||
|
$this->imageArea->y2
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$graphArea = new Rectangle(
|
||||||
|
$this->imageArea->x1,
|
||||||
|
$titleUnpaddedBottom,
|
||||||
|
$this->imageArea->x2,
|
||||||
|
$this->imageArea->y2
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$this->graphArea = $graphArea->getPaddedRectangle($this->graphPadding);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the caption area.
|
||||||
|
*/
|
||||||
|
private function computeCaptionArea() {
|
||||||
|
$graphUnpaddedRight = $this->imageArea->x1 + ($this->imageArea->x2 - $this->imageArea->x1) * $this->graphCaptionRatio
|
||||||
|
+ $this->graphPadding->left + $this->graphPadding->right;
|
||||||
|
$titleUnpaddedBottom = $this->imageArea->y1 + $this->titleHeight + $this->titlePadding->top + $this->titlePadding->bottom;
|
||||||
|
$captionArea = new Rectangle(
|
||||||
|
$graphUnpaddedRight,
|
||||||
|
$titleUnpaddedBottom,
|
||||||
|
$this->imageArea->x2,
|
||||||
|
$this->imageArea->y2
|
||||||
|
);
|
||||||
|
$this->captionArea = $captionArea->getPaddedRectangle($this->captionPadding);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute the layout of all areas of the graph.
|
||||||
|
*/
|
||||||
|
public function computeLayout() {
|
||||||
|
$this->computeImageArea();
|
||||||
|
$this->computeTitleArea();
|
||||||
|
$this->computeGraphArea();
|
||||||
|
if ($this->hasCaption) {
|
||||||
|
$this->computeCaptionArea();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and initialize the image.
|
||||||
|
*/
|
||||||
|
public function createImage() {
|
||||||
|
$this->img = imagecreatetruecolor($this->width, $this->height);
|
||||||
|
|
||||||
|
$this->primitive = new Primitive($this->img);
|
||||||
|
|
||||||
|
$this->backGroundColor = new Color(255, 255, 255);
|
||||||
|
$this->textColor = new Color(0, 0, 0);
|
||||||
|
|
||||||
|
// White background
|
||||||
|
imagefilledrectangle($this->img, 0, 0, $this->width - 1, $this->height - 1, $this->backGroundColor->getColor($this->img));
|
||||||
|
|
||||||
|
//imagerectangle($this->img, $this->imageArea->x1, $this->imageArea->y1, $this->imageArea->x2, $this->imageArea->y2, $this->palette->red->getColor($this->img));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the title to the image.
|
||||||
|
*/
|
||||||
|
public function printTitle() {
|
||||||
|
$yCenter = $this->titleArea->y1 + ($this->titleArea->y2 - $this->titleArea->y1) / 2;
|
||||||
|
$this->text->printCentered($this->img, $yCenter, $this->textColor, $this->title, $this->text->fontCondensedBold);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print the logo image to the image.
|
||||||
|
*/
|
||||||
|
public function printLogo() {
|
||||||
|
@$logoImage = imageCreateFromPNG($this->logoFileName);
|
||||||
|
|
||||||
|
if ($logoImage) {
|
||||||
|
imagecopymerge($this->img, $logoImage, 2 * $this->outerPadding->left, $this->outerPadding->top, 0, 0, imagesx($logoImage), imagesy($logoImage), 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders to a file or to standard output.
|
||||||
|
*
|
||||||
|
* @param fileName File name (optional)
|
||||||
|
*/
|
||||||
|
public function render($fileName) {
|
||||||
|
if (isset($fileName)) {
|
||||||
|
imagepng($this->img, $fileName);
|
||||||
|
} else {
|
||||||
|
imagepng($this->img);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the title.
|
||||||
|
*
|
||||||
|
* @param string New title
|
||||||
|
*/
|
||||||
|
public function setTitle($title) {
|
||||||
|
$this->title = $title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the logo image file name.
|
||||||
|
*
|
||||||
|
* @param string New logo image file name
|
||||||
|
*/
|
||||||
|
public function setLogoFileName($logoFileName) {
|
||||||
|
$this->logoFileName = $logoFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the GD image.
|
||||||
|
*
|
||||||
|
* @return GD Image
|
||||||
|
*/
|
||||||
|
public function getImg() {
|
||||||
|
return $this->img;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the palette.
|
||||||
|
*
|
||||||
|
* @return palette
|
||||||
|
*/
|
||||||
|
public function getPalette() {
|
||||||
|
return $this->palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the text.
|
||||||
|
*
|
||||||
|
* @return text
|
||||||
|
*/
|
||||||
|
public function getText() {
|
||||||
|
return $this->text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the primitive.
|
||||||
|
*
|
||||||
|
* @return primitive
|
||||||
|
*/
|
||||||
|
public function getPrimitive() {
|
||||||
|
return $this->primitive;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the outer padding.
|
||||||
|
*
|
||||||
|
* @param integer Outer padding value in pixels
|
||||||
|
*/
|
||||||
|
public function getOuterPadding() {
|
||||||
|
return $outerPadding;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the outer padding.
|
||||||
|
*
|
||||||
|
* @param integer Outer padding value in pixels
|
||||||
|
*/
|
||||||
|
public function setOuterPadding($outerPadding) {
|
||||||
|
$this->outerPadding = $outerPadding;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the title height.
|
||||||
|
*
|
||||||
|
* @param integer title height
|
||||||
|
*/
|
||||||
|
public function setTitleHeight($titleHeight) {
|
||||||
|
$this->titleHeight = $titleHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the title padding.
|
||||||
|
*
|
||||||
|
* @param integer title padding
|
||||||
|
*/
|
||||||
|
public function setTitlePadding($titlePadding) {
|
||||||
|
$this->titlePadding = $titlePadding;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the graph padding.
|
||||||
|
*
|
||||||
|
* @param integer graph padding
|
||||||
|
*/
|
||||||
|
public function setGraphPadding($graphPadding) {
|
||||||
|
$this->graphPadding = $graphPadding;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if the graph has a caption.
|
||||||
|
*
|
||||||
|
* @param boolean graph has a caption
|
||||||
|
*/
|
||||||
|
public function setHasCaption($hasCaption) {
|
||||||
|
$this->hasCaption = $hasCaption;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the caption padding.
|
||||||
|
*
|
||||||
|
* @param integer caption padding
|
||||||
|
*/
|
||||||
|
public function setCaptionPadding($captionPadding) {
|
||||||
|
$this->captionPadding = $captionPadding;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the graph/caption ratio.
|
||||||
|
*
|
||||||
|
* @param integer caption padding
|
||||||
|
*/
|
||||||
|
public function setGraphCaptionRatio($graphCaptionRatio) {
|
||||||
|
$this->graphCaptionRatio = $graphCaptionRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the graph area.
|
||||||
|
*
|
||||||
|
* @return graph area
|
||||||
|
*/
|
||||||
|
public function getGraphArea() {
|
||||||
|
return $this->graphArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the caption area.
|
||||||
|
*
|
||||||
|
* @return caption area
|
||||||
|
*/
|
||||||
|
public function getCaptionArea() {
|
||||||
|
return $this->captionArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the text color.
|
||||||
|
*
|
||||||
|
* @return text color
|
||||||
|
*/
|
||||||
|
public function getTextColor() {
|
||||||
|
return $this->textColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Primitive geometric object representing a padding.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* @Created on 27 july 2007
|
||||||
|
*/
|
||||||
|
class Padding {
|
||||||
|
/**
|
||||||
|
* Top padding.
|
||||||
|
*/
|
||||||
|
public $top;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Right padding.
|
||||||
|
*/
|
||||||
|
public $right;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bottom padding.
|
||||||
|
*/
|
||||||
|
public $bottom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Left padding.
|
||||||
|
*/
|
||||||
|
public $left;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new padding.
|
||||||
|
*
|
||||||
|
* @param integer Top padding
|
||||||
|
* @param integer Right padding
|
||||||
|
* @param integer Bottom padding
|
||||||
|
* @param integer Left padding
|
||||||
|
*/
|
||||||
|
public function Padding($top, $right = null, $bottom = null, $left = null) {
|
||||||
|
$this->top = $top;
|
||||||
|
if ($right == null) {
|
||||||
|
$this->right = $top;
|
||||||
|
$this->bottom = $top;
|
||||||
|
$this->left = $top;
|
||||||
|
} else {
|
||||||
|
$this->right = $right;
|
||||||
|
$this->bottom = $bottom;
|
||||||
|
$this->left = $left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Graphic primitives, extends GD with chart related primitives.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class Primitive {
|
||||||
|
private $img;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new primitive object
|
||||||
|
*
|
||||||
|
* @param resource GD image resource
|
||||||
|
*/
|
||||||
|
public function Primitive($img) {
|
||||||
|
$this->img = $img;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draws a straight line.
|
||||||
|
*
|
||||||
|
* @param integer line start (X)
|
||||||
|
* @param integer line start (Y)
|
||||||
|
* @param integer line end (X)
|
||||||
|
* @param integer line end (Y)
|
||||||
|
* @param Color line color
|
||||||
|
*/
|
||||||
|
public function line($x1, $y1, $x2, $y2, $color, $width = 1) {
|
||||||
|
imagefilledpolygon($this->img, array($x1, $y1 - $width / 2, $x1, $y1 + $width / 2, $x2, $y2 + $width / 2, $x2, $y2 - $width / 2), 4, $color->getColor($this->img));
|
||||||
|
// imageline($this->img, $x1, $y1, $x2, $y2, $color->getColor($this->img));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draw a filled gray box with thick borders and darker corners.
|
||||||
|
*
|
||||||
|
* @param integer top left coordinate (x)
|
||||||
|
* @param integer top left coordinate (y)
|
||||||
|
* @param integer bottom right coordinate (x)
|
||||||
|
* @param integer bottom right coordinate (y)
|
||||||
|
* @param Color edge color
|
||||||
|
* @param Color corner color
|
||||||
|
*/
|
||||||
|
public function outlinedBox($x1, $y1, $x2, $y2, $color0, $color1) {
|
||||||
|
imagefilledrectangle($this->img, $x1, $y1, $x2, $y2, $color0->getColor($this->img));
|
||||||
|
imagerectangle($this->img, $x1, $y1, $x1 + 1, $y1 + 1, $color1->getColor($this->img));
|
||||||
|
imagerectangle($this->img, $x2 - 1, $y1, $x2, $y1 + 1, $color1->getColor($this->img));
|
||||||
|
imagerectangle($this->img, $x1, $y2 - 1, $x1 + 1, $y2, $color1->getColor($this->img));
|
||||||
|
imagerectangle($this->img, $x2 - 1, $y2 - 1, $x2, $y2, $color1->getColor($this->img));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A rectangle identified by the top-left and the bottom-right corners.
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
* @Created on 27 july 2007
|
||||||
|
*/
|
||||||
|
class Rectangle {
|
||||||
|
/**
|
||||||
|
* Top left X.
|
||||||
|
*/
|
||||||
|
public $x1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Top left Y.
|
||||||
|
*/
|
||||||
|
public $y1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bottom right X.
|
||||||
|
*/
|
||||||
|
public $x2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bottom right Y.
|
||||||
|
*/
|
||||||
|
public $y2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor of Rectangle.
|
||||||
|
*
|
||||||
|
* @param x1 Left edge coordinate
|
||||||
|
* @param y1 Upper edge coordinate
|
||||||
|
* @param x2 Right edge coordinate
|
||||||
|
* @param y2 Bottom edge coordinate
|
||||||
|
*/
|
||||||
|
public function Rectangle($x1, $y1, $x2, $y2) {
|
||||||
|
$this->x1 = $x1;
|
||||||
|
$this->y1 = $y1;
|
||||||
|
$this->x2 = $x2;
|
||||||
|
$this->y2 = $y2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply a padding and returns the resulting rectangle.
|
||||||
|
* The result is an enlarged rectangle.
|
||||||
|
*
|
||||||
|
* @return Padded rectangle
|
||||||
|
*/
|
||||||
|
public function getPaddedRectangle($padding) {
|
||||||
|
$rectangle = new Rectangle(
|
||||||
|
$this->x1 + $padding->left,
|
||||||
|
$this->y1 + $padding->top,
|
||||||
|
$this->x2 - $padding->right,
|
||||||
|
$this->y2 - $padding->bottom
|
||||||
|
);
|
||||||
|
|
||||||
|
//echo "(" . $this->x1 . "," . $this->y1 . ") (" . $this->x2 . "," . $this->y2 . ")<br>";
|
||||||
|
return $rectangle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
<?php
|
||||||
|
/* Libchart - PHP chart library
|
||||||
|
* Copyright (C) 2005-2011 Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Text drawing helper
|
||||||
|
*
|
||||||
|
* @author Jean-Marc Trémeaux (jm.tremeaux at gmail.com)
|
||||||
|
*/
|
||||||
|
class Text {
|
||||||
|
public $HORIZONTAL_LEFT_ALIGN = 1;
|
||||||
|
public $HORIZONTAL_CENTER_ALIGN = 2;
|
||||||
|
public $HORIZONTAL_RIGHT_ALIGN = 4;
|
||||||
|
public $VERTICAL_TOP_ALIGN = 8;
|
||||||
|
public $VERTICAL_CENTER_ALIGN = 16;
|
||||||
|
public $VERTICAL_BOTTOM_ALIGN = 32;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new text drawing helper.
|
||||||
|
*/
|
||||||
|
public function Text() {
|
||||||
|
$baseDir = dirname(__FILE__) . "/../../../";
|
||||||
|
|
||||||
|
// Free low-res fonts based on Bitstream Vera <http://dejavu.sourceforge.net/wiki/>
|
||||||
|
$this->fontCondensed = $baseDir . "fonts/DejaVuSansCondensed.ttf";
|
||||||
|
$this->fontCondensedBold = $baseDir . "fonts/DejaVuSansCondensed-Bold.ttf";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print text.
|
||||||
|
*
|
||||||
|
* @param Image GD image
|
||||||
|
* @param integer text coordinate (x)
|
||||||
|
* @param integer text coordinate (y)
|
||||||
|
* @param Color text color
|
||||||
|
* @param string text value
|
||||||
|
* @param string font file name
|
||||||
|
* @param bitfield text alignment
|
||||||
|
*/
|
||||||
|
public function printText($img, $px, $py, $color, $text, $fontFileName, $align = 0) {
|
||||||
|
if (!($align & $this->HORIZONTAL_CENTER_ALIGN) && !($align & $this->HORIZONTAL_RIGHT_ALIGN)) {
|
||||||
|
$align |= $this->HORIZONTAL_LEFT_ALIGN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!($align & $this->VERTICAL_CENTER_ALIGN) && !($align & $this->VERTICAL_BOTTOM_ALIGN)) {
|
||||||
|
$align |= $this->VERTICAL_TOP_ALIGN;
|
||||||
|
}
|
||||||
|
|
||||||
|
$fontSize = 8;
|
||||||
|
$lineSpacing = 1;
|
||||||
|
|
||||||
|
list ($llx, $lly, $lrx, $lry, $urx, $ury, $ulx, $uly) = imageftbbox($fontSize, 0, $fontFileName, $text, array("linespacing" => $lineSpacing));
|
||||||
|
|
||||||
|
$textWidth = $lrx - $llx;
|
||||||
|
$textHeight = $lry - $ury;
|
||||||
|
|
||||||
|
$angle = 0;
|
||||||
|
|
||||||
|
if ($align & $this->HORIZONTAL_CENTER_ALIGN) {
|
||||||
|
$px -= $textWidth / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($align & $this->HORIZONTAL_RIGHT_ALIGN) {
|
||||||
|
$px -= $textWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($align & $this->VERTICAL_CENTER_ALIGN) {
|
||||||
|
$py += $textHeight / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($align & $this->VERTICAL_TOP_ALIGN) {
|
||||||
|
$py += $textHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
imagettftext($img, $fontSize, $angle, $px, $py, $color->getColor($img), $fontFileName, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print text centered horizontally on the image.
|
||||||
|
*
|
||||||
|
* @param Image GD image
|
||||||
|
* @param integer text coordinate (y)
|
||||||
|
* @param Color text color
|
||||||
|
* @param string text value
|
||||||
|
* @param string font file name
|
||||||
|
*/
|
||||||
|
public function printCentered($img, $py, $color, $text, $fontFileName) {
|
||||||
|
$this->printText($img, imagesx($img) / 2, $py, $color, $text, $fontFileName, $this->HORIZONTAL_CENTER_ALIGN | $this->VERTICAL_CENTER_ALIGN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print text in diagonal.
|
||||||
|
*
|
||||||
|
* @param Image GD image
|
||||||
|
* @param integer text coordinate (x)
|
||||||
|
* @param integer text coordinate (y)
|
||||||
|
* @param Color text color
|
||||||
|
* @param string text value
|
||||||
|
*/
|
||||||
|
public function printDiagonal($img, $px, $py, $color, $text) {
|
||||||
|
$fontSize = 8;
|
||||||
|
$fontFileName = $this->fontCondensed;
|
||||||
|
|
||||||
|
$lineSpacing = 1;
|
||||||
|
|
||||||
|
list ($lx, $ly, $rx, $ry) = imageftbbox($fontSize, 0, $fontFileName, $text, array("linespacing" => $lineSpacing));
|
||||||
|
$textWidth = $rx - $lx;
|
||||||
|
|
||||||
|
$angle = -45;
|
||||||
|
|
||||||
|
imagettftext($img, $fontSize, $angle, $px, $py, $color->getColor($img), $fontFileName, $text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
<?php
|
||||||
|
include("inc/session.inc.php");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php include("theme/header.php");?>
|
||||||
|
<section id="pageadmin">
|
||||||
|
|
||||||
|
<div class="auth">Vous êtes authentifié sous l'utilisateur : <?php echo $_SESSION['login']; ?>
|
||||||
|
<br />
|
||||||
|
<a href="inc/disconnect.inc.php">Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Informations générales</h2>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['$sent']) && $_GET['$sent'] == true && isset($_GET['$nbs']))
|
||||||
|
{$nbs = $_GET['$nbs']; $plt = $_GET['$plt']; echo '<p>'.$nbs.' mails viennent d\'être envoyés en '.$plt.' sec</p>';};
|
||||||
|
if (isset($_GET['$nbl']) && $_GET['$nbl'] == 0)
|
||||||
|
{$nbl = $_GET['$nbl']; echo '<p class="red">Le mail est envoyé à tous les coopérateurs ! L\'envoi de la convocation ou du rappel est terminé !</p>';};
|
||||||
|
if (isset($_GET['$nbl']) && $_GET['$nbl'] > 0)
|
||||||
|
{$nbl = $_GET['$nbl']; echo '<p>Il reste '.$nbl.' coopérateurs pour lesquels l\'envoi du mail n\'est pas effectué.</p>';};
|
||||||
|
if (isset($_GET['$generate']) && $_GET['$generate'] == true && isset($_GET['$nb']))
|
||||||
|
{$nb = $_GET['$nb']; echo '<p>'.$nb.' mots de passe viennent d\'être générés.</p>';};
|
||||||
|
if (isset($_GET['$generate']) && $_GET['$generate'] == false)
|
||||||
|
{echo '<p>Tous les mots de passe sont déjà générés !</p>';};
|
||||||
|
if (isset($_GET['$ungenerate']) && $_GET['$ungenerate'] == true)
|
||||||
|
{echo '<p class="red">Tous les mots de passe viennent d\'être effacés !</p>';};
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- LE CONTENU DE LA POPUP -->
|
||||||
|
<div id="dialog" title="RAZ des mots de passe">
|
||||||
|
<p>
|
||||||
|
Vous allez supprimer tous les mots de passe !<br />
|
||||||
|
Cette action ne devrait pas être effectuée si la vote n'est pas terminé.
|
||||||
|
</p>
|
||||||
|
<p class="raz-mdp txtctr"><a href='inc/ungenerate.php' title=''>Cliquez sur cette ligne pour confirmer.</a></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4>Mode d'emploi</h4>
|
||||||
|
<p>La première chose à faire est l'importation de la liste des coopérateurs dans la table "clients".</p>
|
||||||
|
<p>Il faut ensuite générer les mots de passe via le bouton du menu.</p>
|
||||||
|
<p>Une fois les mots de passe générés, on peut passer à l'activation du système de vote.</p>
|
||||||
|
<p>Enfin, il reste à envoyer les mails de convocation, toujours dans le menu.</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>État de la plateforme de vote</h4>
|
||||||
|
<?php
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
|
||||||
|
// Requête MySQL
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
|
||||||
|
// On regarde si le vote est ouvert
|
||||||
|
$option = 'vote_ouvert';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch(); ?>
|
||||||
|
|
||||||
|
<div class="admin-boxes">
|
||||||
|
État du vote :
|
||||||
|
<div class="onoffswitch">
|
||||||
|
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch"
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// On regarde si le vote est ouvert
|
||||||
|
$option = 'vote_ouvert';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
|
||||||
|
if($results['option_value'] == 0)
|
||||||
|
{
|
||||||
|
echo "checked";
|
||||||
|
}
|
||||||
|
?>>
|
||||||
|
<label class="onoffswitch-label" for="myonoffswitch">
|
||||||
|
<div class="onoffswitch-inner"></div>
|
||||||
|
<div class="onoffswitch-switch"></div>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// On regarde si les mots de passe sont générés
|
||||||
|
$option = 'pass_gen';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
echo "<div class='admin-boxes'>État des mots de passe :<br /><span>";
|
||||||
|
if ($results['option_value'] == 1) {echo "Générés</span><br /><button id='opener'>RAZ</button></div>";}
|
||||||
|
else { echo "Pas générés</span></div>";};
|
||||||
|
|
||||||
|
// On regarde le nombre de mails envoyés
|
||||||
|
$option = 'nb_mail_sent';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$nb_mail_sent = $results['option_value'];
|
||||||
|
$_SESSION['nb_mail_sent'] = $nb_mail_sent;
|
||||||
|
echo "<div class='admin-boxes'>";
|
||||||
|
if ($nb_mail_sent !== "0") {
|
||||||
|
echo "Nombre de mails envoyés :<br /><span>".$nb_mail_sent."</span></div>";
|
||||||
|
// On regade quand le dernier mail est parti
|
||||||
|
$option = 'last_mail_sent';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$last_mail_sent = $results['option_value'];
|
||||||
|
$_SESSION['last_mail_sent'] = $last_mail_sent;
|
||||||
|
echo "<div class='admin-boxes'>Dernier mail envoyé le :<br /><span>";
|
||||||
|
if ($last_mail_sent !== NULL) {echo $last_mail_sent."</span></div>";} else { echo "Pas de date ?!</span></div>";};
|
||||||
|
} else { echo "La convocation n'est pas envoyée.</span></div>";};
|
||||||
|
|
||||||
|
//Clore la requête
|
||||||
|
$stmt->closeCursor();
|
||||||
|
$stmt = null;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<h4>Bon à savoir</h4>
|
||||||
|
<p>La génération des mots de passe est effectuée uniquement pour les coopérateurs sans mot de passe.<br />Un mot de passe existant ne sera jamais remplacé.</p>
|
||||||
|
<p>Les mails sont envoyés pas paquets de 75. Vous serez averti dans la zone de notification s'il reste des coopérateurs n'ayant pas reçu le mail, ou s'il n'y a plus de mail à envoyer.</p>
|
||||||
|
<p>L'envoi des mails ignore systématiquement les coopérateurs ayant déjà voté.</p>
|
||||||
|
<p>L'envoi des mails utilise l'adresse ag@ouvaton.coop, créée sur le compte gl-ouv. La limite de mails/heure de cette adresse est de 4000.</p>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,56 @@
|
||||||
|
// Permet d'ajouter un champ dans le formulaire d'ajout de candidats au CS
|
||||||
|
// Limite à 20 le nombre de champ maximum
|
||||||
|
function add_candidat(i) {
|
||||||
|
var i2 = i + 1;
|
||||||
|
document.getElementById('add_'+i).innerHTML = '<ul class="conf_global_form"><li><label class="bold" for="cs[]">Prénom et Nom du candidat</label><input class="conf_cs" type="text" name="CS[]" value="" id="" /></li></ul>';
|
||||||
|
document.getElementById('add_'+i).innerHTML += (i <= 20) ? '<div id="add_'+i2+'"><p><a href="javascript:add_candidat('+i2+')">Ajouter un autre candidat</a></p></div>' : '';
|
||||||
|
}
|
||||||
|
// Gestion du bonton On/Off
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#myonoffswitch').click(function(){
|
||||||
|
var myonoffswitch=$('#myonoffswitch').val();
|
||||||
|
if ($("#myonoffswitch:checked").length == 0) {var a=1;} else {var a="0";}
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "inc/ajax.php",
|
||||||
|
data: "value="+a ,
|
||||||
|
success: function(html){
|
||||||
|
$("#display").html(html).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready( function(){
|
||||||
|
$(".cb-enable").click(function(){
|
||||||
|
var parent = $(this).parents('.switch');
|
||||||
|
$('.cb-disable',parent).removeClass('selected');
|
||||||
|
$(this).addClass('selected');
|
||||||
|
$('.checkbox',parent).attr('checked', true);
|
||||||
|
});
|
||||||
|
$(".cb-disable").click(function(){
|
||||||
|
var parent = $(this).parents('.switch');
|
||||||
|
$('.cb-enable',parent).removeClass('selected');
|
||||||
|
$(this).addClass('selected');
|
||||||
|
$('.checkbox',parent).attr('checked', false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Gestion du popup de suppression des mots de passe
|
||||||
|
$(function() {
|
||||||
|
$( "#dialog" ).dialog({
|
||||||
|
autoOpen: false,
|
||||||
|
show: {
|
||||||
|
effect: "blind",
|
||||||
|
duration: 100
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
effect: "explode",
|
||||||
|
duration: 100
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$( "#opener" ).click(function() {
|
||||||
|
$( "#dialog" ).dialog( "open" );
|
||||||
|
});
|
||||||
|
});
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,33 @@
|
||||||
|
// ParsleyConfig definition if not already set
|
||||||
|
window.ParsleyConfig = window.ParsleyConfig || {};
|
||||||
|
window.ParsleyConfig.i18n = window.ParsleyConfig.i18n || {};
|
||||||
|
|
||||||
|
// Define then the messages
|
||||||
|
window.ParsleyConfig.i18n.fr = $.extend(window.ParsleyConfig.i18n.fr || {}, {
|
||||||
|
defaultMessage: "Cette valeur semble non valide.",
|
||||||
|
type: {
|
||||||
|
email: "Cette valeur n'est pas une adresse email valide.",
|
||||||
|
url: "Cette valeur n'est pas une URL valide.",
|
||||||
|
number: "Cette valeur doit être un nombre.",
|
||||||
|
integer: "Cette valeur doit être un entier.",
|
||||||
|
digits: "Cette valeur doit être numérique.",
|
||||||
|
alphanum: "Cette valeur doit être alphanumérique."
|
||||||
|
},
|
||||||
|
notblank: "Cette valeur ne peut pas être vide.",
|
||||||
|
required: "Ce champ est requis.",
|
||||||
|
pattern: "Cette valeur semble non valide.",
|
||||||
|
min: "Cette valeur ne doit pas être inféreure à %s.",
|
||||||
|
max: "Cette valeur ne doit pas excéder %s.",
|
||||||
|
range: "Cette valeur doit être comprise entre %s et %s.",
|
||||||
|
minlength: "Cette chaîne est trop courte. Elle doit avoir au minimum %s caractères.",
|
||||||
|
maxlength: "Cette chaîne est trop longue. Elle doit avoir au maximum %s caractères.",
|
||||||
|
length: "Cette valeur doit contenir entre %s et %s caractères.",
|
||||||
|
mincheck: "Vous devez sélectionner au moins %s choix.",
|
||||||
|
maxcheck: "Vous devez sélectionner %s choix maximum.",
|
||||||
|
check: "Vous devez sélectionner entre %s et %s choix.",
|
||||||
|
equalto: "Cette valeur devrait être identique"
|
||||||
|
});
|
||||||
|
|
||||||
|
// If file is loaded after Parsley main file, auto-load locale
|
||||||
|
if ('undefined' !== typeof window.ParsleyValidator)
|
||||||
|
window.ParsleyValidator.addCatalog('fr', window.ParsleyConfig.i18n.fr, true);
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?php
|
||||||
|
include "inc/session.inc.php";
|
||||||
|
|
||||||
|
if (isset($_POST["csv"])) {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
$query = $bdd->query('SELECT reference, email, nom, prenom FROM clients');
|
||||||
|
// on paramètre le type de fichier, l'encodage, et le nom du fichier
|
||||||
|
header('Content-Type: text/csv; charset=utf-8');
|
||||||
|
header('Content-Disposition: attachment; filename=ListeDesCooperateurs.csv');
|
||||||
|
|
||||||
|
// on prépare un fichier lié au flux de sortie
|
||||||
|
$output = fopen('php://output', 'w');
|
||||||
|
|
||||||
|
// on paramètre le nom des colonnes
|
||||||
|
fputcsv($output, array('Numéro', 'EMail', 'Nom', 'Prénom'));
|
||||||
|
|
||||||
|
// on boucle et on alimente le fichier
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_ASSOC)) fputcsv($output, $results);
|
||||||
|
exit; // On évite d'ajouter le code html de la page au fichier
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php
|
||||||
|
include("theme/header.php");
|
||||||
|
?>
|
||||||
|
<section id="pageadmin">
|
||||||
|
|
||||||
|
<div class="auth">Vous êtes authentifié sous l'utilisateur : <?php echo $_SESSION['login']; ?>
|
||||||
|
<br />
|
||||||
|
<a href="inc/disconnect.inc.php">Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Listes des coopérateurs</h2>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
// Requête MySQL
|
||||||
|
$query = $bdd->query('SELECT reference, email, nom, prenom FROM clients');
|
||||||
|
// Si le retour est vide, on affiche un petit message
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
echo '<p>Nombre de coopérateurs appelés à voter : '.$query->rowCount().'</p>';
|
||||||
|
echo '<form method="post" action="listecooperateurs.php"><input type="submit" name="csv" value="Exporter au format CSV"></form>';
|
||||||
|
// On affiche les resultats
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
echo '<p>'.$results->reference.' / '.$results->email.' / '.$results->nom.' '.$results->prenom.'</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Clore la requête
|
||||||
|
$query->closeCursor();
|
||||||
|
$query = NULL;
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
include "inc/session.inc.php";
|
||||||
|
|
||||||
|
if (isset($_POST["csv"])) {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
$query = $bdd->query('SELECT reference, email, nom, prenom FROM clients WHERE vote = 0');
|
||||||
|
// on paramètre le type de fichier, l'encodage, et le nom du fichier
|
||||||
|
header('Content-Type: text/csv; charset=utf-8');
|
||||||
|
header('Content-Disposition: attachment; filename=ListeDesCooperateurs.csv');
|
||||||
|
|
||||||
|
// on prépare un fichier lié au flux de sortie
|
||||||
|
$output = fopen('php://output', 'w');
|
||||||
|
|
||||||
|
// on paramètre le nom des colonnes
|
||||||
|
fputcsv($output, array('Numéro', 'EMail', 'Nom', 'Prénom'));
|
||||||
|
|
||||||
|
// on boucle et on alimente le fichier
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_ASSOC)) fputcsv($output, $results);
|
||||||
|
exit; // On évite d'ajouter le code html de la page au fichier
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php
|
||||||
|
include("theme/header.php");
|
||||||
|
?>
|
||||||
|
<section id="pageadmin">
|
||||||
|
|
||||||
|
<div class="auth">Vous êtes authentifié sous l'utilisateur : <?php echo $_SESSION['login']; ?>
|
||||||
|
<br />
|
||||||
|
<a href="inc/disconnect.inc.php">Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Coopérateurs n'ayant pas voté</h2>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
|
||||||
|
// Requête MySQL
|
||||||
|
$query = $bdd->query('SELECT reference, email, nom, prenom FROM clients WHERE vote = 0');
|
||||||
|
// Si le retour est vide, on affiche un petit message
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
echo '<p>Nombre de coopérateurs n\'ayant pas encore voté : '.$query->rowCount().'</p>';
|
||||||
|
echo '<form method="post" action="listenonvotants.php"><input type="submit" name="csv" value="Exporter au format CSV"></form>';
|
||||||
|
// On affiche les resultats
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
echo "<p>".$results->reference." / ".$results->email." / ".$results->nom." ".$results->prenom."</p>";
|
||||||
|
}
|
||||||
|
} else { echo "Tous les coopérateurs ont voté !";}
|
||||||
|
//Clore la requête
|
||||||
|
$query->closeCursor();
|
||||||
|
$query = NULL
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
include "inc/session.inc.php";
|
||||||
|
|
||||||
|
if (isset($_POST["csv"])) {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
$query = $bdd->query('SELECT reference, email, nom, prenom FROM clients WHERE vote = 1');
|
||||||
|
// on paramètre le type de fichier, l'encodage, et le nom du fichier
|
||||||
|
header('Content-Type: text/csv; charset=utf-8');
|
||||||
|
header('Content-Disposition: attachment; filename=ListeDesCooperateurs.csv');
|
||||||
|
|
||||||
|
// on prépare un fichier lié au flux de sortie
|
||||||
|
$output = fopen('php://output', 'w');
|
||||||
|
|
||||||
|
// on paramètre le nom des colonnes
|
||||||
|
fputcsv($output, array('Numéro', 'EMail', 'Nom', 'Prénom'));
|
||||||
|
|
||||||
|
// on boucle et on alimente le fichier
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_ASSOC)) fputcsv($output, $results);
|
||||||
|
exit; // On évite d'ajouter le code html de la page au fichier
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php
|
||||||
|
include("theme/header.php");
|
||||||
|
?>
|
||||||
|
<section id="pageadmin">
|
||||||
|
|
||||||
|
<div class="auth">Vous êtes authentifié sous l'utilisateur : <?php echo $_SESSION['login']; ?>
|
||||||
|
<br />
|
||||||
|
<a href="inc/disconnect.inc.php">Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Coopérateurs ayant voté</h2>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
|
||||||
|
// Requête MySQL
|
||||||
|
$query = $bdd->query('SELECT reference, email, nom, prenom FROM clients WHERE vote = 1');
|
||||||
|
// Si le retour est vide, on affiche un petit message
|
||||||
|
if ($query->rowCount() > 0) {
|
||||||
|
echo '<p>Nombre de coopérateurs ayant déjà voté : '.$query->rowCount().'</p>';
|
||||||
|
echo '<form method="post" action="listevotants.php"><input type="submit" name="csv" value="Exporter au format CSV"></form>';
|
||||||
|
// On affiche les resultats
|
||||||
|
while ($results = $query->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
echo "<p>".$results->reference." / ".$results->email." / ".$results->nom." ".$results->prenom."</p>";
|
||||||
|
}
|
||||||
|
} else {echo '<p>Aucun vote pour le moment !</p>';}
|
||||||
|
//Clore la requête
|
||||||
|
$query->closeCursor();
|
||||||
|
$query = NULL
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,215 @@
|
||||||
|
<?php
|
||||||
|
include("inc/session.inc.php");
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/libchart.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
// On regarde si il y a une AGE
|
||||||
|
if (checkago()) {$ago = true;} else {$ago = false;}
|
||||||
|
if (checkage()) {$age = true;} else {$age = false;}
|
||||||
|
if (checkcs()) {$cs = true;} else {$cs = false;}
|
||||||
|
// Préparation de la requete MySQL
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// On regarde le nombre de résolution d'AGO qui sera important par la suite pour créer la page de résultats
|
||||||
|
if ($ago) {
|
||||||
|
$option = 'resolution_ago_nb';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_ago_nb = $results['option_value'];
|
||||||
|
}
|
||||||
|
// On regarde le nombre de résolution d'AGE qui sera important par la suite pour créer la page de résultats
|
||||||
|
if ($age) {
|
||||||
|
$option = 'resolution_age_nb';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_age_nb = $results['option_value'];
|
||||||
|
}
|
||||||
|
// On compte le total de vote pour la résolution
|
||||||
|
$sql ="SELECT COUNT(*) AS nb FROM resultats";
|
||||||
|
$stmt = $bdd->query($sql);
|
||||||
|
$nb = $stmt->fetch();
|
||||||
|
$r_all = $nb['nb'];
|
||||||
|
|
||||||
|
// On compte pour chaque résolution d'AGO le nombre de oui, non et d'abstention
|
||||||
|
if ($ago) {
|
||||||
|
for ($i = 1; $i <= $resolution_ago_nb; $i++) {
|
||||||
|
// On compte pour chaque choix possible le nombre de vote
|
||||||
|
$sql ="SELECT COUNT(*) FROM resultats WHERE resolution_ago_".$i." = ? GROUP BY resolution_ago_".$i;
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->execute(array('Oui'));
|
||||||
|
${'rago'.$i.'_oui'} = $stmt->fetchColumn();
|
||||||
|
$stmt->execute(array('Non'));
|
||||||
|
${'rago'.$i.'_non'} = $stmt->fetchColumn();
|
||||||
|
$stmt->execute(array('Abstention'));
|
||||||
|
${'rago'.$i.'_abst'} = $stmt->fetchColumn();
|
||||||
|
// Génération des graphs avec nos résultats
|
||||||
|
$chart = new HorizontalBarChart(600, 200);
|
||||||
|
$dataSet = new XYDataSet();
|
||||||
|
$dataSet->addPoint(new Point("Abstention", ${'rago'.$i.'_abst'}));
|
||||||
|
$dataSet->addPoint(new Point("Non", ${'rago'.$i.'_non'}));
|
||||||
|
$dataSet->addPoint(new Point("Oui", ${'rago'.$i.'_oui'}));
|
||||||
|
$chart->setDataSet($dataSet);
|
||||||
|
$chart->setTitle("Résultat pour la résolution d'AGO n°".$i);
|
||||||
|
$chart->render("img/resolution_ago_".$i.".png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// On compte pour chaque résolution d'AGE le nombre de oui, non et d'abstention
|
||||||
|
if ($age) {
|
||||||
|
for ($i = 1; $i <= $resolution_age_nb; $i++) {
|
||||||
|
// On compte pour chaque choix possible le nombre de vote
|
||||||
|
$sql ="SELECT COUNT(*) FROM resultats WHERE resolution_age_".$i." = ? GROUP BY resolution_age_".$i;
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->execute(array('Oui'));
|
||||||
|
${'rage'.$i.'_oui'} = $stmt->fetchColumn();
|
||||||
|
$stmt->execute(array('Non'));
|
||||||
|
${'rage'.$i.'_non'} = $stmt->fetchColumn();
|
||||||
|
$stmt->execute(array('Abstention'));
|
||||||
|
${'rage'.$i.'_abst'} = $stmt->fetchColumn();
|
||||||
|
// Génération des graphs avec nos résultats
|
||||||
|
$chart = new HorizontalBarChart(600, 200);
|
||||||
|
$dataSet = new XYDataSet();
|
||||||
|
$dataSet->addPoint(new Point("Abstention", ${'rage'.$i.'_abst'}));
|
||||||
|
$dataSet->addPoint(new Point("Non", ${'rage'.$i.'_non'}));
|
||||||
|
$dataSet->addPoint(new Point("Oui", ${'rage'.$i.'_oui'}));
|
||||||
|
$chart->setDataSet($dataSet);
|
||||||
|
$chart->setTitle("Résultat pour la résolution d'AGE n°".$i);
|
||||||
|
$chart->render("img/resolution_age_".$i.".png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// On compte le total de vote pour le CS
|
||||||
|
if ($cs) {
|
||||||
|
$sql = "SELECT vote_cs FROM resultats";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->execute();
|
||||||
|
$nb_vote = $stmt->rowCount();
|
||||||
|
// On compte le nombre d'absention au vote pour le CS
|
||||||
|
$sql = "SELECT vote_cs FROM resultats WHERE vote_cs = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$option = 'Abstention';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$nb_abstention_cs = $stmt->rowCount();
|
||||||
|
|
||||||
|
// On prépare la création du graph pour le CS
|
||||||
|
$chart = new PieChart(600, 400);
|
||||||
|
$dataSet = new XYDataSet();
|
||||||
|
// On va chercher la liste des candidats au CS
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$option = 'cs_candidats';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$cs_candidats = $results['option_value'];
|
||||||
|
$cs_candidats = explode(",",$cs_candidats);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php
|
||||||
|
include("theme/header.php");
|
||||||
|
?>
|
||||||
|
<section id="pageresults">
|
||||||
|
|
||||||
|
<div class="auth">Vous êtes authentifié sous l'utilisateur : <?php echo $_SESSION['login']; ?>
|
||||||
|
<br />
|
||||||
|
<a href="inc/disconnect.inc.php">Se déconnecter</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Résultats</h2>
|
||||||
|
<p>
|
||||||
|
<span class="bold">Nombre de votes total : <?php echo $r_all ?></span>
|
||||||
|
<!-- # <br />
|
||||||
|
<span class="bold">Nombre de votes total : <?php echo $nb_vote ?></span> -->
|
||||||
|
</p>
|
||||||
|
<hr class="clr" />
|
||||||
|
<div>
|
||||||
|
<?php if ($ago) { ?>
|
||||||
|
<h2>Résolutions de l'Assemblée Générale Ordinaire</h2>
|
||||||
|
<?php for ($i = 1; $i <= $resolution_ago_nb; $i++) { ?>
|
||||||
|
<h2>Résolution <?php echo $i; ?></h2>
|
||||||
|
<p>
|
||||||
|
<span class="result_pres">Oui :<br /><?php echo ${'rago'.$i.'_oui'}; ?></span>
|
||||||
|
<span class="result_pres">Non :<br /><?php echo ${'rago'.$i.'_non'}; ?></span>
|
||||||
|
<span class="result_pres">Abstention :<br /> <?php echo ${'rago'.$i.'_abst'}; ?></span>
|
||||||
|
</p>
|
||||||
|
<p><img src="img/resolution_ago_<?php echo $i; ?>.png" /></p>
|
||||||
|
|
||||||
|
<hr class="clr" />
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($age) { ?>
|
||||||
|
<div>
|
||||||
|
<h2>Résolutions de l'Assemblée Générale Extraordinaire</h2>
|
||||||
|
<?php
|
||||||
|
for ($i = 1; $i <= $resolution_age_nb; $i++) { ?>
|
||||||
|
<h2>Résolution <?php echo $i; ?></h2>
|
||||||
|
<p>
|
||||||
|
<span class="result_pres">Oui :<br /><?php echo ${'rage'.$i.'_oui'}; ?></span>
|
||||||
|
<span class="result_pres">Non :<br /><?php echo ${'rage'.$i.'_non'}; ?></span>
|
||||||
|
<span class="result_pres">Abstention :<br /> <?php echo ${'rage'.$i.'_abst'}; ?></span>
|
||||||
|
</p>
|
||||||
|
<p><img src="img/resolution_age_<?php echo $i; ?>.png" /></p>
|
||||||
|
|
||||||
|
<hr class="clr" />
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
|
||||||
|
if ($cs) { ?>
|
||||||
|
<h2>Élection des membres du CS</h2>
|
||||||
|
<p><?php
|
||||||
|
// Pour chaque candidat on va créer une variable pour compter le nombre de vote pour ce candidat
|
||||||
|
foreach ($cs_candidats AS $element) {
|
||||||
|
$element2 = str_replace(' ', '_', $element);
|
||||||
|
${'vote_'.$element2} = 0;
|
||||||
|
$sql = "SELECT vote_cs FROM resultats";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->execute();
|
||||||
|
// On fait le tour des résultats à chaque candidat, et on incrémente le compteur de vote à chaque vote pour ce candidat
|
||||||
|
while ($results = $stmt->fetch()) {
|
||||||
|
foreach($results AS $ligne) {
|
||||||
|
$ligne = explode(",",$ligne);
|
||||||
|
if (in_array("$element", $ligne)) {${'vote_'.$element2}++;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${'vote_'.$element2} = ${'vote_'.$element2} / 2;
|
||||||
|
// Le tour des résultats est terminé, on génére un point sur le graph avec le nom et le nombre de vote pour ce candidat
|
||||||
|
$dataSet->addPoint(new Point($element, ${'vote_'.$element2}));
|
||||||
|
// On ajoute une ligne texte en plus du graph
|
||||||
|
echo '<span class="result_pres_cs">'.$element.' :<br />'.${'vote_'.$element2}.' voix</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Clore la requête
|
||||||
|
$stmt->closeCursor();
|
||||||
|
$stmt = NULL;
|
||||||
|
// On finalise le graph CS
|
||||||
|
$chart->setDataSet($dataSet);
|
||||||
|
$chart->setTitle("Résultat pour l'élection des membres du CS");
|
||||||
|
$chart->render("img/vote_cs2.png");
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p class="clr"><img src="img/vote_cs2.png" /></p>
|
||||||
|
<p>Abstention : <?php echo $nb_abstention_cs; ?></p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>Ouvaton - Administration - AG <?php echo date('Y');?></title>
|
||||||
|
<meta name="description" content="Administration du site de vote en ligne de la coopérative d'hébergement Ouvaton.coop">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="css/normalize.css">
|
||||||
|
<link rel="stylesheet" href="css/main.css">
|
||||||
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||||
|
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<footer class="clearfix">
|
||||||
|
<p><a href="https://ouvaton.coop" title="La coopérative d'hébergement numérique">Ouvaton.coop</a> - <?php echo date('Y');?></p>
|
||||||
|
</footer>
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<header>
|
||||||
|
<img id="top-bg" src="img/main_top.png" alt="les couleurs d'Ouvaton" />
|
||||||
|
<h1>Administration - Assemblée Générale <?php echo date('Y'); ?></h1>
|
||||||
|
|
||||||
|
<ul id="navigationMenu">
|
||||||
|
<li><a class="home" href="index.php"><i class="fa fa-home fa-2x"></i><span>Home</span></a></li>
|
||||||
|
<li><a class="password" href="inc/generate.php"><i class="fa fa-key fa-2x"></i><span>Générer les mots de passe</span></a></li>
|
||||||
|
<li><a class="mail" href="inc/mail.inc.php"><i class="fa fa-share fa-2x"></i><span>Envoyer les mails</span></a></li>
|
||||||
|
<li><a class="listecooperateurs" href="listecooperateurs.php"><i class="fa fa-list fa-2x"></i><span>Tous les coopérateurs</span></a></li>
|
||||||
|
<li><a class="listevotants" href="listevotants.php"><i class="fa fa-check fa-2x"></i><span>Les coopérateurs ayant votés</span></a></li>
|
||||||
|
<li><a class="listenonvotants" href="listenonvotants.php"><i class="fa fa-bed fa-2x"></i><span>Les coopérateurs n'ayant pas votés</span></a></li>
|
||||||
|
<li><a class="resultats" href="resultats.php"><i class="fa fa-bar-chart fa-2x"></i><span>Voir les résultats</span></a></li>
|
||||||
|
<li><a class="config" href="config.php"><i class="fa fa-cogs fa-2x"></i><span>Configuration</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</header>
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
|
||||||
|
<cross-domain-policy>
|
||||||
|
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
|
||||||
|
|
||||||
|
<!-- Most restrictive policy: -->
|
||||||
|
<site-control permitted-cross-domain-policies="none"/>
|
||||||
|
|
||||||
|
<!-- Least restrictive policy: -->
|
||||||
|
<!--
|
||||||
|
<site-control permitted-cross-domain-policies="all"/>
|
||||||
|
<allow-access-from domain="*" to-ports="*" secure="false"/>
|
||||||
|
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
|
||||||
|
-->
|
||||||
|
</cross-domain-policy>
|
||||||
|
|
@ -0,0 +1,500 @@
|
||||||
|
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* What follows is the result of much research on cross-browser styling.
|
||||||
|
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
|
||||||
|
* Kroc Camen, and the H5BP dev community and team.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Base styles: opinionated defaults
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
html,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
line-height: 1.4;
|
||||||
|
font: 1em/1.4em "Droid Sans",Helvetica,Arial,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove text-shadow in selection highlight: h5bp.com/i
|
||||||
|
* These selection rule sets have to be separate.
|
||||||
|
* Customize the background color to match your design.
|
||||||
|
*/
|
||||||
|
|
||||||
|
::-moz-selection {
|
||||||
|
background: #b3d4fc;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
background: #b3d4fc;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A better looking default horizontal rule
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
display: block;
|
||||||
|
height: 1px;
|
||||||
|
border: 0;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
margin: 1em 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove the gap between images, videos, audio and canvas and the bottom of
|
||||||
|
* their containers: h5bp.com/i/440
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
img,
|
||||||
|
video {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove default fieldset styles.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allow only vertical resizing of textareas.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Browse Happy prompt
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.browsehappy {
|
||||||
|
margin: 0.2em 0;
|
||||||
|
background: #ccc;
|
||||||
|
color: #000;
|
||||||
|
padding: 0.2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Author's custom styles
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
.mt1 {margin-top:1em;}
|
||||||
|
.mr1 {margin-right:1em;}
|
||||||
|
.mb1 {margin-bottom:1em;}
|
||||||
|
.ml1 {margin-left:1em;}
|
||||||
|
.mt2 {margin-top:2em;}
|
||||||
|
.mr2 {margin-right:2em;}
|
||||||
|
.mb2 {margin-bottom:2em;}
|
||||||
|
.ml2 {margin-left:2em;}
|
||||||
|
.pt1 {padding-top:1em;}
|
||||||
|
.pr1 {padding-right:1em;}
|
||||||
|
.pb1 {padding-bottom:1em;}
|
||||||
|
.pl1 {padding-left:1em;}
|
||||||
|
.pt2 {padding-top:2em;}
|
||||||
|
.pr2 {padding-right:2em;}
|
||||||
|
.pb2 {padding-bottom:2em;}
|
||||||
|
.pl2 {padding-left:2em;}
|
||||||
|
.red {color: red; text-align: center;}
|
||||||
|
.bold {font-weight: bold;}
|
||||||
|
.ctr {text-align: center;}
|
||||||
|
input {
|
||||||
|
border: 1px solid #999;
|
||||||
|
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
width: 1.8em;
|
||||||
|
}
|
||||||
|
input[type=submit] {
|
||||||
|
width:10em;
|
||||||
|
background:#004F9B;
|
||||||
|
color:#fff;
|
||||||
|
height:30px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
#identform input, #checkvoteform input {
|
||||||
|
width:100%;;
|
||||||
|
display:block;
|
||||||
|
height: 1.8em;
|
||||||
|
padding-left: 0.4em;
|
||||||
|
}
|
||||||
|
#identform input[type=submit], #checkvoteform input[type=submit] {
|
||||||
|
width:10em;
|
||||||
|
margin-top: 1em;
|
||||||
|
background:#004F9B;
|
||||||
|
color:#fff;
|
||||||
|
height:30px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
input[type=submit]:hover {
|
||||||
|
background:#fff;
|
||||||
|
color:#004F9B;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
#top-bg {
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
header h1 {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
||||||
|
header h1,header h4 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
section {
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
#vote legend {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#checkvoteform h3, #identform h3 {
|
||||||
|
text-align : center;
|
||||||
|
}
|
||||||
|
#checkvoteform p, #identform p {
|
||||||
|
text-align : justify;
|
||||||
|
}
|
||||||
|
#identform {
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin: 30px 0px;
|
||||||
|
padding: 0.5em 1em 2em;
|
||||||
|
box-shadow: 0px 0px 2px;
|
||||||
|
height: auto;
|
||||||
|
min-height: 15em;
|
||||||
|
}
|
||||||
|
#checkvoteform {
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin: 30px 0px;
|
||||||
|
padding: 0.5em 1em 2em;
|
||||||
|
box-shadow: 0px 0px 2px;
|
||||||
|
height: auto;
|
||||||
|
min-height: 15em;
|
||||||
|
}
|
||||||
|
#pageexpl {
|
||||||
|
text-align: justify;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.submit-like {
|
||||||
|
width:15em;
|
||||||
|
background:#004F9B;
|
||||||
|
color:#fff;
|
||||||
|
height:30px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 1px solid #999;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-like:hover {
|
||||||
|
background:#fff;
|
||||||
|
color:#004F9B;
|
||||||
|
}
|
||||||
|
#pagevote {
|
||||||
|
text-align: justify;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
#pagevote h3, h4, #pagevote input, #pagevote p.formvote {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#pagevote span.candidats {
|
||||||
|
width: 40%;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 0.5em 0;
|
||||||
|
}
|
||||||
|
#pagefinal {
|
||||||
|
text-align: justify;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
#pagemerci {
|
||||||
|
text-align: justify;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
#pagefinal h3, h4, #pagefinal p.formvote {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#pagefinal input[type="submit"] {
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
li.parsley-required {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
li.parsley-mincheck {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
footer {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 2em;
|
||||||
|
border-top: 1px solid #222;
|
||||||
|
}
|
||||||
|
footer a {
|
||||||
|
color: #222 ;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
#pageresults {
|
||||||
|
text-align: center;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.result_pres {
|
||||||
|
width: 12%;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 1.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#parsley-id-multiple-CS {
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
/* ==========================================================================
|
||||||
|
Helper classes
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Image replacement
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ir {
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
/* IE 6/7 fallback */
|
||||||
|
*text-indent: -9999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ir:before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 0;
|
||||||
|
height: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hide from both screenreaders and browsers: h5bp.com/u
|
||||||
|
*/
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none !important;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hide only visually, but have it available for screenreaders: h5bp.com/v
|
||||||
|
*/
|
||||||
|
|
||||||
|
.visuallyhidden {
|
||||||
|
border: 0;
|
||||||
|
clip: rect(0 0 0 0);
|
||||||
|
height: 1px;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extends the .visuallyhidden class to allow the element to be focusable
|
||||||
|
* when navigated to via the keyboard: h5bp.com/p
|
||||||
|
*/
|
||||||
|
|
||||||
|
.visuallyhidden.focusable:active,
|
||||||
|
.visuallyhidden.focusable:focus {
|
||||||
|
clip: auto;
|
||||||
|
height: auto;
|
||||||
|
margin: 0;
|
||||||
|
overflow: visible;
|
||||||
|
position: static;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hide visually and from screenreaders, but maintain layout
|
||||||
|
*/
|
||||||
|
|
||||||
|
.invisible {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clearfix: contain floats
|
||||||
|
*
|
||||||
|
* For modern browsers
|
||||||
|
* 1. The space content is one way to avoid an Opera bug when the
|
||||||
|
* `contenteditable` attribute is included anywhere else in the document.
|
||||||
|
* Otherwise it causes space to appear at the top and bottom of elements
|
||||||
|
* that receive the `clearfix` class.
|
||||||
|
* 2. The use of `table` rather than `block` is only necessary if using
|
||||||
|
* `:before` to contain the top-margins of child elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.clearfix:before,
|
||||||
|
.clearfix:after {
|
||||||
|
content: " "; /* 1 */
|
||||||
|
display: table; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For IE 6/7 only
|
||||||
|
* Include this rule to trigger hasLayout and contain floats.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.clearfix {
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
EXAMPLE Media Queries for Responsive Design.
|
||||||
|
These examples override the primary ('mobile first') styles.
|
||||||
|
Modify as content requires.
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
@media only screen and (min-width: 832px) {
|
||||||
|
#identform {
|
||||||
|
width: 40%;
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 4%;
|
||||||
|
}
|
||||||
|
#checkvoteform {
|
||||||
|
width: 40%;
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 2%;
|
||||||
|
}
|
||||||
|
#identform input, #checkvoteform input {
|
||||||
|
width: 70%
|
||||||
|
}
|
||||||
|
#pageexpl {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
#pagevote {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
#pagefinal {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
#pagemerci {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print,
|
||||||
|
(-o-min-device-pixel-ratio: 5/4),
|
||||||
|
(-webkit-min-device-pixel-ratio: 1.25),
|
||||||
|
(min-resolution: 120dpi) {
|
||||||
|
/* Style adjustments for high resolution devices */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Print styles.
|
||||||
|
Inlined to avoid required HTTP connection: h5bp.com/r
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
* {
|
||||||
|
background: transparent !important;
|
||||||
|
color: #000 !important; /* Black prints faster: h5bp.com/s */
|
||||||
|
box-shadow: none !important;
|
||||||
|
text-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
a:visited {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a[href]:after {
|
||||||
|
content: " (" attr(href) ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr[title]:after {
|
||||||
|
content: " (" attr(title) ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't show links for images, or javascript/internal links
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ir a:after,
|
||||||
|
a[href^="javascript:"]:after,
|
||||||
|
a[href^="#"]:after {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
blockquote {
|
||||||
|
border: 1px solid #999;
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
display: table-header-group; /* h5bp.com/t */
|
||||||
|
}
|
||||||
|
|
||||||
|
tr,
|
||||||
|
img {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@page {
|
||||||
|
margin: 0.5cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
p,
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
orphans: 3;
|
||||||
|
widows: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
page-break-after: avoid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,527 @@
|
||||||
|
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
HTML5 display definitions
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
article,
|
||||||
|
aside,
|
||||||
|
details,
|
||||||
|
figcaption,
|
||||||
|
figure,
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
hgroup,
|
||||||
|
main,
|
||||||
|
nav,
|
||||||
|
section,
|
||||||
|
summary {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
video {
|
||||||
|
display: inline-block;
|
||||||
|
*display: inline;
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent modern browsers from displaying `audio` without controls.
|
||||||
|
* Remove excess height in iOS 5 devices.
|
||||||
|
*/
|
||||||
|
|
||||||
|
audio:not([controls]) {
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
|
||||||
|
* Known issue: no IE 6 support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Base
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
|
||||||
|
* `em` units.
|
||||||
|
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||||
|
* user zoom.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 100%; /* 1 */
|
||||||
|
-ms-text-size-adjust: 100%; /* 2 */
|
||||||
|
-webkit-text-size-adjust: 100%; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `font-family` inconsistency between `textarea` and other form
|
||||||
|
* elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
html,
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margins handled incorrectly in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Links
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `outline` inconsistency between Chrome and other browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:focus {
|
||||||
|
outline: thin dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve readability when focused and also mouse hovered in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
a:active,
|
||||||
|
a:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Typography
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address font sizes and margins set differently in IE 6/7.
|
||||||
|
* Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
|
||||||
|
* and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.6em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.4em;
|
||||||
|
margin: 0.83em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.17em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1em;
|
||||||
|
margin: 1.33em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 0.83em;
|
||||||
|
margin: 1.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 0.67em;
|
||||||
|
margin: 2.33em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 7/8/9, Safari 5, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
abbr[title] {
|
||||||
|
border-bottom: 1px dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 1em 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in Safari 5 and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dfn {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address differences between Firefox and other browsers.
|
||||||
|
* Known issue: no IE 6/7 normalization.
|
||||||
|
*/
|
||||||
|
|
||||||
|
hr {
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address styling not present in IE 6/7/8/9.
|
||||||
|
*/
|
||||||
|
|
||||||
|
mark {
|
||||||
|
background: #ff0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margins set differently in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
p,
|
||||||
|
pre {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
pre,
|
||||||
|
samp {
|
||||||
|
font-family: monospace, serif;
|
||||||
|
_font-family: 'courier new', monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Improve readability of pre-formatted text in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pre {
|
||||||
|
white-space: pre;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address CSS quotes not supported in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address `quotes` property not supported in Safari 4.
|
||||||
|
*/
|
||||||
|
|
||||||
|
q:before,
|
||||||
|
q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent and variable font size in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Lists
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margins set differently in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dl,
|
||||||
|
menu,
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin: 0 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address paddings set differently in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
menu,
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
padding: 0 0 0 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct list images handled incorrectly in IE 7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
nav ul,
|
||||||
|
nav ol {
|
||||||
|
list-style: none;
|
||||||
|
list-style-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Embedded content
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
|
||||||
|
* 2. Improve image quality when scaled in IE 7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0; /* 1 */
|
||||||
|
-ms-interpolation-mode: bicubic; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct overflow displayed oddly in IE 9.
|
||||||
|
*/
|
||||||
|
|
||||||
|
svg:not(:root) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Figures
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
figure {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Forms
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Correct margin displayed oddly in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define consistent border, margin, and padding.
|
||||||
|
*/
|
||||||
|
|
||||||
|
fieldset {
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 0.35em 0.625em 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct color not being inherited in IE 6/7/8/9.
|
||||||
|
* 2. Correct text not wrapping in Firefox 3.
|
||||||
|
* 3. Correct alignment displayed oddly in IE 6/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
legend {
|
||||||
|
border: 0; /* 1 */
|
||||||
|
padding: 0;
|
||||||
|
white-space: normal; /* 2 */
|
||||||
|
*margin-left: -7px; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Correct font size not being inherited in all browsers.
|
||||||
|
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
|
||||||
|
* and Chrome.
|
||||||
|
* 3. Improve appearance and consistency in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-size: 100%; /* 1 */
|
||||||
|
margin: 0; /* 2 */
|
||||||
|
vertical-align: baseline; /* 3 */
|
||||||
|
*vertical-align: middle; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
|
||||||
|
* the UA stylesheet.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
input {
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||||
|
* All other form control elements do not inherit `text-transform` values.
|
||||||
|
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
|
||||||
|
* Correct `select` style inheritance in Firefox 4+ and Opera.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||||
|
* and `video` controls.
|
||||||
|
* 2. Correct inability to style clickable `input` types in iOS.
|
||||||
|
* 3. Improve usability and consistency of cursor style between image-type
|
||||||
|
* `input` and others.
|
||||||
|
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
|
||||||
|
* Known issue: inner spacing remains in IE 6.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button,
|
||||||
|
html input[type="button"], /* 1 */
|
||||||
|
input[type="reset"],
|
||||||
|
input[type="submit"] {
|
||||||
|
-webkit-appearance: button; /* 2 */
|
||||||
|
cursor: pointer; /* 3 */
|
||||||
|
*overflow: visible; /* 4 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Re-set default cursor for disabled elements.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button[disabled],
|
||||||
|
html input[disabled] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Address box sizing set to content-box in IE 8/9.
|
||||||
|
* 2. Remove excess padding in IE 8/9.
|
||||||
|
* 3. Remove excess padding in IE 7.
|
||||||
|
* Known issue: excess padding remains in IE 6.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
box-sizing: border-box; /* 1 */
|
||||||
|
padding: 0; /* 2 */
|
||||||
|
*height: 13px; /* 3 */
|
||||||
|
*width: 13px; /* 3 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||||
|
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||||
|
* (include `-moz` to future-proof).
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"] {
|
||||||
|
-webkit-appearance: textfield; /* 1 */
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
-webkit-box-sizing: content-box; /* 2 */
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and search cancel button in Safari 5 and Chrome
|
||||||
|
* on OS X.
|
||||||
|
*/
|
||||||
|
|
||||||
|
input[type="search"]::-webkit-search-cancel-button,
|
||||||
|
input[type="search"]::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove inner padding and border in Firefox 3+.
|
||||||
|
*/
|
||||||
|
|
||||||
|
button::-moz-focus-inner,
|
||||||
|
input::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
|
||||||
|
* 2. Improve readability and alignment in all browsers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
overflow: auto; /* 1 */
|
||||||
|
vertical-align: top; /* 2 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ==========================================================================
|
||||||
|
Tables
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove most spacing between table cells.
|
||||||
|
*/
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// Si la session n'existe plus
|
||||||
|
if (empty($_SESSION['reference'])) {
|
||||||
|
header('Location: index.php?$disconnect=true');}
|
||||||
|
else {
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
$reference = $_SESSION['reference'];
|
||||||
|
// Requête préparée et marqueur nominatif sur la reference
|
||||||
|
$stmt = $bdd->prepare("SELECT nom,prenom,email FROM clients WHERE reference = :reference");
|
||||||
|
$stmt->execute(array ('reference' =>$reference));
|
||||||
|
|
||||||
|
if ($stmt->rowCount() !== 0) {
|
||||||
|
while ($ligne = $stmt->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
// On déclare les variables de session
|
||||||
|
$_SESSION['prenom'] = $ligne->prenom;
|
||||||
|
$_SESSION['nom'] = $ligne->nom;
|
||||||
|
$_SESSION['email'] = $ligne->email;
|
||||||
|
}
|
||||||
|
} else header('Location: index.php?$unknow=true');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Le coopérateur à déjà voté ?
|
||||||
|
$sql = 'SELECT vote FROM clients WHERE reference = :reference';
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->execute(array ('reference' => $_SESSION['reference']));
|
||||||
|
while ($results = $stmt->fetch(PDO::FETCH_OBJ)) {
|
||||||
|
// Si déjà voté, on redirige vers index.php avec un message d'avertissement
|
||||||
|
if ($results->vote == 1) {
|
||||||
|
header('Location: index.php?$voted=true');
|
||||||
|
// On vide les variables de session
|
||||||
|
$_SESSION = array();
|
||||||
|
// On détruit la session
|
||||||
|
session_destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// On va chercher l'url des documents relatifs à l'AG
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$option = 'url_docs';
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$url_docs = $results['option_value'];
|
||||||
|
$stmt = null;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php include("theme/header.php"); ?>
|
||||||
|
<section id="pageexpl">
|
||||||
|
<p>Bonjour <?php echo $_SESSION['prenom']." ".$_SESSION['nom']; ?>, et bienvenue sur la plateforme de vote en ligne d'Ouvaton !</p>
|
||||||
|
<p>
|
||||||
|
Vous allez pouvoir voter grâce au formulaire de vote en ligne.<br />
|
||||||
|
Ce formulaire comprend les résolutions pour cette Assemblée Générale Ordinaire, ainsi que le vote pour l'élection des membres du Conseil de Surveillance.
|
||||||
|
<!-- # Ce formulaire comprend les résolutions pour cette Assemblée Générale Mixte (ordinaire et extraordinaire), ainsi que le vote pour l'élection des membres du Conseil de Surveillance. -->
|
||||||
|
<!-- # Ce formulaire comprend les résolutions pour cette Assemblée Générale Extraordinaire. -->
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Vous pouvez consulter les documents relatifs à l’Assemblée Générale 2019 sur le site de la coopérative, à l'adresse
|
||||||
|
<a href="<?php echo $url_docs; ?>" title="Les documents de l'AG" target="_blank"><?php echo $url_docs; ?></a>.<br />
|
||||||
|
Vous y trouverez les différents rapports (du Directoire, du Conseil de Surveillance), les comptes et la présentation des candidats au Conseil de Surveillance.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Pour garantir la sécurité et la confidentialité de votre vote, ce site utilise HTTPS pour chiffrer la connexion, et un système de vote qui ne permet pas de faire un lien entre les votes enregistrés et les coopérateurs inscrits.<br />
|
||||||
|
Une clé unique est générée lors de votre vote. Cette clé n'est connue que de vous seul-e, et elle vous permet de vérifier à tout moment que les données de votre vote sont bien enregistrées et ne sont pas modifiées.
|
||||||
|
<p>
|
||||||
|
<p>Voilà, il ne vous reste plus qu'à voter !</p>
|
||||||
|
<p class="mt2 ctr"><a class="submit-like" href="vote.php">Accéder au formulaire de vote</a></p>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// Si la session n'existe plus
|
||||||
|
if (empty($_SESSION['reference'])) {
|
||||||
|
header('Location: index.php?$disconnect=true');
|
||||||
|
}
|
||||||
|
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
include("inc/fonctions.inc.php");
|
||||||
|
// On regarde si il y a une AGO, AGE et vote CS
|
||||||
|
if (checkago()) {$ago = true;} else {$ago = false;}
|
||||||
|
if (checkage()) {$age = true;} else {$age = false;}
|
||||||
|
if (checkcs()) {$cs = true;} else {$cs = false;}
|
||||||
|
if ($ago) {
|
||||||
|
$resolution_ago_nb = $_SESSION['resolution_ago_nb'];
|
||||||
|
}
|
||||||
|
if ($age) {
|
||||||
|
$resolution_age_nb = $_SESSION['resolution_age_nb'];
|
||||||
|
}
|
||||||
|
if (isset($_POST['confirm'])) {
|
||||||
|
// On crée une clé unique pour vérifier plus tard le vote
|
||||||
|
$cle = bin2hex(openssl_random_pseudo_bytes(10));
|
||||||
|
// TODO : Il faut vérifier si la clé n'existe pas déjà
|
||||||
|
$_SESSION['cle'] = $cle;
|
||||||
|
|
||||||
|
if ($ago) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_ago_nb']; $i++) {
|
||||||
|
echo $_SESSION['resolution_ago_'.$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($age) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_age_nb']; $i++) {
|
||||||
|
echo $_SESSION['resolution_age_'.$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// On insère les résultats dans la bdd
|
||||||
|
// La requête $sql est compliquée à écrire puisqu'il faut la construire en fonction du nombre de résolutions
|
||||||
|
$sql = "INSERT INTO resultats (";
|
||||||
|
if ($ago) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_ago_nb']; $i++) {
|
||||||
|
$sql .= 'resolution_ago_'.$i.',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($age) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_age_nb']; $i++) {
|
||||||
|
$sql .= 'resolution_age_'.$i.',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($cs) {
|
||||||
|
$sql .= "vote_cs,";
|
||||||
|
}
|
||||||
|
$sql .= "cle) VALUES (";
|
||||||
|
|
||||||
|
if ($ago) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_ago_nb']; $i++) {
|
||||||
|
$sql .= ':resolution_ago_'.$i.',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($age) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_age_nb']; $i++) {
|
||||||
|
$sql .= ':resolution_age_'.$i.',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($cs) {
|
||||||
|
$sql .= ":vote_cs,";
|
||||||
|
}
|
||||||
|
$sql .= ":cle)";
|
||||||
|
echo $sql;
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
if ($ago) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_ago_nb']; $i++) {
|
||||||
|
$stmt->bindParam(':resolution_ago_'.$i, $_SESSION['resolution_ago_'.$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($age) {
|
||||||
|
for ($i = 1; $i <= $_SESSION['resolution_age_nb']; $i++) {
|
||||||
|
$stmt->bindParam(':resolution_age_'.$i, $_SESSION['resolution_age_'.$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($cs) {
|
||||||
|
$stmt->bindParam(':vote_cs', $_SESSION['vote_cs']);
|
||||||
|
}
|
||||||
|
$stmt->bindParam(':cle', $cle);
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
// On passe le booleen à true pour marquer que cette référence à déjà voté
|
||||||
|
$sql ="
|
||||||
|
UPDATE clients
|
||||||
|
SET vote = 1
|
||||||
|
WHERE reference = :ref
|
||||||
|
";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
$stmt->bindParam(':ref', $_SESSION['reference'], PDO::PARAM_STR);
|
||||||
|
// Exécution de la requête
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt = null;
|
||||||
|
|
||||||
|
header('Location: merci.php');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<?php include("theme/_head.php"); ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
<?php
|
||||||
|
include("theme/header.php");
|
||||||
|
include("inc/config.inc.php");
|
||||||
|
include("inc/connect.inc.php");
|
||||||
|
?>
|
||||||
|
<section id="pagefinal">
|
||||||
|
<p class="bold">En dernière étape, merci maintenant de vérifier et de confirmer votre vote.</p>
|
||||||
|
<?php if ($ago) { ?>
|
||||||
|
<h3>Résolutions d'Assemblée Générale Ordinaire</h3>
|
||||||
|
<?php
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// On boucle pour chaque résolution avec création du formulaire
|
||||||
|
for ($i = 1; $i <= $resolution_ago_nb; $i++) {
|
||||||
|
// On selectionne la résolution
|
||||||
|
$option = 'resolution_ago_'.$i;
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_ago_txt = $results['option_value'];
|
||||||
|
?>
|
||||||
|
<h4>Résolution n°<?php echo $i; ?></h4>
|
||||||
|
<p><?php echo $resolution_ago_txt; ?></p>
|
||||||
|
<p class="formvote">Votre vote : <span class="bold">
|
||||||
|
<?php echo $_SESSION['resolution_ago_'.$i]; ?>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<?php } ?>
|
||||||
|
<hr />
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($age) { ?>
|
||||||
|
<h3>Résolutions d'Assemblée Générale Extraordinaire</h3>
|
||||||
|
<?php
|
||||||
|
$sql = "SELECT option_name, option_value FROM admin WHERE option_name = :option";
|
||||||
|
$stmt = $bdd->prepare($sql);
|
||||||
|
// On boucle pour chaque résolution avec création du formulaire
|
||||||
|
for ($i = 1; $i <= $resolution_age_nb; $i++) {
|
||||||
|
// On selectionne la résolution
|
||||||
|
$option = 'resolution_age_'.$i;
|
||||||
|
$stmt->bindParam(':option', $option, PDO::PARAM_STR);
|
||||||
|
$stmt->execute();
|
||||||
|
$results = $stmt->fetch();
|
||||||
|
$resolution_age_txt = $results['option_value'];
|
||||||
|
?>
|
||||||
|
<h4>Résolution n°<?php echo $i; ?></h4>
|
||||||
|
<p><?php echo $resolution_age_txt; ?></p>
|
||||||
|
<p class="formvote">Votre vote : <span class="bold">
|
||||||
|
<?php echo $_SESSION['resolution_age_'.$i]; ?>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<?php } ?>
|
||||||
|
<hr />
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($cs) { ?>
|
||||||
|
<h4>Élection des membres du Conseil de Surveillance</h4>
|
||||||
|
<p class="formvote">Votre vote : <span class="bold">
|
||||||
|
<?php
|
||||||
|
// On remplace par point virgule, c'est plus joli :)
|
||||||
|
$vote_cs = str_replace(",", " ; ", $_SESSION['vote_cs']);
|
||||||
|
// On vire le dernier ;, c'est encore plus joli :D
|
||||||
|
$vote_cs = rtrim($vote_cs, ";");
|
||||||
|
echo $vote_cs;
|
||||||
|
?>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<hr />
|
||||||
|
<?php } ?>
|
||||||
|
<form id='confirmation_vote' method="post" action="finalisation.php" data-parsley-validate>
|
||||||
|
<p class="formvote">
|
||||||
|
<input type="checkbox" name="confirm" value="confirm" id="confirm" required data-parsley-required /><label for="confirm">Mon vote est correct.</label><br />
|
||||||
|
<input type="submit" value="Confirmez">
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
<?php include("theme/footer.php"); ?>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
|
<script src="js/vendor/parsley.min.js"></script>
|
||||||
|
<script src="js/vendor/parsley-fr.js"></script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
docs/phpdoc/
|
||||||
|
test/message.txt
|
||||||
|
test/testbootstrap.php
|
||||||
|
.idea
|
||||||
|
build/
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
before_commands:
|
||||||
|
- "composer install --prefer-source"
|
||||||
|
|
||||||
|
tools:
|
||||||
|
# Code Coverage
|
||||||
|
external_code_coverage:
|
||||||
|
enabled: true
|
||||||
|
timeout: 300
|
||||||
|
filter:
|
||||||
|
excluded_paths:
|
||||||
|
- 'docs/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'extras/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'vendor/*'
|
||||||
|
|
||||||
|
|
||||||
|
php_code_coverage:
|
||||||
|
enabled: false
|
||||||
|
test_command: phpunit
|
||||||
|
filter:
|
||||||
|
excluded_paths:
|
||||||
|
- 'docs/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'extras/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'vendor/*'
|
||||||
|
|
||||||
|
|
||||||
|
# Code Sniffer
|
||||||
|
php_code_sniffer:
|
||||||
|
enabled: true
|
||||||
|
command: phpcs
|
||||||
|
config:
|
||||||
|
standard: PSR2
|
||||||
|
sniffs:
|
||||||
|
generic:
|
||||||
|
files:
|
||||||
|
one_class_per_file_sniff: false
|
||||||
|
filter:
|
||||||
|
excluded_paths:
|
||||||
|
- 'docs/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'extras/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'vendor/*'
|
||||||
|
|
||||||
|
|
||||||
|
# Copy/Paste Detector
|
||||||
|
php_cpd:
|
||||||
|
enabled: true
|
||||||
|
command: phpcpd
|
||||||
|
excluded_dirs:
|
||||||
|
- docs
|
||||||
|
- examples
|
||||||
|
- extras
|
||||||
|
- test
|
||||||
|
- vendor
|
||||||
|
|
||||||
|
|
||||||
|
# PHP CS Fixer (http://http://cs.sensiolabs.org/).
|
||||||
|
php_cs_fixer:
|
||||||
|
enabled: true
|
||||||
|
command: php-cs-fixer
|
||||||
|
config:
|
||||||
|
level: psr2
|
||||||
|
filter:
|
||||||
|
excluded_paths:
|
||||||
|
- 'docs/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'extras/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'vendor/*'
|
||||||
|
|
||||||
|
|
||||||
|
# Analyzes the size and structure of a PHP project.
|
||||||
|
php_loc:
|
||||||
|
enabled: true
|
||||||
|
command: phploc
|
||||||
|
excluded_dirs:
|
||||||
|
- docs
|
||||||
|
- examples
|
||||||
|
- extras
|
||||||
|
- test
|
||||||
|
- vendor
|
||||||
|
|
||||||
|
|
||||||
|
# PHP Mess Detector (http://phpmd.org).
|
||||||
|
php_mess_detector:
|
||||||
|
enabled: true
|
||||||
|
command: phpmd
|
||||||
|
config:
|
||||||
|
rulesets:
|
||||||
|
- codesize
|
||||||
|
- unusedcode
|
||||||
|
- naming
|
||||||
|
- design
|
||||||
|
naming_rules:
|
||||||
|
short_variable: { minimum: 2 }
|
||||||
|
filter:
|
||||||
|
excluded_paths:
|
||||||
|
- 'docs/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'extras/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'vendor/*'
|
||||||
|
|
||||||
|
# Analyzes the size and structure of a PHP project.
|
||||||
|
php_pdepend:
|
||||||
|
enabled: true
|
||||||
|
command: pdepend
|
||||||
|
excluded_dirs:
|
||||||
|
- docs
|
||||||
|
- examples
|
||||||
|
- extras
|
||||||
|
- test
|
||||||
|
- vendor
|
||||||
|
|
||||||
|
# Runs Scrutinizer's PHP Analyzer Tool
|
||||||
|
# https://scrutinizer-ci.com/docs/tools/php/php-analyzer/config_reference
|
||||||
|
php_analyzer:
|
||||||
|
enabled: true
|
||||||
|
config:
|
||||||
|
checkstyle:
|
||||||
|
enabled: true
|
||||||
|
naming:
|
||||||
|
enabled: true
|
||||||
|
property_name: ^[_a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps
|
||||||
|
method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9_]*$ #Allow underscores & caps
|
||||||
|
parameter_name: ^[a-z][a-zA-Z0-9_]*$ # Allow underscores
|
||||||
|
local_variable: ^[a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps
|
||||||
|
exception_name: ^[a-zA-Z][a-zA-Z0-9]*Exception$
|
||||||
|
isser_method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9]*$ #Allow underscores & caps
|
||||||
|
filter:
|
||||||
|
excluded_paths:
|
||||||
|
- 'docs/*'
|
||||||
|
- 'examples/*'
|
||||||
|
- 'extras/*'
|
||||||
|
- 'test/*'
|
||||||
|
- 'vendor/*'
|
||||||
|
|
||||||
|
# Security Advisory Checker
|
||||||
|
sensiolabs_security_checker: true
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
language: php
|
||||||
|
php:
|
||||||
|
- 5.6
|
||||||
|
- 5.5
|
||||||
|
- 5.4
|
||||||
|
- 5.3
|
||||||
|
- hhvm
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- php: hhvm
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -y -qq postfix
|
||||||
|
before_script:
|
||||||
|
- sudo service postfix stop
|
||||||
|
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
|
||||||
|
- mkdir -p build/logs
|
||||||
|
- cd test
|
||||||
|
- cp testbootstrap-dist.php testbootstrap.php
|
||||||
|
- chmod +x fakesendmail.sh
|
||||||
|
- sudo mkdir -p /var/qmail/bin
|
||||||
|
- sudo cp fakesendmail.sh /var/qmail/bin/sendmail
|
||||||
|
- sudo cp fakesendmail.sh /usr/sbin/sendmail
|
||||||
|
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -r 'echo PHP_VERSION;'`/etc/conf.d/sendmail.ini"
|
||||||
|
- pwd
|
||||||
|
- ls -al
|
||||||
|
script:
|
||||||
|
- phpunit --configuration ../travis.phpunit.xml.dist
|
||||||
|
after_script:
|
||||||
|
- wget https://scrutinizer-ci.com/ocular.phar
|
||||||
|
- php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer SPL autoloader.
|
||||||
|
* PHP Version 5
|
||||||
|
* @package PHPMailer
|
||||||
|
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
* @author Brent R. Matzelle (original founder)
|
||||||
|
* @copyright 2012 - 2014 Marcus Bointon
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer SPL autoloader.
|
||||||
|
* @param string $classname The name of the class to load
|
||||||
|
*/
|
||||||
|
function PHPMailerAutoload($classname)
|
||||||
|
{
|
||||||
|
//Can't use __DIR__ as it's only in PHP 5.3+
|
||||||
|
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
|
||||||
|
if (is_readable($filename)) {
|
||||||
|
require $filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
||||||
|
//SPL autoloading was introduced in PHP 5.1.2
|
||||||
|
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||||
|
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||||
|
} else {
|
||||||
|
spl_autoload_register('PHPMailerAutoload');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/**
|
||||||
|
* Fall back to traditional autoload for old PHP versions
|
||||||
|
* @param string $classname The name of the class to load
|
||||||
|
*/
|
||||||
|
function __autoload($classname)
|
||||||
|
{
|
||||||
|
PHPMailerAutoload($classname);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,397 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||||
|
* PHP Version 5
|
||||||
|
* @package PHPMailer
|
||||||
|
* @link https://github.com/PHPMailer/PHPMailer/
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
* @author Brent R. Matzelle (original founder)
|
||||||
|
* @copyright 2012 - 2014 Marcus Bointon
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||||
|
* Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.
|
||||||
|
* Does not support APOP.
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Richard Davey (original author) <rich@corephp.co.uk>
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
*/
|
||||||
|
class POP3
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The POP3 PHPMailer Version number.
|
||||||
|
* @type string
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $Version = '5.2.9';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default POP3 port number.
|
||||||
|
* @type integer
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $POP3_PORT = 110;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default timeout in seconds.
|
||||||
|
* @type integer
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $POP3_TIMEOUT = 30;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Carriage Return + Line Feed.
|
||||||
|
* @type string
|
||||||
|
* @access public
|
||||||
|
* @deprecated Use the constant instead
|
||||||
|
*/
|
||||||
|
public $CRLF = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug display level.
|
||||||
|
* Options: 0 = no, 1+ = yes
|
||||||
|
* @type integer
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $do_debug = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 mail server hostname.
|
||||||
|
* @type string
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $host;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 port number.
|
||||||
|
* @type integer
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $port;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Timeout Value in seconds.
|
||||||
|
* @type integer
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $tval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 username
|
||||||
|
* @type string
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 password.
|
||||||
|
* @type string
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public $password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resource handle for the POP3 connection socket.
|
||||||
|
* @type resource
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private $pop_conn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Are we connected?
|
||||||
|
* @type boolean
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private $connected = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error container.
|
||||||
|
* @type array
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private $errors = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Line break constant
|
||||||
|
*/
|
||||||
|
const CRLF = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple static wrapper for all-in-one POP before SMTP
|
||||||
|
* @param $host
|
||||||
|
* @param boolean $port
|
||||||
|
* @param boolean $tval
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @param integer $debug_level
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public static function popBeforeSmtp(
|
||||||
|
$host,
|
||||||
|
$port = false,
|
||||||
|
$tval = false,
|
||||||
|
$username = '',
|
||||||
|
$password = '',
|
||||||
|
$debug_level = 0
|
||||||
|
) {
|
||||||
|
$pop = new POP3;
|
||||||
|
return $pop->authorise($host, $port, $tval, $username, $password, $debug_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate with a POP3 server.
|
||||||
|
* A connect, login, disconnect sequence
|
||||||
|
* appropriate for POP-before SMTP authorisation.
|
||||||
|
* @access public
|
||||||
|
* @param string $host The hostname to connect to
|
||||||
|
* @param integer|boolean $port The port number to connect to
|
||||||
|
* @param integer|boolean $timeout The timeout value
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @param integer $debug_level
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
|
||||||
|
{
|
||||||
|
$this->host = $host;
|
||||||
|
// If no port value provided, use default
|
||||||
|
if (false === $port) {
|
||||||
|
$this->port = $this->POP3_PORT;
|
||||||
|
} else {
|
||||||
|
$this->port = (integer)$port;
|
||||||
|
}
|
||||||
|
// If no timeout value provided, use default
|
||||||
|
if (false === $timeout) {
|
||||||
|
$this->tval = $this->POP3_TIMEOUT;
|
||||||
|
} else {
|
||||||
|
$this->tval = (integer)$timeout;
|
||||||
|
}
|
||||||
|
$this->do_debug = $debug_level;
|
||||||
|
$this->username = $username;
|
||||||
|
$this->password = $password;
|
||||||
|
// Reset the error log
|
||||||
|
$this->errors = array();
|
||||||
|
// connect
|
||||||
|
$result = $this->connect($this->host, $this->port, $this->tval);
|
||||||
|
if ($result) {
|
||||||
|
$login_result = $this->login($this->username, $this->password);
|
||||||
|
if ($login_result) {
|
||||||
|
$this->disconnect();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// We need to disconnect regardless of whether the login succeeded
|
||||||
|
$this->disconnect();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to a POP3 server.
|
||||||
|
* @access public
|
||||||
|
* @param string $host
|
||||||
|
* @param integer|boolean $port
|
||||||
|
* @param integer $tval
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function connect($host, $port = false, $tval = 30)
|
||||||
|
{
|
||||||
|
// Are we already connected?
|
||||||
|
if ($this->connected) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//On Windows this will raise a PHP Warning error if the hostname doesn't exist.
|
||||||
|
//Rather than suppress it with @fsockopen, capture it cleanly instead
|
||||||
|
set_error_handler(array($this, 'catchWarning'));
|
||||||
|
|
||||||
|
if (false === $port) {
|
||||||
|
$port = $this->POP3_PORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
// connect to the POP3 server
|
||||||
|
$this->pop_conn = fsockopen(
|
||||||
|
$host, // POP3 Host
|
||||||
|
$port, // Port #
|
||||||
|
$errno, // Error Number
|
||||||
|
$errstr, // Error Message
|
||||||
|
$tval
|
||||||
|
); // Timeout (seconds)
|
||||||
|
// Restore the error handler
|
||||||
|
restore_error_handler();
|
||||||
|
|
||||||
|
// Did we connect?
|
||||||
|
if (false === $this->pop_conn) {
|
||||||
|
// It would appear not...
|
||||||
|
$this->setError(array(
|
||||||
|
'error' => "Failed to connect to server $host on port $port",
|
||||||
|
'errno' => $errno,
|
||||||
|
'errstr' => $errstr
|
||||||
|
));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Increase the stream time-out
|
||||||
|
stream_set_timeout($this->pop_conn, $tval, 0);
|
||||||
|
|
||||||
|
// Get the POP3 server response
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
// Check for the +OK
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
// The connection is established and the POP3 server is talking
|
||||||
|
$this->connected = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log in to the POP3 server.
|
||||||
|
* Does not support APOP (RFC 2828, 4949).
|
||||||
|
* @access public
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function login($username = '', $password = '')
|
||||||
|
{
|
||||||
|
if (!$this->connected) {
|
||||||
|
$this->setError('Not connected to POP3 server');
|
||||||
|
}
|
||||||
|
if (empty($username)) {
|
||||||
|
$username = $this->username;
|
||||||
|
}
|
||||||
|
if (empty($password)) {
|
||||||
|
$password = $this->password;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send the Username
|
||||||
|
$this->sendString("USER $username" . self::CRLF);
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
// Send the Password
|
||||||
|
$this->sendString("PASS $password" . self::CRLF);
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disconnect from the POP3 server.
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public function disconnect()
|
||||||
|
{
|
||||||
|
$this->sendString('QUIT');
|
||||||
|
//The QUIT command may cause the daemon to exit, which will kill our connection
|
||||||
|
//So ignore errors here
|
||||||
|
try {
|
||||||
|
@fclose($this->pop_conn);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
//Do nothing
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a response from the POP3 server.
|
||||||
|
* $size is the maximum number of bytes to retrieve
|
||||||
|
* @param integer $size
|
||||||
|
* @return string
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function getResponse($size = 128)
|
||||||
|
{
|
||||||
|
$response = fgets($this->pop_conn, $size);
|
||||||
|
if ($this->do_debug >= 1) {
|
||||||
|
echo "Server -> Client: $response";
|
||||||
|
}
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send raw data to the POP3 server.
|
||||||
|
* @param string $string
|
||||||
|
* @return integer
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function sendString($string)
|
||||||
|
{
|
||||||
|
if ($this->pop_conn) {
|
||||||
|
if ($this->do_debug >= 2) { //Show client messages when debug >= 2
|
||||||
|
echo "Client -> Server: $string";
|
||||||
|
}
|
||||||
|
return fwrite($this->pop_conn, $string, strlen($string));
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the POP3 server response.
|
||||||
|
* Looks for for +OK or -ERR.
|
||||||
|
* @param string $string
|
||||||
|
* @return boolean
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function checkResponse($string)
|
||||||
|
{
|
||||||
|
if (substr($string, 0, 3) !== '+OK') {
|
||||||
|
$this->setError(array(
|
||||||
|
'error' => "Server reported an error: $string",
|
||||||
|
'errno' => 0,
|
||||||
|
'errstr' => ''
|
||||||
|
));
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add an error to the internal error store.
|
||||||
|
* Also display debug output if it's enabled.
|
||||||
|
* @param $error
|
||||||
|
*/
|
||||||
|
private function setError($error)
|
||||||
|
{
|
||||||
|
$this->errors[] = $error;
|
||||||
|
if ($this->do_debug >= 1) {
|
||||||
|
echo '<pre>';
|
||||||
|
foreach ($this->errors as $error) {
|
||||||
|
print_r($error);
|
||||||
|
}
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 connection error handler.
|
||||||
|
* @param integer $errno
|
||||||
|
* @param string $errstr
|
||||||
|
* @param string $errfile
|
||||||
|
* @param integer $errline
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
private function catchWarning($errno, $errstr, $errfile, $errline)
|
||||||
|
{
|
||||||
|
$this->setError(array(
|
||||||
|
'error' => "Connecting to the POP3 server raised a PHP warning: ",
|
||||||
|
'errno' => $errno,
|
||||||
|
'errstr' => $errstr,
|
||||||
|
'errfile' => $errfile,
|
||||||
|
'errline' => $errline
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* EasyPeasyICS Simple ICS/vCal data generator.
|
||||||
|
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Manuel Reinhard <manu@sprain.ch>
|
||||||
|
*
|
||||||
|
* Built with inspiration from
|
||||||
|
* http://stackoverflow.com/questions/1463480/how-can-i-use-php-to-dynamically-publish-an-ical-file-to-be-read-by-google-calend/1464355#1464355
|
||||||
|
* History:
|
||||||
|
* 2010/12/17 - Manuel Reinhard - when it all started
|
||||||
|
* 2014 PHPMailer project becomes maintainer
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class EasyPeasyICS.
|
||||||
|
* Simple ICS data generator
|
||||||
|
* @package phpmailer
|
||||||
|
* @subpackage easypeasyics
|
||||||
|
*/
|
||||||
|
class EasyPeasyICS
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name of the calendar
|
||||||
|
* @type string
|
||||||
|
*/
|
||||||
|
protected $calendarName;
|
||||||
|
/**
|
||||||
|
* The array of events to add to this calendar
|
||||||
|
* @type array
|
||||||
|
*/
|
||||||
|
protected $events = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
* @param string $calendarName
|
||||||
|
*/
|
||||||
|
public function __construct($calendarName = "")
|
||||||
|
{
|
||||||
|
$this->calendarName = $calendarName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add an event to this calendar.
|
||||||
|
* @param string $start The start date and time as a unix timestamp
|
||||||
|
* @param string $end The end date and time as a unix timestamp
|
||||||
|
* @param string $summary A summary or title for the event
|
||||||
|
* @param string $description A description of the event
|
||||||
|
* @param string $url A URL for the event
|
||||||
|
* @param string $uid A unique identifier for the event - generated automatically if not provided
|
||||||
|
* @return array An array of event details, including any generated UID
|
||||||
|
*/
|
||||||
|
public function addEvent($start, $end, $summary = '', $description = '', $url = '', $uid = '')
|
||||||
|
{
|
||||||
|
if (empty($uid)) {
|
||||||
|
$uid = md5(uniqid(mt_rand(), true)) . '@EasyPeasyICS';
|
||||||
|
}
|
||||||
|
$event = array(
|
||||||
|
'start' => gmdate('Ymd', $start) . 'T' . gmdate('His', $start) . 'Z',
|
||||||
|
'end' => gmdate('Ymd', $end) . 'T' . gmdate('His', $end) . 'Z',
|
||||||
|
'summary' => $summary,
|
||||||
|
'description' => $description,
|
||||||
|
'url' => $url,
|
||||||
|
'uid' => $uid
|
||||||
|
);
|
||||||
|
$this->events[] = $event;
|
||||||
|
return $event;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array Get the array of events.
|
||||||
|
*/
|
||||||
|
public function getEvents()
|
||||||
|
{
|
||||||
|
return $this->events;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear all events.
|
||||||
|
*/
|
||||||
|
public function clearEvents()
|
||||||
|
{
|
||||||
|
$this->events = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the name of the calendar.
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->calendarName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the name of the calendar.
|
||||||
|
* @param $name
|
||||||
|
*/
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->calendarName = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render and optionally output a vcal string.
|
||||||
|
* @param bool $output Whether to output the calendar data directly (the default).
|
||||||
|
* @return string The complete rendered vlal
|
||||||
|
*/
|
||||||
|
public function render($output = true)
|
||||||
|
{
|
||||||
|
//Add header
|
||||||
|
$ics = 'BEGIN:VCALENDAR
|
||||||
|
METHOD:PUBLISH
|
||||||
|
VERSION:2.0
|
||||||
|
X-WR-CALNAME:' . $this->calendarName . '
|
||||||
|
PRODID:-//hacksw/handcal//NONSGML v1.0//EN';
|
||||||
|
|
||||||
|
//Add events
|
||||||
|
foreach ($this->events as $event) {
|
||||||
|
$ics .= '
|
||||||
|
BEGIN:VEVENT
|
||||||
|
UID:' . $event['uid'] . '
|
||||||
|
DTSTAMP:' . gmdate('Ymd') . 'T' . gmdate('His') . 'Z
|
||||||
|
DTSTART:' . $event['start'] . '
|
||||||
|
DTEND:' . $event['end'] . '
|
||||||
|
SUMMARY:' . str_replace("\n", "\\n", $event['summary']) . '
|
||||||
|
DESCRIPTION:' . str_replace("\n", "\\n", $event['description']) . '
|
||||||
|
URL;VALUE=URI:' . $event['url'] . '
|
||||||
|
END:VEVENT';
|
||||||
|
}
|
||||||
|
|
||||||
|
//Add footer
|
||||||
|
$ics .= '
|
||||||
|
END:VCALENDAR';
|
||||||
|
|
||||||
|
if ($output) {
|
||||||
|
//Output
|
||||||
|
$filename = $this->calendarName;
|
||||||
|
//Filename needs quoting if it contains spaces
|
||||||
|
if (strpos($filename, ' ') !== false) {
|
||||||
|
$filename = '"'.$filename.'"';
|
||||||
|
}
|
||||||
|
header('Content-type: text/calendar; charset=utf-8');
|
||||||
|
header('Content-Disposition: inline; filename=' . $filename . '.ics');
|
||||||
|
echo $ics;
|
||||||
|
}
|
||||||
|
return $ics;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
#PHPMailer Extras
|
||||||
|
|
||||||
|
These classes provide optional additional functions to PHPMailer.
|
||||||
|
|
||||||
|
These are not loaded by the PHPMailer autoloader, so in some cases you may need to `require` them yourself before using them.
|
||||||
|
|
||||||
|
##EasyPeasyICS
|
||||||
|
|
||||||
|
This class was originally written by Manuel Reinhard and provides a simple means of generating ICS/vCal files that are used in sending calendar events. PHPMailer does not use it directly, but you can use it to generate content appropriate for placing in the `Ical` property of PHPMailer. The PHPMailer project is now its official home as Manuel has given permission for that and is no longer maintaining it himself.
|
||||||
|
|
||||||
|
##htmlfilter
|
||||||
|
|
||||||
|
This class by Konstantin Riabitsev and Jim Jagielski implements HTML filtering to remove potentially malicious tags, such as `<script>` or `onclick=` attributes that can result in XSS attacks. This is a simple filter and is not as comprehensive as [HTMLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/) or [HTMLPurifier](http://htmlpurifier.org), but it's easier to use and considerably better than nothing! PHPMailer does not use it directly, but you may want to apply it to user-supplied HTML before using it as a message body.
|
||||||
|
|
||||||
|
##NTLM_SASL_client
|
||||||
|
|
||||||
|
This class by Manuel Lemos (bundled with permission) adds the ability to authenticate with Microsoft Windows mail servers that use NTLM-based authentication. It is used by PHPMailer if you send via SMTP and set the `AuthType` property to `NTLM`; you will also need to use the `Realm` and `Workstation` properties. The original source is [here](http://www.phpclasses.org/browse/file/7495.html).
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,185 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* ntlm_sasl_client.php
|
||||||
|
*
|
||||||
|
* @(#) $Id: ntlm_sasl_client.php,v 1.3 2004/11/17 08:00:37 mlemos Exp $
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
define("SASL_NTLM_STATE_START", 0);
|
||||||
|
define("SASL_NTLM_STATE_IDENTIFY_DOMAIN", 1);
|
||||||
|
define("SASL_NTLM_STATE_RESPOND_CHALLENGE", 2);
|
||||||
|
define("SASL_NTLM_STATE_DONE", 3);
|
||||||
|
define("SASL_FAIL", -1);
|
||||||
|
define("SASL_CONTINUE", 1);
|
||||||
|
|
||||||
|
class ntlm_sasl_client_class
|
||||||
|
{
|
||||||
|
public $credentials = array();
|
||||||
|
public $state = SASL_NTLM_STATE_START;
|
||||||
|
|
||||||
|
public function initialize(&$client)
|
||||||
|
{
|
||||||
|
if (!function_exists($function = "mcrypt_encrypt")
|
||||||
|
|| !function_exists($function = "mhash")
|
||||||
|
) {
|
||||||
|
$extensions = array(
|
||||||
|
"mcrypt_encrypt" => "mcrypt",
|
||||||
|
"mhash" => "mhash"
|
||||||
|
);
|
||||||
|
$client->error = "the extension " . $extensions[$function] .
|
||||||
|
" required by the NTLM SASL client class is not available in this PHP configuration";
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ASCIIToUnicode($ascii)
|
||||||
|
{
|
||||||
|
for ($unicode = "", $a = 0; $a < strlen($ascii); $a++) {
|
||||||
|
$unicode .= substr($ascii, $a, 1) . chr(0);
|
||||||
|
}
|
||||||
|
return ($unicode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function typeMsg1($domain, $workstation)
|
||||||
|
{
|
||||||
|
$domain_length = strlen($domain);
|
||||||
|
$workstation_length = strlen($workstation);
|
||||||
|
$workstation_offset = 32;
|
||||||
|
$domain_offset = $workstation_offset + $workstation_length;
|
||||||
|
return (
|
||||||
|
"NTLMSSP\0" .
|
||||||
|
"\x01\x00\x00\x00" .
|
||||||
|
"\x07\x32\x00\x00" .
|
||||||
|
pack("v", $domain_length) .
|
||||||
|
pack("v", $domain_length) .
|
||||||
|
pack("V", $domain_offset) .
|
||||||
|
pack("v", $workstation_length) .
|
||||||
|
pack("v", $workstation_length) .
|
||||||
|
pack("V", $workstation_offset) .
|
||||||
|
$workstation .
|
||||||
|
$domain
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function NTLMResponse($challenge, $password)
|
||||||
|
{
|
||||||
|
$unicode = $this->ASCIIToUnicode($password);
|
||||||
|
$md4 = mhash(MHASH_MD4, $unicode);
|
||||||
|
$padded = $md4 . str_repeat(chr(0), 21 - strlen($md4));
|
||||||
|
$iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB);
|
||||||
|
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
|
||||||
|
for ($response = "", $third = 0; $third < 21; $third += 7) {
|
||||||
|
for ($packed = "", $p = $third; $p < $third + 7; $p++) {
|
||||||
|
$packed .= str_pad(decbin(ord(substr($padded, $p, 1))), 8, "0", STR_PAD_LEFT);
|
||||||
|
}
|
||||||
|
for ($key = "", $p = 0; $p < strlen($packed); $p += 7) {
|
||||||
|
$s = substr($packed, $p, 7);
|
||||||
|
$b = $s . ((substr_count($s, "1") % 2) ? "0" : "1");
|
||||||
|
$key .= chr(bindec($b));
|
||||||
|
}
|
||||||
|
$ciphertext = mcrypt_encrypt(MCRYPT_DES, $key, $challenge, MCRYPT_MODE_ECB, $iv);
|
||||||
|
$response .= $ciphertext;
|
||||||
|
}
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function typeMsg3($ntlm_response, $user, $domain, $workstation)
|
||||||
|
{
|
||||||
|
$domain_unicode = $this->ASCIIToUnicode($domain);
|
||||||
|
$domain_length = strlen($domain_unicode);
|
||||||
|
$domain_offset = 64;
|
||||||
|
$user_unicode = $this->ASCIIToUnicode($user);
|
||||||
|
$user_length = strlen($user_unicode);
|
||||||
|
$user_offset = $domain_offset + $domain_length;
|
||||||
|
$workstation_unicode = $this->ASCIIToUnicode($workstation);
|
||||||
|
$workstation_length = strlen($workstation_unicode);
|
||||||
|
$workstation_offset = $user_offset + $user_length;
|
||||||
|
$lm = "";
|
||||||
|
$lm_length = strlen($lm);
|
||||||
|
$lm_offset = $workstation_offset + $workstation_length;
|
||||||
|
$ntlm = $ntlm_response;
|
||||||
|
$ntlm_length = strlen($ntlm);
|
||||||
|
$ntlm_offset = $lm_offset + $lm_length;
|
||||||
|
$session = "";
|
||||||
|
$session_length = strlen($session);
|
||||||
|
$session_offset = $ntlm_offset + $ntlm_length;
|
||||||
|
return (
|
||||||
|
"NTLMSSP\0" .
|
||||||
|
"\x03\x00\x00\x00" .
|
||||||
|
pack("v", $lm_length) .
|
||||||
|
pack("v", $lm_length) .
|
||||||
|
pack("V", $lm_offset) .
|
||||||
|
pack("v", $ntlm_length) .
|
||||||
|
pack("v", $ntlm_length) .
|
||||||
|
pack("V", $ntlm_offset) .
|
||||||
|
pack("v", $domain_length) .
|
||||||
|
pack("v", $domain_length) .
|
||||||
|
pack("V", $domain_offset) .
|
||||||
|
pack("v", $user_length) .
|
||||||
|
pack("v", $user_length) .
|
||||||
|
pack("V", $user_offset) .
|
||||||
|
pack("v", $workstation_length) .
|
||||||
|
pack("v", $workstation_length) .
|
||||||
|
pack("V", $workstation_offset) .
|
||||||
|
pack("v", $session_length) .
|
||||||
|
pack("v", $session_length) .
|
||||||
|
pack("V", $session_offset) .
|
||||||
|
"\x01\x02\x00\x00" .
|
||||||
|
$domain_unicode .
|
||||||
|
$user_unicode .
|
||||||
|
$workstation_unicode .
|
||||||
|
$lm .
|
||||||
|
$ntlm
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function start(&$client, &$message, &$interactions)
|
||||||
|
{
|
||||||
|
if ($this->state != SASL_NTLM_STATE_START) {
|
||||||
|
$client->error = "NTLM authentication state is not at the start";
|
||||||
|
return (SASL_FAIL);
|
||||||
|
}
|
||||||
|
$this->credentials = array(
|
||||||
|
"user" => "",
|
||||||
|
"password" => "",
|
||||||
|
"realm" => "",
|
||||||
|
"workstation" => ""
|
||||||
|
);
|
||||||
|
$defaults = array();
|
||||||
|
$status = $client->GetCredentials($this->credentials, $defaults, $interactions);
|
||||||
|
if ($status == SASL_CONTINUE) {
|
||||||
|
$this->state = SASL_NTLM_STATE_IDENTIFY_DOMAIN;
|
||||||
|
}
|
||||||
|
unset($message);
|
||||||
|
return ($status);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function step(&$client, $response, &$message, &$interactions)
|
||||||
|
{
|
||||||
|
switch ($this->state) {
|
||||||
|
case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
|
||||||
|
$message = $this->TypeMsg1($this->credentials["realm"], $this->credentials["workstation"]);
|
||||||
|
$this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE;
|
||||||
|
break;
|
||||||
|
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
|
||||||
|
$ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]);
|
||||||
|
$message = $this->TypeMsg3(
|
||||||
|
$ntlm_response,
|
||||||
|
$this->credentials["user"],
|
||||||
|
$this->credentials["realm"],
|
||||||
|
$this->credentials["workstation"]
|
||||||
|
);
|
||||||
|
$this->state = SASL_NTLM_STATE_DONE;
|
||||||
|
break;
|
||||||
|
case SASL_NTLM_STATE_DONE:
|
||||||
|
$client->error = "NTLM authentication was finished without success";
|
||||||
|
return (SASL_FAIL);
|
||||||
|
default:
|
||||||
|
$client->error = "invalid NTLM authentication step state";
|
||||||
|
return (SASL_FAIL);
|
||||||
|
}
|
||||||
|
return (SASL_CONTINUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Arabic PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author bahjat al mostafa <bahjat983@hotmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
|
||||||
|
'فشل في الارسال لكل من : ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Azerbaijani PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author @mirjalal
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP xətası: Giriş uğursuz oldu.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP xətası: SMTP serverinə qoşulma uğursuz oldu.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP xətası: Verilənlər qəbul edilməyib.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Boş mesaj göndərilə bilməz.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Qeyri-müəyyən kodlaşdırma: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Əmr yerinə yetirilmədi: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Fayla giriş yoxdur: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fayl xətası: Fayl açıla bilmədi: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Göstərilən poçtlara göndərmə uğursuz oldu: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Mail funksiyası işə salına bilmədi.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Düzgün olmayan e-mail adresi: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' - e-mail kitabxanası dəstəklənmir.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Ən azı bir e-mail adresi daxil edilməlidir.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP xətası: Aşağıdakı ünvanlar üzrə alıcılara göndərmə uğursuzdur: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'İmzalama xətası: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP serverinə qoşulma uğursuz oldu.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri xətası: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Dəyişənin quraşdırılması uğursuz oldu: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Belarusian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Aleksander Maksymiuk <info@setpro.pl>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Bulgarian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Mikhail Kyosev <mialygk@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Грешка при подписване: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: ';
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Paulo Henrique Garcia <paulo@controllerweb.com.br>
|
||||||
|
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar com o servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Corpo da mensagem vazio';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Os endereços dos remententes a seguir falharam: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Não enviando, endereço de e-mail inválido: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Você deve fornecer pelo menos um endereço de destinatário de e-mail.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os endereços de destinatário a seguir falharam: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou resetar a variável: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Catalan PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Ivan <web AT microstudi DOT com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Error al signar: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Chinese PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author LiuXin <http://www.80x86.cn/blog/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||||
|
$PHPMAILER_LANG['execute'] = '不能执行: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = '不能访问文件:';
|
||||||
|
$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Czech PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Chyba SMTP: Autentizace selhala.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Chyba SMTP: Nelze navázat spojení se SMTP serverem.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Chyba SMTP: Data nebyla přijata.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Prázdné tělo zprávy';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nelze získat přístup k souboru: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor pro čtení: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Chyba přihlašování: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* German PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'E-Mail Inhalt ist leer.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Danish PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Mikael Stokkebro <info@stokkebro.dk>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Greek PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναί δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν αποστέλθηκε, η διεύθυνση δεν είναι έγκυρη.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτων διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Esperanto PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Eraro de servilo SMTP : aŭtentigo malsukcesis.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Eraro de servilo SMTP : konektado al servilo malsukcesis.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Eraro de servilo SMTP : neĝustaj datumoj.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Teksto de mesaĝo mankas.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Nekonata kodoprezento: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Lanĉi rulumadon ne eblis: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Aliro al dosiero ne sukcesis: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Eraro de dosiero: malfermo neeblas: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Jena adreso de sendinto malsukcesis: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Genero de retmesaĝa funkcio neeblis.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Retadreso ne validas: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mesaĝilo ne subtenata.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Vi devas tajpi almenaŭ unu recevontan retadreson.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Eraro de servilo SMTP : la jenaj poŝtrecivuloj kaŭzis eraron: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Eraro de subskribo: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP konektado malsukcesis.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Eraro de servilo SMTP : ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Spanish PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Matt Sturdy <matt.sturdy@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Estonian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Indrek Päri
|
||||||
|
* @author Elan Ruusamäe <glen@delfi.ee>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu';
|
||||||
|
$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';
|
||||||
|
$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: ';
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Persian/Farsi PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Ali Jazayeri <jaza.ali@gmail.com>
|
||||||
|
* @author Mohammad Hossein Mojtahedi <mhm5000@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: دادهها نادرست هستند.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'کدگذاری ناشناخته: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمیشود.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'خطا در امضا: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Finnish PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Jyry Kuukanen
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP-virhe: käyttäjätunnistus epäonnistui.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP-virhe: yhteys palvelimeen ei onnistu.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-virhe: data on virheellinen.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Suoritus epäonnistui: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Seuraavaan tiedostoon ei ole oikeuksia: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Tiedostovirhe: Ei voida avata tiedostoa: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Seuraava lähettäjän osoite on virheellinen: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Faroese PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Dávur Sørensen <http://www.profo-webdesign.dk>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ókend encoding: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* French PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* Some French punctuation requires a thin non-breaking space (U+202F) character before it,
|
||||||
|
* for example before a colon or exclamation mark.
|
||||||
|
* There is one of these characters between these quotes: " "
|
||||||
|
* @link http://unicode.org/udhr/n/notes_fra.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l\'authentification.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : impossible de se connecter au serveur SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : données incorrectes.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Corps du message vide.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu : ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution : ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier : ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible : ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué : ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Erreur de signature : ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable : ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Galician PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author by Donato Rouco <donatorouco@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Non puido ser executado: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Erro ó firmar: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Hebrew PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Ronny Sherer <ronny@hoojima.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Croatian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Hrvoj3e <hrvoj3e@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: ';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Hungarian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author @dominicus-75
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP hiba: az azonosítás sikertelen.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP hiba: nem lehet kapcsolódni az SMTP-szerverhez.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP hiba: adatok visszautasítva.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Üres az üzenettörzs.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ismeretlen kódolás: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nem lehet végrehajtani: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'A következő fájl nem elérhető: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fájl hiba: a következő fájlt nem lehet megnyitni: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'A feladóként megadott következő cím hibás: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'A PHP mail() függvényt nem sikerült végrehajtani.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Érvénytelen cím: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' a mailer-osztály nem támogatott.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Legalább egy címzettet fel kell tüntetni.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP hiba: a címzettként megadott következő címek hibásak: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Hibás aláírás: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Hiba az SMTP-kapcsolatban.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP-szerver hiba: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'A következő változók beállítása nem sikerült: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Indonesian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Cecep Prawiro <cecep.prawiro@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengautentikasi.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima peladen.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak bisa dibuka : ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan error : ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi email';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat email tidak valid : ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer tidak didukung';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan error : ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Kesalahan peladen SMTP : ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Tidak berhasil mengatur atau mengatur ulang variable : ';
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Italian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Ilias Bartolini <brain79@inwind.it>
|
||||||
|
* @author Stefano Sabatini <sabas88@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Errore nella firma: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Japanese PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Mitsuhiro Yoshida <http://mitstek.com/>
|
||||||
|
* @author Yoshi Sakai <http://bluemooninc.jp/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Georgian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: ';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue