diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65f5f1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.kate* diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..5a928f6 --- /dev/null +++ b/.htaccess @@ -0,0 +1 @@ +Options -Indexes diff --git a/gestionsite/.htpasswd b/gestionsite/.htpasswd index 90a297b..e4ed400 100644 --- a/gestionsite/.htpasswd +++ b/gestionsite/.htpasswd @@ -1 +1 @@ -daniel:$apr1$Up83RCLZ$x46wYId2latEFsJARi/cL/ +daniel:$apr1$67uwe85A$ygTTmLOR/DxIJgPMqGVox. diff --git a/gestionsite/entete.html b/gestionsite/entete.php similarity index 100% rename from gestionsite/entete.html rename to gestionsite/entete.php diff --git a/gestionsite/envoiMailing.php b/gestionsite/envoiMailing.php index d7a1ec9..569183e 100644 --- a/gestionsite/envoiMailing.php +++ b/gestionsite/envoiMailing.php @@ -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 '
' . $adherent['email'] . ' ' . $adherent['firstname'] . ' ' . $adherent['lastname'] . EOLH . nl2br($text) . '
'; 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=''); } diff --git a/gestionsite/index.php b/gestionsite/index.php index 36928fb..2d7456e 100644 --- a/gestionsite/index.php +++ b/gestionsite/index.php @@ -2,7 +2,7 @@ require_once '../session_init.php'; require_once 'config.inc.php'; -require_once './entete.html'; +require_once 'entete.php'; print('

@@ -20,7 +20,7 @@ print('

  • nouvelle votations
  • Modifier une votation
  • Fermer une votation
  • -
  • Envoyer le mailing
  • +
  • Envoyer le mailing
  • diff --git a/gestionsite/modifVotation.php b/gestionsite/modifVotation.php index c15ff90..1f2b00a 100644 --- a/gestionsite/modifVotation.php +++ b/gestionsite/modifVotation.php @@ -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 diff --git a/include/entete.html b/include/entete.php similarity index 84% rename from include/entete.html rename to include/entete.php index 6f29759..9576125 100644 --- a/include/entete.html +++ b/include/entete.php @@ -51,22 +51,22 @@
    Association loi 1901
    diff --git a/include/fonctions.inc.php b/include/fonctions.inc.php index b935448..2e108c4 100644 --- a/include/fonctions.inc.php +++ b/include/fonctions.inc.php @@ -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 ('
    '); + print (''); print "
    ";
     	if ($db->result->num_rows == 1)
     	{
    @@ -96,7 +96,7 @@ function choixVotation($path, $methode=2)		//2 = toutes les votations  1 = votat
     	}
     	print '

    - +
    '; } diff --git a/session_init.php b/session_init.php index 3d25cea..97311b0 100644 --- a/session_init.php +++ b/session_init.php @@ -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"; ?> diff --git a/vote.form.php b/vote.form.php index b3357b4..7e2e397 100644 --- a/vote.form.php +++ b/vote.form.php @@ -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"]; diff --git a/vote.php b/vote.php index 806c891..748ef8c 100644 --- a/vote.php +++ b/vote.php @@ -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"]; diff --git a/vote.resultat.php b/vote.resultat.php index 390a752..bcff0dc 100644 --- a/vote.resultat.php +++ b/vote.resultat.php @@ -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 ''; -$idVotation = $_GET["id"]; -$db = new db(); -if ( empty($idVotation)) -{ - choixVotation('/vote.resultat.php'); -}else -{ - print('

    +$db = new db(); +print('

    -
    +

    LISTE DES VOTATIONS

    '); +if ( empty( $_GET["id"])) +{ + choixVotation('/vote.resultat.php'); +}else +{ + $idVotation = $_GET["id"]; + print('

    VOTE

    '); $query = 'SELECT *, UNIX_TIMESTAMP(DATE_ADD(dateFin, INTERVAL 1 DAY)) as tf FROM liste_votations WHERE id=' . $db->protect($idVotation);