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
|
<?php
session_start();
?>
<script LANGUAGE="JavaScript">
var width = screen.width;
var height = screen.height;
window.resizeTo(width,height);
</script>
<?php
$serv=$_SESSION['service'];
include('../include/MySQL.php');
$cnx=connect();
if (isset($_POST['ajoutcommentairepiece']))
{
$numdp=$_POST['numdp'];
$avenant=$_POST['avenant'];
$variante=$_POST['variante'];
$hypothesechiffrage=$_POST['hypothesechiffrage'];
$nom=$_POST['nom'];
$ordre=$_POST['ordre'];
$commentaire=$_POST['commentaire'];
$query="update nomenclature set commentaire='$commentaire'
where numdp='$numdp' and avenant='$avenant' and variante='$variante'
and hypothesechiffrage='$hypothesechiffrage' and nom='$nom' and ordre='$ordre'";
$resultat=sendSQL($cnx,$query);
echo '<script language="javascript">';
echo 'opener.focus();';
echo 'self.window.close();';
echo '</script>';
}
else
{
$numdp=$_GET['numdp'];
$avenant=$_GET['avenant'];
$variante=$_GET['variante'];
$hypothesechiffrage=$_GET['hypothesechiffrage'];
$nom=$_GET['nom'];
//$ordre=$_GET['ordre'];
$query="SELECT commentaire
FROM nomenclature
where numdp='$numdp' and avenant='$avenant' and variante='$variante'
and hypothesechiffrage='$hypothesechiffrage' and nom='$nom'";
$res=sendSQL($cnx,$query);
$commentairepiece=mysql_result($res,0,0);
$commentairepiece=stripslashes($commentairepiece);
echo '<Table width=100% height=100% border=0 cellpadding="0" cellspacing="0">';
echo '<td align="center" background="image/fond.jpg">';
echo "<br><font face='arial' size=4 color=#89abcd><center>Ajouter un commentaire<br></center></font>";
echo '<form action="commentairepiece.php" method="post">';
echo '<Table width=200 border=0 cellspacing=0 cellpadding=0 valign="top">';
echo '<tr align="left"><th>Num DP</th><th>Av</th>
<th>Var</th><th>Hyp</th><th>Nom de la pièce</th>';
echo '<tr><td width="6">';
echo '<input type="text" name="numdp" size="6" value="'.$numdp.'" readonly></td>';
echo '<td width="1">';
echo '<input type="text" name="avenant" size="1" value="'.$avenant.'" readonly></td>';
echo '<td width="1">';
echo '<input type="text" name="variante" size="1" value="'.$variante.'" readonly></td>';
echo '<td width="1">';
echo '<input type="text" name="hypothesechiffrage" size="1" value="'.$hypothesechiffrage.'" readonly></td>';
echo '<td width="1">';
echo '<input type="text" name="nom" size="22" value="'.$nom.'" readonly></td>';
echo '</table>';
echo '<br><br>';
echo '<Table width=100% border=0 cellpadding="0" cellspacing="0">';
echo '<tr><td align="center"><TEXTAREA NAME="commentairepiece" ROWS="6" COLS="65">'.$commentairepiece.'</TEXTAREA></td></tr>';
echo '<tr><td align="center"><br /><input type="submit" name="ajoutcommentairepiece" value="Ajouter le commentaire"></td></tr>';
echo '</form>';
}
mysql_close($cnx);
?> |
Partager