Résultats"; $ico = "../img/ico_analyse.png"; $DEBUG = 0; $provisoire = false; $requeteElection = array ( 'select' => array ( "election", "election_date", "election_libelle", "canton_libelle", "election_nbcandidat", "election_nbinscrit", "election_nbvotant", "100-(election_nbvotant*100/election_nbinscrit)", "election_nbexprime", "election_nbnul", "election_nbnul*100/election_nbvotant" ), 'from' => "election INNER JOIN canton ON canton.canton = election.election_canton", 'where' => "election = '".$idx."'" ); $requeteResultat = array ( 'select' => array ( "concat(election_candidat_ordre, ' - ', candidat_nom, ' ', candidat_prenom) as 'Candidat'", "election_candidat_resultat as 'Nombre de votes'", "ROUND(election_candidat_tx*100,2) as 'Pourcentage'" ), 'from' => "election INNER JOIN election_candidat ON election.election = election_candidat.election INNER JOIN candidat on election_candidat.candidat = candidat.candidat", 'where' => "election.election = '".$idx."'", 'orderby' => "election_date DESC" ); } else { /** * 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 = "Analyse -> Résultats par élection -> Choix de l'élection"; /** * Icone à afficher * Ex : $ico = "../img/ico.png"; */ $ico = "../img/ico_analyse.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", "election_date", "election_libelle"); // 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 = -1"; /** * Tableau de noms de champs à rechercher * Ex : $champRecherche = array ("nomtable1.idtable", "libelletable", "nbtable", "phototable"); */ $champRecherche = array ( "election", "election_date", "election_libelle"); // 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 = 40; /////////////////////////////////////////////////////////////////////////////// // 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'] = "tab_resultat.php?obj=res_collectivite&idx="; $href [1]['id'] = ""; $href [1]['lib'] = ""; $href[2]['lien'] = "../pdf/pdfetat.php?idx="; $href[2]['id']= "&obj=res_collectivite"; if(file_exists("../dyn/custom/img/ico_pdf.png")) $href[2]['lib']= ""; else $href[2]['lib']= ""; } ?>