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
| <link rel="stylesheet" media="screen" type="text/css" title="Design" href="DesignBC.css" />
<img src="images/tete.jpg" class="tete" />
<img src="images/cote.jpg" class="cote" />
<script language="javascript">
function a()
{
with(document.suitebc)
{
action="DetBon2.php";
submit();
}
}
function b()
{
with(document.suitebc)
{
action="Menu.php";
submit();
}
}
</script>
<?php
if (isset($_POST['nbon']))
{
$N=$_POST['nbon'];
}
?>
<form action="DetBon.php" method="post" name="suitebc">
<?php
mysql_connect("xxxxxxx", "xxxxx", "xxxxx");
mysql_select_db("BonsCmde");
$reponse = mysql_query("SELECT * FROM bon, societe, beneficiaire WHERE Num='$N' AND Societe=Nom AND Service=Abreges");
mysql_close();
while ($donnees = mysql_fetch_array($reponse))
{
?>
<h1 class="bon"/>BON DE COMMANDE N°
<?php echo $donnees['Num'];
$bc = $donnees['Num'];?>.<?php echo $donnees['An']; ?>
</h1>
<table>
<tr>
<th class="prest2"/>Service - UT bénéficiaire</th>
<th class="prest1"/>Prestataire / Société destinataire du bon</th>
</tr>
<tr>
<td><?php echo $donnees['Service']; ?></td><td class="prest"/><?php echo $donnees['Societe']; ?></td>
</tr>
<tr>
<td class="clair"><?php echo $donnees['Clairs']; ?></td><td class="prest"/></td>
</tr>
<tr>
<td><?php echo $donnees['Adresses']; ?></td><td class="prest"/><?php echo $donnees['Adresse']; ?></td>
</tr>
<tr>
<td><?php echo $donnees['Cps']; ?> <?php echo $donnees['Villes']; ?></td><td class="prest"/><?php echo $donnees['Cp']; ?> <?php echo $donnees['Ville']; ?></td>
</tr>
<tr>
<td>Tel : <?php echo $donnees['Tels']; ?> - Fax : <?php echo $donnees['Faxs']; ?></td><td class="prest"/>Tel : <?php echo $donnees['Tel']; ?> - Fax : <?php echo $donnees['Fax']; ?></td>
</tr>
</table>
<?php
}
?>
<table>
<tr>
<th width="355px">Objet</th>
<th width="40px">Qte</th>
<th width="90px">Pu. HT.</th>
<th width="30px" ><font size="1.5"/>Confirm.</th>
</tr>
<?php
mysql_connect("xxxxxxx", "xxxxx", "xxxxx");
mysql_select_db("BonsCmde");
$rep = mysql_query("SELECT * FROM bon, bondet WHERE Num='$bc' and Nume='$bc' ORDER BY objet");
mysql_close();
while ($dones = mysql_fetch_array($rep))
{
?>
<tr>
<td width="355px" size="57"><?php echo $dones['objet']; ?></td>
<td width="40px" align="center" size="3"><?php echo $dones['Qte']; ?></td>
<td width="90px" align="right" size="10"><?php echo $dones['Pu']; ?></td>
</tr>
<?php
}
?>
<tr>
<td width="355px"><input size="57" type="text" name="objet" /></td>
<td width="40px" align="center"><input size="3" type="text" name="Qte" /></td>
<td width="90px" align="center"><input size="10" type="text" name="Pu" /></td>
<td width="30px" align="center"><input type="submit" value="ok" /></td>
</tr>
<?php
mysql_connect("xxxxxxx", "xxxxx", "xxxxx");
mysql_select_db("BonsCmde");
if (isset($_POST['Pu']))
{
$objet = $_POST['objet'];
$Qte = $_POST['Qte'];
$Pu = $_POST['Pu'];
mysql_query("INSERT INTO bondet VALUES('$bc', '$objet', '$Qte', '$Pu')");
}
mysql_close();
?>
<tr>
<td><input type="submit" value="Nouvelle ligne" onclick="javascript:return a();"/> ou <input type="submit" value="Terminer" onclick="javascript:return b();"/></td></td>
</tr>
</table>
</form> |
Partager