Exemplo n.º 1
0
         echo "<div id=\"" . $id_page . "-dialog\"></div>";
         aff_table($id_page . "-liste", false, true);
     }
     echo "</div>";
     //------------------------------------------------------------------------------ #Log
     echo "<div id=\"log\">";
     if ($niveau['all'] >= 255) {
         $id_page = "admin-log";
         echo "<div id=\"titre2\">";
         echo $lang[$lang_select]["titre_" . $id_page];
         echo "</div>";
         echo "<div style=\"float:right;\">";
         echo "<button id=\"" . $id_page . "-del-button\">" . $lang[$lang_select]['del'] . "</button> ";
         echo "</div>";
         echo "<div id=\"" . $id_page . "-dialog\"></div>";
         aff_table($id_page . "-liste", true, false);
     }
     echo "</div>";
     break;
     //------------------------------------------------------------------------------ #Envoi des mots de passes (Super Admin)
 //------------------------------------------------------------------------------ #Envoi des mots de passes (Super Admin)
 case "mdp":
     $sujet = "[FCBN] Accès à la plateforme CODEX";
     $select = $_GET['select'];
     if (!empty($select) and strpos($select, '&') == null) {
         $query = "SELECT a.id_user, lib_cbn, nom, prenom, login, pw, tel_bur, tel_port, email, web, descr, aze.lr,qsd.eee,wxc.refnat,zer.catnat,sdf.lsi,xcv.fsd,ref_lr, ref_eee, ref_lsi, ref_catnat, ref_refnat,ref_fsd\n\t    FROM applications.utilisateur a\n\t\tJOIN referentiels.cbn z ON a.id_cbn = z.id_cbn\n\t\tJOIN (SELECT id_user, lib as lr FROM applications.utilisateur a JOIN referentiels.user_ref z ON niveau_lr = cd) as aze ON aze.id_user = a.id_user\n\t\tJOIN (SELECT id_user, lib as eee FROM applications.utilisateur a JOIN referentiels.user_ref z ON niveau_eee = cd) as qsd ON qsd.id_user = a.id_user\n\t\tJOIN (SELECT id_user, lib as refnat FROM applications.utilisateur a JOIN referentiels.user_ref z ON niveau_refnat = cd) as wxc ON wxc.id_user = a.id_user\n\t\tJOIN (SELECT id_user, lib as catnat FROM applications.utilisateur a JOIN referentiels.user_ref z ON niveau_catnat = cd) as zer ON zer.id_user = a.id_user\n\t\tJOIN (SELECT id_user, lib as lsi FROM applications.utilisateur a JOIN referentiels.user_ref z ON niveau_lsi = cd) as sdf ON sdf.id_user = a.id_user\n\t\tJOIN (SELECT id_user, lib as fsd FROM applications.utilisateur a JOIN referentiels.user_ref z ON niveau_fsd = cd) as xcv ON xcv.id_user = a.id_user\n\t\tWHERE a.id_user = '******';\n\t\t";
         $result = pg_query($db, $query) or die("Erreur pgSQL : " . pg_result_error($result));
         $row = pg_fetch_array($result);
         $message_html = msg_pw($row);
         envoi_mail($row['email'], $sujet, $message_html, "");
     } elseif (strlen($select) > 0) {
Exemplo n.º 2
0
?>
<!DOCTYPE html PUBLIC "-//W3C//Dtd html 4.0 Transitional//EN">
<html>
	<head>
		<meta HTTP-EQUIV="CONTENT-TYPE" content="text/html; charset=UTF-8">
		<title>script</title>
	</head>
  <body>
  	<h1> Choisir une table dans la liste </h1>
  	<?php 
$table = $_GET["table"];
$colone = $_GET["colone"];
$liste = '';
for ($i = 0; $i < count($colone); $i++) {
    $liste = $liste . $colone[$i];
    if ($i < count($colone) - 1) {
        $liste = $liste . ",";
    }
    $liste = $liste . " ";
}
echo $liste;
echo $table;
$req = "SELECT " . $liste . " FROM " . $table . "";
$query = pg_query($dbconn, $req);
aff_table($query);
echo "<a href='http://www.ecole.ensicaen.fr/~pelay/BDD/script3.php?table=" . $table . "' >Retour au choix des colones</a> ";
echo "</br>";
echo "<a href='http://www.ecole.ensicaen.fr/~pelay/BDD/script2.php'> Retour au choix de la table</a>";
?>
  </body>
</html>