"; echo""; include("../dyn/entete.inc"); // * custom * if (file_exists ("../dyn/custom/cg.css")) include ("../dyn/custom/cg.css"); else include ("../dyn/cg.css"); //* // * custom * if (file_exists ("../dyn/custom/lien.inc")) include ("../dyn/custom/lien.inc"); else include("../dyn/lien.inc"); //* echo ""; echo ""; echo "
"; if (ereg ("->",$ent)) { // * custom * if (file_exists ("../dyn/custom/img/fleche_droite.png")) $ent = str_replace("->", "", $ent); else $ent = str_replace("->", "", $ent); //* } echo "
".$ent."
"; echo "
aide"; // * custom * if (file_exists ("../dyn/custom/img/ico_aide.png")) echo "aide"; else echo "aide"; //* echo "
"; echo "
"; ?> "; // connexion $db =& DB :: connect ($dsn, $db_option); if (DB :: isError ($db)) die ($db -> getMessage ()); // variables collectivites $res = $db -> query ($sql_collectivite); if (DB :: isError ($res)) die ($res -> getMessage ()." erreur ".$sql_collectivite); while ($row=& $res->fetchRow()) { $ville = $row [0]; $logo = $row [1]; } $res->free(); // variable droit $sql = "select profil from droit where droit = '".$obj."'"; $droit = $db -> getOne ($sql); // librairies utilisées include ("../obj/export.class.php"); if (isset ($_GET ['step'])) $step = $_GET ['step']; else $step = 0; if (isset ($_GET ['idx'])) $idx = $_GET ['idx']; else $idx = 0; If ($_SESSION ['profil'] >= $droit) { if ($step == 0) { // élections disponibles $sql = "select resultat.election, election_libelle from resultat inner join election on resultat.election = election.election group by election"; $res = $db -> query ($sql); if (DB :: isError ($res)) die ($res -> getMessage ()." erreur ".$sql); $elections = array (); while ($row=& $res->fetchRow (DB_FETCHMODE_ASSOC)) array_push ($elections, $row); echo "
Export CSV : resultat (élection en cours) => election_resultat"; foreach ($elections as $lien) { echo "".$lien ['election_libelle']."
"; } echo "
"; } elseif ($step == 1) { $exp = new Export (&$db); $exp -> FromResultatToResultatElection ($idx); echo "Le fichier a été exporté."; echo "\"Voir
"; echo " Retour"; ?> "; include ("../dyn/menu.inc"); echo ""; echo ""; // deconnexion $db->disconnect(); ?>