1
0

Merge branch 'master' of git.labolyon.fr:DTux/serveur-vote-lalis

This commit is contained in:
Daniel Tartavel 2022-09-14 13:38:57 +02:00
commit ec6efe0a9c
15 changed files with 262 additions and 28 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*~
*.kate*

1
.htaccess Normal file
View File

@ -0,0 +1 @@
Options -Indexes

View File

@ -0,0 +1,223 @@
[Buildset]
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00)
[Filters]
size=43
[Filters][0]
inclusive=0
pattern=.*
targets=3
[Filters][1]
inclusive=1
pattern=.gitignore
targets=1
[Filters][10]
inclusive=1
pattern=.clang-format
targets=1
[Filters][11]
inclusive=1
pattern=.circleci
targets=2
[Filters][12]
inclusive=0
pattern=.git
targets=2
[Filters][13]
inclusive=0
pattern=CVS
targets=2
[Filters][14]
inclusive=0
pattern=.svn
targets=2
[Filters][15]
inclusive=0
pattern=_svn
targets=2
[Filters][16]
inclusive=0
pattern=SCCS
targets=2
[Filters][17]
inclusive=0
pattern=_darcs
targets=2
[Filters][18]
inclusive=0
pattern=.hg
targets=2
[Filters][19]
inclusive=0
pattern=.bzr
targets=2
[Filters][2]
inclusive=1
pattern=.gitmodules
targets=1
[Filters][20]
inclusive=0
pattern=__pycache__
targets=2
[Filters][21]
inclusive=0
pattern=*.o
targets=1
[Filters][22]
inclusive=0
pattern=*.a
targets=1
[Filters][23]
inclusive=0
pattern=*.so
targets=1
[Filters][24]
inclusive=0
pattern=*.so.*
targets=1
[Filters][25]
inclusive=0
pattern=*.obj
targets=1
[Filters][26]
inclusive=0
pattern=*.lib
targets=1
[Filters][27]
inclusive=0
pattern=*.dll
targets=1
[Filters][28]
inclusive=0
pattern=*.exp
targets=1
[Filters][29]
inclusive=0
pattern=*.pdb
targets=1
[Filters][3]
inclusive=1
pattern=.pre-commit-config.yaml
targets=1
[Filters][30]
inclusive=0
pattern=moc_*.cpp
targets=1
[Filters][31]
inclusive=0
pattern=*.moc
targets=1
[Filters][32]
inclusive=0
pattern=ui_*.h
targets=1
[Filters][33]
inclusive=0
pattern=*.qmlc
targets=1
[Filters][34]
inclusive=0
pattern=qrc_*.cpp
targets=1
[Filters][35]
inclusive=0
pattern=*~
targets=1
[Filters][36]
inclusive=0
pattern=*.orig
targets=1
[Filters][37]
inclusive=0
pattern=.*.kate-swp
targets=1
[Filters][38]
inclusive=0
pattern=.*.swp
targets=1
[Filters][39]
inclusive=0
pattern=*.pyc
targets=1
[Filters][4]
inclusive=1
pattern=.gitlab-ci.yml
targets=1
[Filters][40]
inclusive=0
pattern=*.pyo
targets=1
[Filters][41]
inclusive=1
pattern=.htaccess
targets=3
[Filters][42]
inclusive=1
pattern=.htpasswd
targets=3
[Filters][5]
inclusive=1
pattern=.travis.yml
targets=1
[Filters][6]
inclusive=1
pattern=.editorconfig
targets=1
[Filters][7]
inclusive=1
pattern=.pep8
targets=1
[Filters][8]
inclusive=1
pattern=.prettierignore
targets=1
[Filters][9]
inclusive=1
pattern=.prettierrc*
targets=1
[Project]
VersionControlSupport=kdevgit

View File

@ -1 +1 @@
daniel:$apr1$Up83RCLZ$x46wYId2latEFsJARi/cL/
daniel:$apr1$67uwe85A$ygTTmLOR/DxIJgPMqGVox.

View File

