1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
| <?php
header('Content-Type: text/html; charset=UTF-8'); /*obligatoire sur chaque page*/
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> <!--obligatoire sur chaque page-->
<link rel="stylesheet" href="design.css"/>
<link rel="shortcut icon" type="image/x-icon" href="Images/logo_PI.ico" />
<title>GPi_Web</title>
<script type="text/javascript" src='DataTables/media/js/jquery.js'></script>
<script type="text/javascript" src="DataTables/media/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="tableau.js"></script>
<link rel="stylesheet" type="text/css" href="DataTables/media/css/jquery.dataTables.min.css">
</head>
<body>
<div id="bloc_page">
<!-- entête de page -->
<header>
<div id="bandeau">
<div id="bandeau_logo">
<img src="images/logo_PI.png" />
</div>
<?php
$link=mysqli_connect("localhost","root","","GPi_Web");
mysqli_query($link,'SET NAMES utf8');
$res = mysqli_query($link, 'SELECT prenom, fonction FROM 1tbl_utilisat WHERE login = \''.$_SESSION['login'].'\'');
$row = mysqli_fetch_assoc($res);
echo '<h1 id="bandeau_utilisat"> Bonjour '.$row['prenom'].'</h1>';
echo '<script> var $FonctionUtilisat = "'.$row['fonction'].'"</script>';
mysqli_free_result($res); //libérer le résultat de $res
//connexion maintenue ouverte car requête appelée ci-dessous
?>
</div>
<nav>
<ul>
<!-- affiche le lien si utilisateur = philippe -->
<?php
if (strtoupper($_SESSION['login']) == 'JEAN') {echo '<li> <a href="Menu00_inscription.php" style="color: yellow";>Créer un nouvel utilisateur</a></li>';}
?>
<li> <a href="Menu01_MesInfos.php">Modifier mes infos</a></li>
<li> <a href="Menu02_ChangePassword.php" style="color: yellow">Modifier mon mot de passe</a></li>
<li> <a href="Menu03_deconnexion.php">Déconnexion</a></li>
</ul>
</nav>
</header>
<!-- objet de la page -->
<br/><div id="objet_page"><h1>Demandes OTP non programmables</h1></div>
<!-- contenu page -->
<form method="post" name="formulaire" action="Pg02_Workflow.php" onsubmit="return VerifForm(this)">
<br/>
<input type="submit" name="otpdemand" id="otpdemand" value="Demande OTP" style="margin-left: 31%; width:140px;" onclick="location.href='Pg01_DemandOTP.php'">
<input type="submit" name="otpmodif" id="otpmodif" value="Modifier OTP" style="margin-left: 0%; width:140px;" disabled onclick="">
<input type="submit" name="otpvalider" id='otpvalider' value="OTP valider" style="margin-left: 1%; width:140px;" disabled onclick="Valid()">
<input type="submit" name="otprefuser" id='otprefuser' value="OTP refuser" style="margin-left: 0%; width:140px;" disabled onclick="Refus()">
<input type="submit" name="otpencreation" id='otpencreation' value="OTP en création" style="margin-left: 1%; width:140px;" disabled onclick="Creat()">
<input type="submit" name="otpencreation" id='otpimprim' value="imprimer OTP" style="margin-left: 0%; width:140px;" disabled onclick="Imprim()">
<input type="submit" name="fermer" id='fermer' value="Fermer" style="margin-left: 1%; width:100px;" onclick="location.href='Pg00_TableauBoard.php'"/>
<script> if ($FonctionUtilisat!='IP') {document.formulaire.otpdemand.disabled=true;} </script>
<br/><br/>
<table id="tab" class="display">
<!--ligne entête tableau -->
<thead>
<tr>
<th>Sel.</th>
<th>Dt Création</th>
<th>Irsi</th>
<th>Immeubles</th>
<th>CActions</th>
<th>DemandOTP</th>
<th>Montant HT</th>
<th>Devis</th>
<th>IP</th>
<th>Tél. IP</th>
<th>Etat</th>
<th>Comment</th>
</tr>
</thead>
<!--ligne données-->
<tbody>
<?php
$link=mysqli_connect("localhost","root","","GPi_Web");
$res1 = mysqli_query($link, 'SELECT utilisat_id, service, fonction FROM 1tbl_utilisat WHERE login = \''.$_SESSION['login'].'\'');
$row1 = mysqli_fetch_assoc($res1);
mysqli_query($link,'SET NAMES utf8');
$res = mysqli_query($link, "SELECT demandotp_id, demand_dtcreat, IRSI, nomsite, codactions_nom, demand_libelle, demand_mont, demand_pj, prenom, tel_fixe, tel_port, email, demand_comment, lien_valideur, demand_statut FROM 3tbl_demandotp, 0tbl_imm, 1tbl_utilisat, 2tbl_codactions WHERE lien_tblimm = imm_id AND lien_tblutilisat = utilisat_id AND lien_tblcodactions = codactions_id");
while($row = mysqli_fetch_array($res))
{
?>
<tr>
<td>
<input type="hidden" name="demandid" value="<?php echo stripslashes($row['demandotp_id']); ?>"/>
<input type="hidden" name="demandstatut" value="<?php echo stripslashes($row['demand_statut']); ?>"/>
<input type="radio" name="rchoix" id="rchoix" onclick="LigneSelect()"/>
</td>
<td><?php echo stripslashes(date("d-m-Y", strtotime($row['demand_dtcreat']))); ?></td>
<td><?php echo stripslashes($row['IRSI']); ?></td>
<td><?php echo stripslashes($row['nomsite']); ?></td>
<td><?php echo stripslashes($row['codactions_nom']); ?></td>
<td><?php echo stripslashes($row['demand_libelle']); ?></td>
<td><?php echo stripslashes(number_format($row['demand_mont'], 2, ',', ' ')); ?> </td>
<td><a href="<?php echo stripslashes($row['demand_pj']); ?>" target="_blank"><img src="images/pdf.png" alt="Rapport"/></a><br /></td>
<td><a href="mailto:<?php echo stripslashes($row['email']); ?>?subject=Renseignement sur demande d'OTP&body=Bonjour <?php echo stripslashes($row['prenom']); ?>,%0D%0A%0D%0A%0D%0A%0D%0AMerci"><?php echo stripslashes($row['prenom']); ?></A></td>
<td><?php echo stripslashes($row['tel_fixe'].'<br/>'.$row['tel_port']); ?></td>
<td><?php echo stripslashes($row['demand_statut']); ?></td>
<td><input type="image" src="images/comment.png" name="b1" value="b1" onclick="MyFunc()"></td>
</tr>
</tbody>
<?php //ici j'ecris le nom recuperer et avec le while tous les noms seront affichés et chacun dans une ligne :)
}
mysqli_free_result($res); //libérer le résultat de $res
mysqli_close($link); //déconnexion avec la base
?>
</table>
</form>
</div>
</body>
</html> |
Partager