Commit 457bc94f authored by Ayolo's avatar Ayolo

j espere que j ai pas fait de la boue dans mon script

parent 0d72bb80
...@@ -27,26 +27,26 @@ ...@@ -27,26 +27,26 @@
include($topdir. "include/site.inc.php"); include($topdir. "include/site.inc.php");
include($topdir. "include/entities/page.inc.php"); include($topdir. "include/entities/page.inc.php");
$site = new site (); $site = new site ();
$site->start_page("none","Erreur 403"); $site->start_page("none","Erreur 403");
if ( !$site->user->is_valid() ) if ( !$site->user->is_valid() )
{ {
$cts = new contents("Veuillez vous connecter pour accéder à  la page demandée"); $cts = new contents("Veuillez vous connecter pour accéder à  la page demandée");
if ( $_SESSION['session_redirect'] ) if ( $_SESSION['session_redirect'] )
$cts->add_paragraph("Vous serez automatiquement redirigé vers la page que vous avez demandé."); $cts->add_paragraph("Vous serez automatiquement redirigé vers la page que vous avez demandé.");
$frm = new form("connect2","connect.php",true,"POST","Connexion"); $frm = new form("connect2","connect.php",true,"POST","Connexion");
$frm->add_select_field("domain","Connexion",array("utbm"=>"UTBM","assidu"=>"Assidu","id"=>"ID","autre"=>"Autre","alias"=>"Alias")); $frm->add_select_field("domain","Connexion",array("utbm"=>"UTBM","assidu"=>"Assidu","id"=>"ID","autre"=>"Autre","alias"=>"Alias"));
$frm->add_text_field("username","Utilisateur","prenom.nom","",27); $frm->add_text_field("username","Utilisateur","prenom.nom","",27);
$frm->add_password_field("password","Mot de passe","","",27); $frm->add_password_field("password","Mot de passe","","",27);
$frm->add_submit("connectbtn2","Se connecter"); $frm->add_submit("connectbtn2","Se connecter");
$cts->add($frm,true); $cts->add($frm,true);
$site->add_contents($cts); $site->add_contents($cts);
} }
...@@ -57,7 +57,7 @@ else ...@@ -57,7 +57,7 @@ else
$site->add_contents(new error("Accés refusé (403)",$_REQUEST['reason'])); $site->add_contents(new error("Accés refusé (403)",$_REQUEST['reason']));
else else
$site->add_contents(new error("Accés refusé (403)","Vous n'avez pas les droits requis pour accéder à  cette page.")); $site->add_contents(new error("Accés refusé (403)","Vous n'avez pas les droits requis pour accéder à  cette page."));
} }
$site->end_page(); $site->end_page();
?> ?>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA. * 02111-1307, USA.
*/ */
/** @file /** @file
* *
* @brief Page d'erreur HTTP 404 * @brief Page d'erreur HTTP 404
...@@ -30,12 +30,12 @@ Header("HTTP/1.0 404 Not Found"); ...@@ -30,12 +30,12 @@ Header("HTTP/1.0 404 Not Found");
include($topdir. "include/site.inc.php"); include($topdir. "include/site.inc.php");
include($topdir. "include/entities/page.inc.php"); include($topdir. "include/entities/page.inc.php");
$site = new site (); $site = new site ();
$site->start_page("none","Erreur 404"); $site->start_page("none","Erreur 404");
$site->add_contents(new error("Page inconnue (404)","Merci de vérifier le lien que vous avez emprunté")); $site->add_contents(new error("Page inconnue (404)","Merci de vérifier le lien que vous avez emprunté"));
$site->end_page(); $site->end_page();
?> ?>
...@@ -35,7 +35,7 @@ if (!$site->user->is_in_group ("gestion_ae")) ...@@ -35,7 +35,7 @@ if (!$site->user->is_in_group ("gestion_ae"))
$site->start_page("none","Activités"); $site->start_page("none","Activités");
$req_assos = new requete($site->db, "SELECT asso_parent.id_asso AS id_asso_parent, $req_assos = new requete($site->db, "SELECT asso_parent.id_asso AS id_asso_parent,
asso_parent.nom_asso AS nom_asso_parent, asso_parent.nom_asso AS nom_asso_parent,
asso.id_asso AS id_asso, asso.id_asso AS id_asso,
asso.nom_asso AS nom_asso, asso.nom_asso AS nom_asso,
utilisateurs_resp.id_utilisateur as id_utilisateur_resp, utilisateurs_resp.id_utilisateur as id_utilisateur_resp,
...@@ -44,12 +44,12 @@ $req_assos = new requete($site->db, "SELECT asso_parent.id_asso AS id_asso_paren ...@@ -44,12 +44,12 @@ $req_assos = new requete($site->db, "SELECT asso_parent.id_asso AS id_asso_paren
CONCAT(utilisateurs_tres.nom_utl,' ',utilisateurs_tres.prenom_utl) AS nom_utilisateur_tres CONCAT(utilisateurs_tres.nom_utl,' ',utilisateurs_tres.prenom_utl) AS nom_utilisateur_tres
FROM asso FROM asso
LEFT JOIN asso_membre AS tbl_resp ON (tbl_resp.id_asso=asso.id_asso AND tbl_resp.role='10' AND tbl_resp.date_fin IS NULL) LEFT JOIN asso_membre AS tbl_resp ON (tbl_resp.id_asso=asso.id_asso AND tbl_resp.role='10' AND tbl_resp.date_fin IS NULL)
LEFT JOIN asso_membre AS tbl_tres ON (tbl_tres.id_asso=asso.id_asso AND tbl_tres.role='7' AND tbl_tres.date_fin IS NULL) LEFT JOIN asso_membre AS tbl_tres ON (tbl_tres.id_asso=asso.id_asso AND tbl_tres.role='7' AND tbl_tres.date_fin IS NULL)
LEFT JOIN utilisateurs AS utilisateurs_resp ON tbl_resp.id_utilisateur=utilisateurs_resp.id_utilisateur LEFT JOIN utilisateurs AS utilisateurs_resp ON tbl_resp.id_utilisateur=utilisateurs_resp.id_utilisateur
LEFT JOIN utilisateurs AS utilisateurs_tres ON tbl_tres.id_utilisateur=utilisateurs_tres.id_utilisateur LEFT JOIN utilisateurs AS utilisateurs_tres ON tbl_tres.id_utilisateur=utilisateurs_tres.id_utilisateur
INNER JOIN asso AS asso_parent ON asso.id_asso_parent=asso_parent.id_asso INNER JOIN asso AS asso_parent ON asso.id_asso_parent=asso_parent.id_asso
WHERE asso.id_asso_parent IN (SELECT id_asso FROM asso WHERE id_asso_parent='1') WHERE asso.id_asso_parent IN (SELECT id_asso FROM asso WHERE id_asso_parent='1')
GROUP BY asso.id_asso GROUP BY asso.id_asso
ORDER BY asso_parent.nom_asso, asso.nom_asso"); ORDER BY asso_parent.nom_asso, asso.nom_asso");
$table = new sqltable("", "Liste des responsables et des trésoriers des activités", $req_assos, "", "", $table = new sqltable("", "Liste des responsables et des trésoriers des activités", $req_assos, "", "",
......
...@@ -38,4 +38,4 @@ else if ( $_REQUEST['action'] == "admin" || $_REQUEST['page'] == "admin" ) ...@@ -38,4 +38,4 @@ else if ( $_REQUEST['action'] == "admin" || $_REQUEST['page'] == "admin" )
header("Location:../asso.php"); header("Location:../asso.php");
exit(); exit();
?> ?>
\ No newline at end of file
This diff is collapsed.
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA. * 02111-1307, USA.
*/ */
$topdir = "../"; $topdir = "../";
require_once($topdir. "include/site.inc.php"); require_once($topdir. "include/site.inc.php");
require_once($topdir."include/cts/board.inc.php"); require_once($topdir."include/cts/board.inc.php");
...@@ -32,7 +32,7 @@ $site = new site (); ...@@ -32,7 +32,7 @@ $site = new site ();
if ( !$site->user->is_in_group("moderateur_site") ) if ( !$site->user->is_in_group("moderateur_site") )
$site->error_forbidden(); $site->error_forbidden();
$site->start_page("none","Tâches courantes Com` AE"); $site->start_page("none","Tâches courantes Com` AE");
$cts = new contents("Tâches courantes de la Com` AE"); $cts = new contents("Tâches courantes de la Com` AE");
...@@ -46,7 +46,7 @@ $sublist->add("<a href=\"../article.php?name=info:welcome\">Texte d'acceuil pour ...@@ -46,7 +46,7 @@ $sublist->add("<a href=\"../article.php?name=info:welcome\">Texte d'acceuil pour
$board->add($sublist,true); $board->add($sublist,true);
$sublist = new itemlist("Modération"); $sublist = new itemlist("Modération");
$req = new requete($site->db,"SELECT COUNT(*) FROM `nvl_nouvelles` WHERE `modere_nvl`='0' "); $req = new requete($site->db,"SELECT COUNT(*) FROM `nvl_nouvelles` WHERE `modere_nvl`='0' ");
list($nbnews) = $req->get_row(); list($nbnews) = $req->get_row();
...@@ -80,7 +80,7 @@ else ...@@ -80,7 +80,7 @@ else
$board->add($sublist,true); $board->add($sublist,true);
$sublist = new itemlist("Divers"); $sublist = new itemlist("Divers");
$sublist->add("<a href=\"sondage.php\">Sondages</a>"); $sublist->add("<a href=\"sondage.php\">Sondages</a>");
$sublist->add("<a href=\"weekmail.php\">Weekmail</a>"); $sublist->add("<a href=\"weekmail.php\">Weekmail</a>");
$board->add($sublist,true); $board->add($sublist,true);
...@@ -88,7 +88,7 @@ $board->add($sublist,true); ...@@ -88,7 +88,7 @@ $board->add($sublist,true);
$cts->add($board); $cts->add($board);
$site->add_contents($cts); $site->add_contents($cts);
$site->end_page(); $site->end_page();
?> ?>
...@@ -35,27 +35,27 @@ if ( !$site->user->is_in_group("gestion_ae") ) ...@@ -35,27 +35,27 @@ if ( !$site->user->is_in_group("gestion_ae") )
if ( isset($_REQUEST["id_election"])) if ( isset($_REQUEST["id_election"]))
{ {
$elec->load_by_id($_REQUEST["id_election"]); $elec->load_by_id($_REQUEST["id_election"]);
if ( $elec->id < 1 ) if ( $elec->id < 1 )
{ {
$site->error_not_found(); $site->error_not_found();
exit(); exit();
} }
} }
if ( $_REQUEST["action"] == "newelec" ) if ( $_REQUEST["action"] == "newelec" )
{ {
if ( !$_REQUEST["name"] ) if ( !$_REQUEST["name"] )
$ErrorElec="Pécisez un nom"; $ErrorElec="Pécisez un nom";
elseif ( $_REQUEST["fin"] <= $_REQUEST["debut"] ) elseif ( $_REQUEST["fin"] <= $_REQUEST["debut"] )
$ErrorElec="Dates et heures invalides"; $ErrorElec="Dates et heures invalides";
else else
$elec->new_election($_REQUEST["groupid"],$_REQUEST["debut"],$_REQUEST["fin"],$_REQUEST["name"]); $elec->new_election($_REQUEST["groupid"],$_REQUEST["debut"],$_REQUEST["fin"],$_REQUEST["name"]);
} }
if ( $elec->id > 0 ) if ( $elec->id > 0 )
{ {
if ( $_REQUEST["action"] == "addposte" ) if ( $_REQUEST["action"] == "addposte" )
{ {
if ( !$_REQUEST["name"] ) if ( !$_REQUEST["name"] )
...@@ -66,20 +66,20 @@ if ( $elec->id > 0 ) ...@@ -66,20 +66,20 @@ if ( $elec->id > 0 )
elseif ( $_REQUEST["action"] == "addliste" ) elseif ( $_REQUEST["action"] == "addliste" )
{ {
$user = new utilisateur($site->db); $user = new utilisateur($site->db);
$user->load_by_id($_REQUEST["id_utilisateur_head"]); $user->load_by_id($_REQUEST["id_utilisateur_head"]);
if ( !$user->is_valid() && !$user->ae) if ( !$user->is_valid() && !$user->ae)
$ErrorListe = "Tête de liste erronée ou non cotisante"; $ErrorListe = "Tête de liste erronée ou non cotisante";
elseif ( !$_REQUEST["nom"]) elseif ( !$_REQUEST["nom"])
$ErrorListe = "Précisez un nom"; $ErrorListe = "Précisez un nom";
else else
{ {
$rq = $elec->add_liste($user->id,$_REQUEST["nom"]); $rq = $elec->add_liste($user->id,$_REQUEST["nom"]);
$id_liste = $rq->get_id(); $id_liste = $rq->get_id();
$sql = new requete($site->db,"SELECT id_poste FROM vt_postes WHERE id_election='".$elec->id."'"); $sql = new requete($site->db,"SELECT id_poste FROM vt_postes WHERE id_election='".$elec->id."'");
while ( list($id_poste) = $sql->get_row() ) while ( list($id_poste) = $sql->get_row() )
{ {
...@@ -90,29 +90,29 @@ if ( $elec->id > 0 ) ...@@ -90,29 +90,29 @@ if ( $elec->id > 0 )
$elec->add_candidat($user->id, $id_poste, $id_liste); $elec->add_candidat($user->id, $id_poste, $id_liste);
} }
} }
} }
} }
elseif ( $_REQUEST["action"] == "addcandidat" ) elseif ( $_REQUEST["action"] == "addcandidat" )
{ {
$user = new utilisateur($site->db); $user = new utilisateur($site->db);
$user->load_by_id($_REQUEST["id_utilisateur"]); $user->load_by_id($_REQUEST["id_utilisateur"]);
if ( $user->is_valid() && $user->ae) if ( $user->is_valid() && $user->ae)
{ {
$id_poste=$_REQUEST["id_poste"]; $id_poste=$_REQUEST["id_poste"];
$id_liste=null; $id_liste=null;
if ( $_REQUEST["id_liste"] > 0 ) if ( $_REQUEST["id_liste"] > 0 )
$id_liste=$_REQUEST["id_liste"]; $id_liste=$_REQUEST["id_liste"];
$elec->add_candidat($user->id, $id_poste, $id_liste); $elec->add_candidat($user->id, $id_poste, $id_liste);
} }
else else
$ErrorCandidat = "Utilisateur iconnu ou non cotisant"; $ErrorCandidat = "Utilisateur iconnu ou non cotisant";
} }
elseif ( $_REQUEST["action"] == "delete" ) elseif ( $_REQUEST["action"] == "delete" )
{ {
if ( isset($_REQUEST["id_liste"]) ) if ( isset($_REQUEST["id_liste"]) )
$elec->remove_liste($_REQUEST["id_liste"]); $elec->remove_liste($_REQUEST["id_liste"]);
elseif ( isset($_REQUEST["id_poste"])) elseif ( isset($_REQUEST["id_poste"]))
...@@ -120,28 +120,28 @@ if ( $elec->id > 0 ) ...@@ -120,28 +120,28 @@ if ( $elec->id > 0 )
else else
{ {
list($id_poste,$id_utilisateur) = explode(",",$_REQUEST["id_candidature"]); list($id_poste,$id_utilisateur) = explode(",",$_REQUEST["id_candidature"]);
$elec->remove_candidat($id_utilisateur,$id_poste); $elec->remove_candidat($id_utilisateur,$id_poste);
} }
} }
$site->start_page("none","Election"); $site->start_page("none","Election");
$cts = new contents($elec->nom); $cts = new contents($elec->nom);
$cts->add_paragraph("Election du ".date("d/m/Y H:s",$elec->debut)." au ".date("d/m/Y H:s",$elec->fin)); $cts->add_paragraph("Election du ".date("d/m/Y H:s",$elec->debut)." au ".date("d/m/Y H:s",$elec->fin));
$cts->add_paragraph("<a href=\"../elections.php?id_election=".$elec->id."&page=results\">Resultats</a>"); $cts->add_paragraph("<a href=\"../elections.php?id_election=".$elec->id."&page=results\">Resultats</a>");
$sql = new requete($site->db,"SELECT * FROM vt_postes WHERE id_election='".$elec->id."'"); $sql = new requete($site->db,"SELECT * FROM vt_postes WHERE id_election='".$elec->id."'");
while ( $row = $sql->get_row() ) while ( $row = $sql->get_row() )
$postes[$row["id_poste"]] = $row["nom_poste"]; $postes[$row["id_poste"]] = $row["nom_poste"];
$listes[0] = "Independant"; $listes[0] = "Independant";
$sql = new requete($site->db,"SELECT * FROM vt_liste_candidat WHERE id_election='".$elec->id."'"); $sql = new requete($site->db,"SELECT * FROM vt_liste_candidat WHERE id_election='".$elec->id."'");
while ( $row = $sql->get_row() ) while ( $row = $sql->get_row() )
$listes[$row["id_liste"]] = $row["nom_liste"]; $listes[$row["id_liste"]] = $row["nom_liste"];
$req = new requete($site->db, $req = new requete($site->db,
"SELECT `utilisateurs`.`id_utilisateur`, " . "SELECT `utilisateurs`.`id_utilisateur`, " .
"CONCAT(`utilisateurs`.`prenom_utl`,' ',`utilisateurs`.`nom_utl`) as `nom_utilisateur`," . "CONCAT(`utilisateurs`.`prenom_utl`,' ',`utilisateurs`.`nom_utl`) as `nom_utilisateur`," .
...@@ -154,15 +154,15 @@ if ( $elec->id > 0 ) ...@@ -154,15 +154,15 @@ if ( $elec->id > 0 )
"LEFT JOIN `vt_liste_candidat` ON `vt_liste_candidat`.`id_liste`=`vt_candidat`.`id_liste` " . "LEFT JOIN `vt_liste_candidat` ON `vt_liste_candidat`.`id_liste`=`vt_candidat`.`id_liste` " .
"WHERE `vt_postes`.`id_election`='".$elec->id."' " . "WHERE `vt_postes`.`id_election`='".$elec->id."' " .
"ORDER BY `vt_candidat`.`id_poste`,`vt_liste_candidat`.`nom_liste`"); "ORDER BY `vt_candidat`.`id_poste`,`vt_liste_candidat`.`nom_liste`");
$tbl = new sqltable("lstcand","Candidats",$req,"elections.php?id_election=".$elec->id,"id_candidature", $tbl = new sqltable("lstcand","Candidats",$req,"elections.php?id_election=".$elec->id,"id_candidature",
array("nom_utilisateur"=>"Candidat","nom_poste"=>"Poste","nom_liste"=>"Liste"), array("nom_utilisateur"=>"Candidat","nom_poste"=>"Poste","nom_liste"=>"Liste"),
array("delete"=>"Supprimer"),array(), array("delete"=>"Supprimer"),array(),
array()); array());
$cts->add($tbl,true); $cts->add($tbl,true);
$req = new requete($site->db, $req = new requete($site->db,
"SELECT `utilisateurs`.`id_utilisateur`, " . "SELECT `utilisateurs`.`id_utilisateur`, " .
"CONCAT(`utilisateurs`.`prenom_utl`,' ',`utilisateurs`.`nom_utl`) as `nom_utilisateur`," . "CONCAT(`utilisateurs`.`prenom_utl`,' ',`utilisateurs`.`nom_utl`) as `nom_utilisateur`," .
...@@ -171,33 +171,33 @@ if ( $elec->id > 0 ) ...@@ -171,33 +171,33 @@ if ( $elec->id > 0 )
"FROM `vt_liste_candidat` " . "FROM `vt_liste_candidat` " .
"INNER JOIN `utilisateurs` ON `utilisateurs`.`id_utilisateur`=`vt_liste_candidat`.`id_utilisateur` " . "INNER JOIN `utilisateurs` ON `utilisateurs`.`id_utilisateur`=`vt_liste_candidat`.`id_utilisateur` " .
"WHERE `vt_liste_candidat`.`id_election`='".$elec->id."' " . "WHERE `vt_liste_candidat`.`id_election`='".$elec->id."' " .
"ORDER BY `vt_liste_candidat`.`nom_liste`"); "ORDER BY `vt_liste_candidat`.`nom_liste`");
$tbl = new sqltable("lstlst","Listes",$req,"elections.php?id_election=".$elec->id,"id_liste", $tbl = new sqltable("lstlst","Listes",$req,"elections.php?id_election=".$elec->id,"id_liste",
array("nom_liste"=>"Nom","nom_utilisateur"=>"Tête de liste"), array("nom_liste"=>"Nom","nom_utilisateur"=>"Tête de liste"),
array("delete"=>"Supprimer"),array(), array("delete"=>"Supprimer"),array(),
array()); array());
$cts->add($tbl,true); $cts->add($tbl,true);
$req = new requete($site->db,"SELECT * FROM vt_postes WHERE id_election='".$elec->id."'"); $req = new requete($site->db,"SELECT * FROM vt_postes WHERE id_election='".$elec->id."'");
$tbl = new sqltable("lstpst","Postes",$req,"elections.php?id_election=".$elec->id,"id_poste", $tbl = new sqltable("lstpst","Postes",$req,"elections.php?id_election=".$elec->id,"id_poste",
array("nom_poste"=>"Nom du poste","description_poste"=>"Description"), array("nom_poste"=>"Nom du poste","description_poste"=>"Description"),
array("delete"=>"Supprimer"),array(), array("delete"=>"Supprimer"),array(),
array()); array());
$cts->add($tbl,true); $cts->add($tbl,true);
$frm = new form("addposte","elections.php?id_election=".$elec->id,$ErrorPoste!="","POST","Ajouter un poste"); $frm = new form("addposte","elections.php?id_election=".$elec->id,$ErrorPoste!="","POST","Ajouter un poste");
$frm->add_hidden("action","addposte"); $frm->add_hidden("action","addposte");
if ( $ErrorPoste ) if ( $ErrorPoste )
$frm->error($ErrorPoste); $frm->error($ErrorPoste);
$frm->add_text_field("name","Nom","",true); $frm->add_text_field("name","Nom","",true);
$frm->add_text_area("description","Description"); $frm->add_text_area("description","Description");
$frm->add_submit("save","Ajouter"); $frm->add_submit("save","Ajouter");
$cts->add($frm,true); $cts->add($frm,true);
$frm = new form("addliste","elections.php?id_election=".$elec->id,$ErrorListe!="","POST","Ajouter une liste"); $frm = new form("addliste","elections.php?id_election=".$elec->id,$ErrorListe!="","POST","Ajouter une liste");
$frm->add_hidden("action","addliste"); $frm->add_hidden("action","addliste");
if ( $ErrorListe ) if ( $ErrorListe )
...@@ -211,7 +211,7 @@ if ( $elec->id > 0 ) ...@@ -211,7 +211,7 @@ if ( $elec->id > 0 )
} }
$frm->add_submit("save","Ajouter"); $frm->add_submit("save","Ajouter");
$cts->add($frm,true); $cts->add($frm,true);
if ( count($postes) ) if ( count($postes) )
{ {
$frm = new form("addcandidat","elections.php?id_election=".$elec->id,$ErrorCandidat!="","POST","Ajouter un candidat"); $frm = new form("addcandidat","elections.php?id_election=".$elec->id,$ErrorCandidat!="","POST","Ajouter un candidat");
...@@ -219,18 +219,18 @@ if ( $elec->id > 0 ) ...@@ -219,18 +219,18 @@ if ( $elec->id > 0 )
if ( $ErrorCandidat ) if ( $ErrorCandidat )
$frm->error($ErrorCandidat); $frm->error($ErrorCandidat);
$frm->add_entity_smartselect("id_utilisateur", $frm->add_entity_smartselect("id_utilisateur",
"Candidat", "Candidat",
new utilisateur($site->db)); new utilisateur($site->db));
$frm->add_select_field("id_poste","Poste",$postes); $frm->add_select_field("id_poste","Poste",$postes);
$frm->add_select_field("id_liste","Liste",$listes); $frm->add_select_field("id_liste","Liste",$listes);
$frm->add_submit("save","Ajouter"); $frm->add_submit("save","Ajouter");
$cts->add($frm,true); $cts->add($frm,true);
} }
$site->add_contents($cts); $site->add_contents($cts);
$site->end_page(); $site->end_page();
exit(); exit();
} }
...@@ -240,10 +240,10 @@ $frm = new form("newelec","elections.php",true,"POST","Organiser une élection") ...@@ -240,10 +240,10 @@ $frm = new form("newelec","elections.php",true,"POST","Organiser une élection")
$frm->add_hidden("action","newelec"); $frm->add_hidden("action","newelec");
if ( $ErrorElec ) if ( $ErrorElec )
$frm->error($ErrorElec); $frm->error($ErrorElec);
$frm->add_text_field("name","Nom","",true); $frm->add_text_field("name","Nom","",true);
$frm->add_datetime_field("debut","Date et heure de début",-1,true); $frm->add_datetime_field("debut","Date et heure de début",-1,true);
$frm->add_datetime_field("fin","Date et heure de fin",-1,true); $frm->add_datetime_field("fin","Date et heure de fin",-1,true);
$frm->add_entity_select("groupid","Groupe electeur",$site->db,"group" ); $frm->add_entity_select("groupid","Groupe electeur",$site->db,"group" );
$frm->add_submit("save","Ajouter"); $frm->add_submit("save","Ajouter");
$site->add_contents($frm); $site->add_contents($frm);
...@@ -256,6 +256,6 @@ $tbl = new sqltable("lstelecs","Elections",$sql,"elections.php","id_election", ...@@ -256,6 +256,6 @@ $tbl = new sqltable("lstelecs","Elections",$sql,"elections.php","id_election",
$site->add_contents($tbl); $site->add_contents($tbl);
$site->end_page(); $site->end_page();
?> ?>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA. * 02111-1307, USA.
*/ */