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 131 132 133 134 135 136 137 138 139 140 141 142 143
|
<!DOCTYPE html>
<?php
header('Content-Type: text/html; charset=UTF-8'); /*obligatoire sur chaque page*/
session_start();
?>
<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="./dept_xhr.js" charset="utf-8"></script-->
<script type="text/javascript">
function LigneSelect(){
var Sel_lign = '';
var Sel_id = '';
var Sel_stat = '';
for (i=0; i<document.formulaire.rchoix.length; i++) {
if (document.formulaire.rchoix[i].checked) {
Sel_lign = i
Sel_id = document.formulaire.demandid[i].value;
Sel_stat = document.formulaire.demandstatut[i].value;
}
}
var arrayLignes = document.getElementById("tbl").rows; //l'array est stocké dans une variable
var longueur = arrayLignes.length;//on peut donc appliquer la propriété length
var i=0; //on définit un incrémenteur qui représentera la clé
while(i<longueur) {
if (i == Sel_lign+1){
arrayLignes[i].style.backgroundColor = "#ffff99";
}
else {
arrayLignes[i].style.backgroundColor = "#ffffff";
}
i++;
}
//alert(Sel_lign + ' a été sélectionné ' + 'id='+ Sel_id + ' stat=' + Sel_stat);
switch(Sel_stat){
case 'En attente':
document.formulaire.otpvalider.disabled=false;
document.formulaire.otprefuser.disabled=false;
document.formulaire.otpencréation.disabled=true;
break;
case 'Validée':
document.formulaire.otpvalider.disabled=true;
document.formulaire.otprefuser.disabled=true;
document.formulaire.otpencréation.disabled=false;
break;
case 'Refusée':
document.formulaire.otpvalider.disabled=true;
document.formulaire.otprefuser.disabled=true;
document.formulaire.otpencréation.disabled=true;
break;
}
}
function Valid(){
if (confirm("Merci de confirmer la validation")) {
window.location.href='Pg00_TableauBoard';
}
else {
alert("non")
}
}
function Refus(){
if (confirm("Confirmer par \'OK\' le refus")) {
window.location.href='Pg00_TableauBoard';
}
else {
alert("non")
}
}
function Quit(){
this.location.href="../GPi_Web/Pg00_TableauBoard.php";
}
</script>
</head>
<body>
<div id="bloc_page">
<!-- objet de la page -->
<br/><div id="objet_page"><h1>Mon workflow...</h1></div>
<!-- contenu page -->
<br/>
<form method="post" name="formulaire" action="Pg02_Workflow.php">
<table cellspacing="0" align="Center" rules="all" border="1" id="ctl00_ctl00_cph_gv" style="width:100%;border-collapse:collapse;">
<tr class="pager" align="right" valign="middle" style="border-width:0px;border-style:None;width:100%;">
<td colspan="21"><table border="0">
<tr>
<td><span>1</span></td>
<td><a href="javascript:__doPostBack('ctl00$ctl00$cph$gv','Page$2')">2</a></td>
<td><a href="javascript:__doPostBack('ctl00$ctl00$cph$gv','Page$3')">3</a></td>
<td><input type="image" src="images/doubleArrowRight.png" alt=">>" onclick="javascript:__doPostBack('ctl00$ctl00$cph$gv','Page$Last')" style="border-width:0px;"/></td>
<td style="border-color: rgb(255,255,255)"><input type="submit" name="otpvalider" id='otpvalider' value="valider" style="margin-left: 20%; width:150px;" disabled onclick="Valid()"></td>
<td style="border-color: rgb(255,255,255)"><input type="submit" name="otprefuser" id='otprefuser' value="refuser" style="margin-left: 5%; width:150px;" disabled onclick="Refus()"></td>
<td style="border-color: rgb(255,255,255)"><input type="submit" name="otpencréation" id='otpencréation' value="création" style="margin-left: 10%; width:150px;" disabled onclick="Creat()"></td>
<td style="border-color: rgb(255,255,255)"><input type="submit" name="fermer" id='fermer' value="Fermer" style="margin-left: 10%; width:100px;" onclick="location.href='Pg00_TableauBoard.php'"/></td>
</tr>
</td>
</tr>
</table>
<table cellspacing="0" align="Center" rules="all" border="1" id="tbl" style="width:100%;border-collapse:collapse;">
<!--ligne données-->
<?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');
//défnit suivant l'utilisateur l'affichage des demandes (IP= all, RCGP/RGP = En attente, CtrlGestion = Validé)
$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 AND utilisat_id = '".$row1['utilisat_id']."' ORDER BY demand_dtcreat ASC");
while($row = mysqli_fetch_array($res))
{
?>
<tr valign="middle" id="lg" style="border-style:None; font-weight:normal;">
<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 align="center"><?php echo stripslashes(date("d-m-Y", strtotime($row['demand_dtcreat']))); ?></td>
</tr>
<?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