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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
|
<form method="post" action="Plan_action.php" >
<body>
<?php
//--------------- Bannière ---------------//
echo" <div id='ban2' > </div>";
//--------------- Choix de la période ---------------//
echo" <div id='cal_debut'></div>";
echo"<div style='text-align: center;'>";
echo"<input name='debut_periode' value='Début de période' class='calendrier' type='text'>";
echo" ";
echo"<input name='fin_periode' value='Fin de période' class='calendrier' type='text'>";
//--------------- Button SUBMIT qui charge le tableau ---------------//
echo " ";
echo"<input value='Ok' name='button' type='submit'>";
echo"</div><br>";
require('Connexion.php');
//--------------- Requete appelant le POST selectionné ---------------//
$DATE_DEBUT = $_POST['debut_periode']." 00:00:00";
$DATE_FIN = $_POST['fin_periode']." 00:00:00";
list($datedeb, $heure_deb)=explode(" ",$DATE_DEBUT);
list($datefin, $heure_fin)=explode(" ",$DATE_FIN);
list($jj_deb, $mm_deb, $yy_deb)=explode("/",$datedeb);
list($jj_fin, $mm_fin, $yy_fin)=explode("/",$datefin);
$date_deb = $yy_deb."-".$mm_deb."-".$jj_deb;
$date_fin = $yy_fin."-".$mm_fin."-".$jj_fin;
//--------------- Tableaux des arrêts chaîne ---------------//
//--------------- Requete du tableau des arrêts chaîne ---------------//
if (isset($_POST['debut_periode']) && isset($_POST['fin_periode']))
{
$sql0="SELECT * FROM ARRET_CHAINE WHERE DEBUT BETWEEN #$date_deb# AND #$date_fin#" ;
$rs = odbc_exec($conn,$sql0) or die('Erreur SQL : <br />'.$sql0);
}
//--------------- Tableau des arrêts chaîne ---------------//
echo "<div style='overflow-y: scroll; height: 181'> ";
echo "<table border='0' cellpadding='0' cellspacing='0' width='500'>";
echo "<tbody>";
echo "<tr>";
echo "<table style='width: 968px; height: 60px;' border='5' cellpadding='2' cellspacing='1'>"; // Taille du tableau //
echo "<tbody>";
echo "<tr>";
echo "<td class='table-titre' colspan='9'> Tableau des arrêts chaîne </td>";
echo "</tr>";
echo "<tr>";
echo "<td class='table-entete-centre' width='20'>Choix</td>";
echo "<td class='table-entete-centre' width='20'>Type</td>";
echo "<td class='table-entete-centre' width='20'>Début</td>";
echo "<td class='table-entete-centre' width='20'>Fin</td>";
echo "<td class='table-entete-centre' width='20'>Constat</td>";
echo "<td class='table-entete-centre' width='20'>Demande </td>";
echo "<td class='table-entete-centre' width='20'>Cause</td>";
echo "<td class='table-entete-centre' width='20'>Information</td>";
echo "<td class='table-entete-centre' width='20'>Imputation</td>";
echo "</tr>";
if (isset($_POST['debut_periode']) && isset($_POST['fin_periode']))
{
while (odbc_fetch_row($rs))
{
$NUM=odbc_result($rs,"NUMERO_ARRET_CHAINE");
$TYPE=odbc_result($rs,"TYPE");
$DEBUT=odbc_result($rs,"HEURE_DEBUT");
$FIN=odbc_result($rs,"HEURE_FIN");
$CONSTAT=odbc_result($rs,"CONSTAT");
$DEMANDE=odbc_result($rs,"DEMANDE");
$CAUSE=odbc_result($rs,"CAUSE");
$INFO=odbc_result($rs,"COMPLEMENT_INFORMATION");
$IMPUTATION=odbc_result($rs,"IMPUTATION");
echo "<tr>";
echo "<td class='table-ligne1-centre' width='100'> <input type='checkbox' name='checkbox1' value='" . $NUM . "' /> </td>";
echo "<td class='table-ligne1-centre' width='100'>$TYPE</td>";
echo "<td class='table-ligne1-centre' width='100'>$DEBUT</td>";
echo "<td class='table-ligne1-centre' width='100'>$FIN</td>";
echo "<td class='table-ligne1-centre' width='100'>$CONSTAT</td>";
echo "<td class='table-ligne1-centre' width='100'>$DEMANDE</td>";
echo "<td class='table-ligne1-centre' width='100'>$CAUSE</td>";
echo "<td class='table-ligne1-centre' width='100'>$INFO</td>";
echo "<td class='table-ligne1-centre' width='100'>$IMPUTATION</td>";
echo "</tr>";
}
}
echo "</tbody>";
echo "</table>";
echo "</tr>";
echo "</tbody>";
echo "</table>";
echo "</div>";
?>
<!--------------- Boutton --------------->
<br>
<div style="text-align: center;">
<input type="button" name="lien1" value="Ajouter un plan d'action" onclick="ouvreFenetreAjouter();">
<input type="button" name="lien2" value="Modifier" onClick="ouvreFenetreModifier();">
<input type="button" name="lien3" value="Cloturer" onClick="ouvreFenetreCloturer();">
<br><br>
</div>
<!--------------- Tableau des plans d'action --------------->
<?php
require('Connexion.php');
require('Requete.php');
//--------------- Requete du tableau des plans d'action ---------------//
$sql1="SELECT * FROM PLAN_ACTION ";
$req = odbc_exec($conn,$sql1) or die('Erreur SQL : <br />'.$sql1);
echo "<div style='overflow-y: scroll; height: 180'>";
echo "<table border='0' cellpadding='0' cellspacing='0' width='500'>";
echo "<tbody>";
echo "<tr>";
echo "<table style='width: 973px; height: 115px;' border='5' cellpadding='2' cellspacing='1'>";
echo "<tbody>";
echo "<tr>";
echo "<td class='table-titre' colspan='6'> Tableau des plans d'action</td>";
echo "</tr>";
echo "<tr>";
echo "<td class='table-entete-centre' width='20'></td>";
echo "<td class='table-entete-centre' width='150'>Intitulé</td>";
echo "<td class='table-entete-centre' width='5'>Délai</td>";
echo "<td class='table-entete-centre' width='50'>Pilote</td>";
echo "<td class='table-entete-centre' width='10'>Cloture</td>";
echo "<td class='table-entete-centre' width='30'>Complément </td>";
echo "</tr>";
while (odbc_fetch_row($req))
{
$CHOIX= odbc_result($req,"NUMERO_PLAN_ACTION");
$INTITULE=odbc_result($req,"INTITULE");
$DELAI=odbc_result($req,"DELAI");
$PILOTE=odbc_result($req,"PILOTE");
$CLOTURE=odbc_result($req,"CLOTURE");
$COMPLEMENT_CLOTURE=odbc_result($req,"COMPLEMENT_CLOTURE");
echo "<tr>";
echo "<td class='table-ligne1-centre' width='20'> <input type=\"radio\" id=\"check\" name=\"check\" value='".$CHOIX."' /> </td>";
echo "<td class='table-ligne1-centre' width='150'>$INTITULE</td>";
echo "<td class='table-ligne1-centre' width='10'>$DELAI</td>";
echo "<td class='table-ligne1-centre' width='50'>$PILOTE</td>";
echo "<td class='table-ligne1-centre' width='10'>$CLOTURE</td>";
echo "<td class='table-ligne1-centre' width='30'>$COMPLEMENT_CLOTURE</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
echo "</tr>";
echo "</tbody>";
echo "</table>";
//--------------- Fin de la page Action ---------------//
?>
</body>
</form>
<!##########################################################################################################################>
</html> |
Partager