@ -3,7 +3,7 @@
require_once '../session_init.php';
require_once 'config.inc.php';
require_once 'db.class.php';
require_once 'entete.html';
require_once 'entete.php';
$idVotation =$_GET["id"];
@ -21,7 +21,7 @@ $dolibarr = new dbDolibarr();
if (empty($idVotation))
{
choixVotation('/gestionsite/envoiMailing.php') ;
choixVotation('./envoiMailing.php') ;
}else
{
//chargement des données de la votation
@ -59,6 +59,7 @@ if (empty($idVotation))
print '<pre>' . $adherent['email'] . ' ' . $adherent['firstname'] . ' ' . $adherent['lastname'] . EOLH . nl2br($text) . '</pre>';
if ( $_GET['status'] == 'Oui')
{
//print $text;
envoiMail($adherent['email'], $sujet, $text, $html=false, $cc='', $bcc='');
//envoiMail('dtux@free.fr', $sujet, $text, $html=false, $cc='', $bcc='');
}

View File

@ -2,7 +2,7 @@
require_once '../session_init.php';
require_once 'config.inc.php';
require_once './entete.html';
require_once 'entete.php';
print(' <br><br>
<!-- lalis Grid Section -->
@ -19,6 +19,8 @@ print(' <br><br>
<li><a href="../vote.resultat.php">Consulter les résultats d\'une votation</a></li>
<li><a href="creationVotation.php">nouvelle votations</a></li>
<li><a href="modifVotation.php">Modifier une votation</a></li>
<li><a href="cloturerVotation.php?action=cloture">Fermer une votation</a></li>
<li><a href="envoiMailing.php">Envoyer le mailing</a></li>
<li><a href="modifVotation.php?action=cloture">Fermer une votation</a></li>
<li><a href="envoiMailing.php.php">Envoyer le mailing</a></li>
</ul>

View File

@ -3,7 +3,7 @@
require_once '../session_init.php';
require_once 'config.inc.php';
require_once 'db.class.php';
require_once './entete.html';
require_once './entete.php';
require_once 'fonctions.inc.php';
$action = $_GET["action"];
@ -22,7 +22,7 @@ $db = new db();
if (empty($action))
{
$action="modif";
choixVotation('/gestionsite/modifVotation.php') ;
choixVotation('./modifVotation.php') ;
}else
{
@ -31,7 +31,7 @@ if (empty($action))
if (empty($idVotation))
{
// choix de la votation à cloturer
choixVotation('/gestionsite/modifVotation.php',1 );
choixVotation('./modifVotation.php',1 );
}else
{
$query = "UPDATE liste_votations SET status=0 WHERE id=" . $db->protect($idVotation); // clotûre

View File

@ -51,22 +51,22 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="hidden">
<a href="https://lalis.fr/index.html#page-top"></a>
<a href="<?php echo $site_path;?>/index.html#page-top"></a>
</li>
<li class="page-scroll">
<a href="https://lalis.fr/index.html#content">Présentation</a>
<a href="<?php echo $site_path;?>/index.html#content">Présentation</a>
</li>
<li class="page-scroll">
<a href="https://lalis.fr/index.html#about">Nos engagements</a>
<a href="<?php echo $site_path;?>/index.html#about">Nos engagements</a>
</li>
<li class="page-scroll">
<a href="https://lalis.fr/index.html#horaires">Horaires</a>
<a href="<?php echo $site_path;?>/index.html#horaires">Horaires</a>
</li>
<li class="page-scroll">
<a href="https://lalis.fr/index.html#contact">Contact</a>
<a href="<?php echo $site_path;?>/index.html#contact">Contact</a>
</li>
<li class="page-scroll">
<a href="https://lalis.fr/index.html/votations.php">Votations</a>
<a href="<?php echo $site_path;?>/votations.php">Votations</a>
</li>
</ul>
</div><div><a>Association loi 1901</a></div>

View File

@ -76,7 +76,7 @@ function choixVotation($path, $methode=2) //2 = toutes les votations 1 = votat
}
$result = $db->query($query);
$votations = $db->result->fetch_all(MYSQLI_ASSOC);
print ('<form method="get" action="gestionsite/modifVotation.php">');
print ('<form method="get" action="' . $path . '">');
print "<pre>";
if ($db->result->num_rows == 1)
{
@ -96,7 +96,7 @@ function choixVotation($path, $methode=2) //2 = toutes les votations 1 = votat
}
print '</pre><br>
<div>
<input type="submit" value="Voter">
<input type="submit" value="Envoyer">
</div>
</form>';
}

View File

@ -13,6 +13,6 @@ set_include_path(get_include_path() . ':' .$base_path . '/include');
$cookiesparams = session_get_cookie_params();
//session_set_cookie_params ( 0, $cookiesparams["path"], $cookiesparams["domain"], true, true );
//session_start();
$site_path="https://lalis69.ddns.net:10443";
?>

View File

@ -4,7 +4,7 @@ require_once 'session_init.php';
require_once 'config.inc.php';
require_once 'db.class.php';
require_once "log.php";
require_once 'entete.html';
require_once 'entete.php';
$idVotant = trim(base64_decode(urldecode($_GET["id"])), " \n\r");
$idVotation = $_GET["v"];

View File

@ -3,7 +3,7 @@
require "session_init.php";
require "config.inc.php";
require "db.class.php";
require_once 'entete.html';
require_once 'entete.php';
$idVotant=$_GET["id"];
$votation=$_GET["v"];

View File

@ -3,7 +3,7 @@
require_once 'session_init.php';
require_once 'config.inc.php';
require_once 'db.class.php';
require_once 'entete.html';
require_once 'entete.php';
require_once 'fonctions.inc.php';
print '<script type="text/javascript">
function show(object, idVote)
@ -20,21 +20,22 @@ print '<script type="text/javascript">
}
</script>';
$idVotation = $_GET["id"];
$db = new db();
if ( empty($idVotation))
{
choixVotation('/vote.resultat.php');
}else
{
print(' <br><br>
$db = new db();
print(' <br><br>
<!-- lalis Grid Section -->
<section id="content">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<div class="col-lg-12 text-center"><h3>LISTE DES VOTATIONS</h3>');
if ( empty( $_GET["id"]))
{
choixVotation('/vote.resultat.php');
}else
{
$idVotation = $_GET["id"];
print('
<h3>VOTE</h3>
<h4>');
$query = 'SELECT *, UNIX_TIMESTAMP(DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf FROM liste_votations WHERE id=' . $db->protect($idVotation);

4
www.serveur_lalis.kdev4 Normal file
View File

@ -0,0 +1,4 @@
[Project]
CreatedFrom=
Manager=KDevGenericManager
Name=serveur-vote-lalis