diff --git a/.gitignore b/.gitignore
index f6e467c..90c4c5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,7 @@ framanav
nav
app/inc/constants.php
vendor
+.settings/
+.project
+cache/
+tpl_c/
diff --git a/adminstuds.php b/adminstuds.php
index daee4b7..53a0122 100644
--- a/adminstuds.php
+++ b/adminstuds.php
@@ -29,10 +29,6 @@ if (file_exists('bandeaux_local.php')) {
include_once('bandeaux.php');
}
-// Initialisation des variables
-$numsondageadmin = false;
-$sondage = false;
-
// recuperation du numero de sondage admin (24 car.) dans l'URL
if (!empty($_GET['sondage']) && is_string($_GET['sondage']) && strlen($_GET['sondage']) === 24) {
$admin_poll_id = $_GET["sondage"];
@@ -45,7 +41,7 @@ if (preg_match(";[\w\d]{24};i", $admin_poll_id)) {
$prepared->execute(array($admin_poll_id));
$poll = $prepared->fetch();
$prepared->closeCursor();
-
+
$prepared = $connect->prepare('SELECT * FROM sujet_studs WHERE id_sondage = ?');
$prepared->execute(array($poll_id));
$sujets = $prepared->fetchAll();
@@ -79,14 +75,14 @@ $smtp_allowed = $config['use_smtp'];
function send_mail_admin() {
global $email_admin;
global $poll_title;
- global $numsondageadmin;
+ global $admin_poll_id;
global $smtp_allowed;
if($smtp_allowed==true){
if(!isset($_SESSION['mail_admin_sent'])) {
Utils::sendEmail( $email_admin,
_("[ADMINISTRATOR] New settings for your poll") . ' ' . stripslashes( $poll_title ),
_("You have changed the settings of your poll. \nYou can modify this poll with this link") .
- " :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . "\n\n" .
+ " :\n\n" . Utils::getUrlSondage($admin_poll_id, true) . "\n\n" .
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION
);
$_SESSION["mail_admin_sent"]=true;
@@ -106,7 +102,7 @@ if (isset($_POST["boutonnouveautitre"])) {
$sql = $connect->Prepare($sql);
//Email sent to the admin
- if ($connect->Execute($sql, array($nouveautitre, $numsondage))) {
+ if ($connect->Execute($sql, array($nouveautitre, $poll_id))) {
send_mail_admin();
}
}
@@ -124,7 +120,7 @@ if (isset($_POST['boutonnouveauxcommentaires'])) {
$prepared->execute(array($commentaires, $poll_id));
//Email sent to the admin
- if ($connect->Execute($sql, array($commentaires, $numsondage))) {
+ if ($connect->Execute($sql, array($commentaires, $poll_id))) {
send_mail_admin();
}
}
@@ -176,7 +172,7 @@ if (isset($_POST["btn_poll_rules"])) {
// $dsondage= $sondage->FetchObject(false);
if (isset($_POST['ajoutsujet'])) {
- Utils::print_header( _('Add a column') .' - ' . stripslashes( $poll->title));
+ Utils::print_header( _('Add a column') .' - ' . stripslashes($poll->title));
bandeau_titre(_('Make your polls'));
@@ -185,10 +181,10 @@ if (isset($_POST['ajoutsujet'])) {
echo '
-
'."\n";
} else {
- //ajout d'une date avec creneau horaire
+ // ajout d'une date avec creneau horaire
echo '
'. _("You can add a new scheduling date to your poll.").' '._("If you just want to add a new hour to an existant date, put the same date and choose a new hour.") .'
@@ -233,12 +229,12 @@ if (isset($_POST['ajoutsujet'])) {
}
if (isset($_POST["suppressionsondage"])) {
- Utils::print_header( _("Confirm removal of your poll") .' - ' . stripslashes( $dsondage->titre ));
+ Utils::print_header( _("Confirm removal of your poll") .' - ' . stripslashes( $dsondage->title ));
bandeau_titre(_("Confirm removal of your poll"));
echo '
-