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
if(isset($_POST['text9'])){
//si la liste a été "postée" c ad choix fait
$text9=$_POST['text9'];
}else{
$text9=-1;
}
if(isset($_POST['text10'])){
//si la liste a été "postée" c ad choix fait
$text10=$_POST['text10'];
}else{
$text10=-1;
}
if(isset($_POST['text'])){
//si la saisi a été faite
$text=$_POST['text'];
}else{
$text=-1;
}
?>
<form name="form1" method="post" action="ouvrage.php?sousouvr=<?php echo($text10)?>&ouvrage=<?php echo($text9)?>&codeagence=<?php echo($codeagence)?>&text=<?php echo($text)?>">
<div id="layer" style="position:absolute; overflow:hidden; left:42px; top:87px; width:365px; height:141px; z-index:47">
<p align="center">ouvrage
<select name="text9" onchange=" form1.submit();">
<option value=-1>-- Choisissez -- </option>
<?php
$con = odbc_connect('PlanCharge','sa','');
if (!$con) {
print("There is a problem with SQL Server connection.\n");
}
$sql="select Code_ouvr2 from CtypeOuvrage2";
$res=odbc_exec($con, $sql) or die($sql."<br />".odbc_error());
while($total = odbc_fetch_array($res))
{
echo "<option value=\"".$total["Code_ouvr2"]."\"";
if($text9==$total['Code_ouvr2']) { echo "selected"; }//ça c'est pour garder la selection lors du réaffichage
echo ">".$total['Code_ouvr2']."</option>\n";
}
?>
</select>
</p>
<p align="center">sous ouvrage
<select name="text10" onchange=" form1.submit();">
<option value=-1>-- Choisissez -- </option>
<?php
if($text9 != -1){
$sql="select * from CtyepSousOuvrage where code_ouvrage2 ='".$text9."'";
$res=odbc_exec($con, $sql) or die($sql."<br />".odbc_error());
while( $total = odbc_fetch_array($res))
{echo "<option value=\"".$total["Code_sousouvr"]."\"";
if($text10==$total['Code_sousouvr']) { echo "selected"; }//ça c'est pour garder la selection lors du réaffichage
echo ">".$total['Code_sousouvr']."</option>\n";
}
}
ODBC_close($con);
?>
</select>
</p>
<p align="center">code affaire
<input type="text" name="text" value="<?php echo($text)?>">
</p>
</div>
<p>
</form> |
Partager