Résultats"; else $ent = "Saisie -> Simulation"; $ico = "../img/ico_saisie.png"; $DEBUG = 0; $provisoire = true; $requeteElection = array ( 'select' => array ( "election.election", "election_date", "election_libelle", "canton_libelle", "election_nbcandidat", "sum(inscrit)", "sum(votant)", "100-(sum(votant)*100/sum(inscrit))", "sum(exprime)", "sum(nul)", "sum(nul)*100/sum(votant)" ), 'from' => "election INNER JOIN resultat ON election.election = resultat.election INNER JOIN canton on canton.canton = election.election_canton", 'where' => "election.election = '".$idx."' GROUP BY election.election" ); $requeteResultat = array ( 'select' => array ( "sum(exprime)" ), 'from' => "resultat", 'where' => "election = '".$idx."'" ); for ($i = 1 ; $i <= $_SESSION ['election']['nbcandidat']; $i++) { $tmp = "sum(candidat".$i.")"; array_push ($requeteResultat ['select'], $tmp); } } else { /** * Fichier : "saisie_election.inc" * Fonction(s) : * - permet de lister les élections non cloturées (non utilisé) * - insertion , modification, impossible (pas de bouton) * - lien modifier affiche un formulaire en hiddenstatic * - deux onglets en sous formulaire permettent de saisir les résultats * Utilisation par : [scr/tab.php], [scr/form.php] */ /** * Variable permettant d'afficher ou non les messages du mode débug (1 : On affiche - 0 : On affiche pas) * Ex : $DEBUG = 1; $DEBUG = 0; */ $DEBUG = 0; /** * Message à afficher * Ex : $ent = "Paramètres -> Utilisateurs"; */ $ent = "Saisie -> Election -> Sélection"; /** * Icone à afficher * Ex : $ico = "../img/ico.png"; */ $ico = "../img/ico_saisie.png"; /** * ???????????????????? * programme édition : nomfichier.pdf.php */ $edition = ""; // SELECT /** * Tableau de noms de champs à afficher * Ex : $champAffiche = array ("nomtable1.idtable", "libelletable", "nbtable", "phototable"); */ $champAffiche = array ( "election", "typeelection as Type", "election_date as Date", "election_libelle as Libellé", "election_tour as Tour", "election_canton as Canton", "election_nbcandidat as Candidats", "election_h_ouver as Ouverture", "election_h_ferm as Fermeture", "election_simulation as Simulation", "election_commentaire as Commentaires"); // FROM /** * Nom de la table à afficher (possibilité d'insérer une jointure) * Ex : $table = "nomtable"; $table = "nomtable1 INNER JOIN nomtable2 ON nomtable1.idtable = nomtable2.idtable"; */ $table = "election"; // WHERE /** * Chaine correspondant à la clause WHERE * Ex : $selection = ""; $selection = "WHERE nbtable > 0"; */ $selection = "WHERE election_cloture = 0 AND election_simulation = 0"; /** * Tableau de noms de champs à rechercher * Ex : $champRecherche = array ("nomtable1.idtable", "libelletable", "nbtable", "phototable"); */ $champRecherche = array ( "election"); // ORDER BY /** * Chaine correspondant à la clause ORDER BY * Ex : $tri = ""; $tri = "ORDER BY libelletable"; */ $tri = "ORDER BY election_date DESC"; // LIMIT /** * Nombre d'enregistrements par page * $serie = 30; */ $serie = 10; /////////////////////////////////////////////////////////////////////////////// // Liens particuliers pour le tableau : (facultatif, les liens sont traités par défaut dans tab.php) /////////////////////////////////////////////////////////////////////////////// $href [0]['lien'] = ""; $href [0]['id'] = ""; $href [0]['lib'] = ""; $href [1]['lien'] = "../trt/session_election.php?idx="; $href [1]['id'] = "&obj=".$obj; $href [1]['lib'] = ""; $href [2]['lien'] = ""; $href [2]['id'] = ""; $href [2]['lib'] = ""; } // Sous formulaire $sousformulaire = array ("saisie_bureau", "verif_saisie", "result"); $sousformulaire_class = "sousformulaire_test"; // dans cg => voir customs ??? $soustab = "onglets_test"; ?>