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
|
<?php
require("../conn/conn.php");
$p=mysql_query("select * from article");
$str="select * from article where id_article=".$_GET['id'];
$r=mysql_query($str);
$ar=mysql_fetch_array($r);
?>
<div align="center">
<form id="form1" name="form1" method="post" action="inserermateriel.php">
<p> </p>
<table width="740" border="1">
<tr>
<th width="730" bgcolor="#CC9966" scope="col"><div align="left">
<table width="427">
<tr>
<th width="114" scope="col"><div align="center">Code</div></th>
<th width="115" scope="col"><div align="left">Reference</div></th>
<th width="120" scope="col"><div align="left">designation</div></th>
<th width="58" scope="col">Stock</th>
</tr>
<tr>
<th scope="row"><label1><?=$ar['ID_ARTICLE']?></label1> </th>
<td><label2><?=$ar['REFERENCE_ART']?></label2> </td>
<td><label><?=$ar['DESIGNATION_ART']?></label> </td>
<td><label4></label4>
<?=$ar['QTE_STOCKEE']?></td>
<input type="hidden" name="id" value="<?php echo $ar['ID_ARTICLE'];?>" />
</tr>
</table>
</div></th>
</tr>
</table>
<table width="741" border="1">
<tr>
<th width="163" bgcolor="#CC9966" scope="col"><div align="left">Date de livraison </div></th>
<th width="562" bgcolor="#CC9966" scope="col"><div align="left">
<input name="textfield2" type="text" size="32" />
</div></th>
</tr>
<tr>
<th bgcolor="#CC9966" scope="row"><div align="left">Quantité livrée </div></th>
<td bgcolor="#CC9966"><div align="left">
<input name="txtquantite" type="text" id="txtquantite" size="32" />
</div></td>
</tr>
<tr>
<th bgcolor="#CC9966" scope="row"><div align="left">N°bon de commande</div></th>
<td bgcolor="#CC9966"><div align="left">
<?php
$str="select num_cmd from article_commmande where id_article=".$_GET['id'];
$r1=mysql_query($str);
?>
<select name="N_cmd" id="N_cmd">
<?php
while($bon=mysql_fetch_array($r1))
{
echo "<option>".$bon['num_cmd']."</option>";
}
?>
</select>
</div></td>
</tr>
</table>
<div id="searchresults"></div>
<script language="JavaScript">
// from js_util.js by scottandrew.com/junkyard/js/
function addEvent(elm, evType, fn, useCapture)
{
if (elm.addEventListener){
elm.addEventListener(evType, fn, useCapture);
return true;
} else if (elm.attachEvent){
var r = elm.attachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be removed");
}
}
// end from scottandrew.com/junkyard/js/
var valquantite = document.getElementById("txtquantite");
var displayBox = document.getElementById("searchresults");
addEvent(valquantite, 'keyup', doTest, false);
var keyPressDelay = '';
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
function doTest() {
if (keyPressDelay) {
window.clearTimeout(keyPressDelay);
}
if(valquantite.value != '' ) {
keyPressDelay = window.setTimeout('doSearch()',800);
}
}
function doSearch() {
displayBox.innerHTML = "Searching ...";
xmlhttp.open("GET","tableauquantite.php?valquantite="+valquantite.value,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
displayBox.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
displayBox.innerHTML = "";
}
</script>
<table width="279" border="0">
<tr>
<th width="74" height="45" scope="col"><p>
<input type="submit" name="Submit" value="Valider" />
</p></th>
<th width="105" scope="col"><input type="reset" name="Submit2" value="Annuler" /></th>
<th width="86" scope="col"> </th>
</tr>
</table>
<p> </p>
<p> </p>
</form>
</div> |
Partager