<?
if (isset($_POST['specialite']))
{
$specialite=$_POST['specialite'];
}
else
{
if (isset($_GET['specialite']))
{
$specialite=$_GET['specialite'];
}
else
{
$specialite="0";
}
}
// $link = mysql_connect("localhost", "root", "") or die("Impossible de se connecter");
// mysql_select_db("assistant") or die("Could not select database");
// $link = mysql_connect("mysql.rnu.tn", "uc", "usousse&06") or die("Impossible de se connecter");
// mysql_select_db("uc") or die("Could not select database");
include("base_loc.php");
// include("base.php");
$query = "SELECT * FROM assistant where specialite='$specialite' order by num_ordre";
$result = mysql_query($query) or die("1 query failed");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>Untitled Document</title>
</head>
<body>
<? $t=file("./textes.txt"); ?>
<? $e=file("./textes2.txt"); ?>
<? $tt=file("./entete.txt"); ?>
<? $line["specialite"]=$specialite ;?>
<center><table border="0" width=80% bgcolor='#FFFFFF'>
<tr>
<th> <p align="center" p><b2><? echo trim($tt[1]) ?></b2></th>
<th> <p align="center" p><b><? echo trim($tt[0]) ?></b></th>
</tr>
</table></center>
<center><table border="0" width=100% bgcolor='#aaaaaa'>
<tr>
<th> <p align="center" p><h1><b><? echo trim($e[0]) ?></b></h1></th>
</tr>
<tr>
<th> <p align="center" p><h1><b><? echo trim($e[1]) ?></b></h1></th>
</tr>
</table></center>
<? $sp=file("./spec.txt"); ?>
<form method="post" action="edition.php" name="consultation">
<h1 align="right" >
<select name="specialite" >
<option <? if (trim($line["specialite"]) == trim("$sp[0]")) {echo " selected ";} ?>><? echo $sp[0]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[1]")) {echo " selected ";} ?>><? echo $sp[1]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[2]")) {echo " selected ";} ?>><? echo $sp[2]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[3]")) {echo " selected ";} ?>><? echo $sp[3]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[4]")) {echo " selected ";} ?>><? echo $sp[4]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[5]")) {echo " selected ";} ?>><? echo $sp[5]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[6]")) {echo " selected ";} ?>><? echo $sp[6]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[7]")) {echo " selected ";} ?>><? echo $sp[7]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[8]")) {echo " selected ";} ?>><? echo $sp[8]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[9]")) {echo " selected ";} ?>><? echo $sp[9]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[10]")) {echo " selected ";} ?>><? echo $sp[10]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[11]")) {echo " selected ";} ?>><? echo $sp[11]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[12]")) {echo " selected ";} ?>><? echo $sp[12]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[13]")) {echo " selected ";} ?>><? echo $sp[13]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[14]")) {echo " selected ";} ?>><? echo $sp[14]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[15]")) {echo " selected ";} ?>><? echo $sp[15]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[16]")) {echo " selected ";} ?>><? echo $sp[16]; ?>
<option <? if (trim($line["specialite"]) == trim("$sp[17]")) {echo " selected ";} ?>><? echo $sp[17]; ?>
</select>
<? echo $e[2] ?> </h1>
<P align="right">
<p align="right">
Cliquez sur <input type="submit" value="Chercher specialité">
</p>
</form>
<div align="right">
<table width="100%" border="1" cellspacing=0 cellpadding=0 >
<tr>
<th rowspan="2" align="center"><? echo $e[24] ?></th>
<th rowspan="2" align="center"><? echo $e[23] ?></th>
<th rowspan="2" align="center"><? echo $e[22] ?></th>
<th rowspan="2" align="center"><? echo $e[21] ?></th>
<th colspan="2" align="center"><? echo $e[27] ?></th>
<th colspan="6" align="center"><? echo $e[25] ?></th>
<th colspan="6" align="center"><? echo $e[5] ?></th>
<th rowspan="2" align="center"><? echo $e[4] ?></th>
<th rowspan="2" align="center"><? echo $e[3] ?></th>
<th rowspan="2" align="center"><? echo $e[30] ?></th>
</tr>
<tr>
<th align="center"><? echo $e[20] ?></th>
<th align="center"> </th>
<th align="center"><? echo $e[13] ?></th>
<th align="center"><? echo $e[19] ?></th>
<th align="center"><? echo $e[18] ?></th>
<th align="center"><? echo $e[17] ?></th>
<th align="center"><? echo $e[12] ?></th>
<th align="center"><? echo $e[11] ?></th>
<th align="center"><? echo $e[16] ?></th>
<th align="center"><? echo $e[9] ?></th>
<th align="center"><? echo $e[15] ?></th>
<th align="center"><? echo $e[8] ?></th>
<th align="center"><? echo $e[7] ?></th>
<th align="center"><? echo $e[6] ?></th>
</tr>
<?
$color=" bgcolor='#cccccc' ";
while ($line = mysql_fetch_array($result))
{
if (!($line["specialite"]=="")) { $specialite=$line["specialite"];}
if ($color == " bgcolor='#cccccc' ")
{
$color=" bgcolor='#ffffff' ";
}
else
{
$color=" bgcolor='#cccccc' ";
}
?>
<tr <? echo $color ?>>
<td width="2.5%" rowspan="6"> </td>
<td width="2.5%" rowspan="6"> </td>
<td width="2%" rowspan="6"> </td>
<td width="2%" rowspan="6"> </td>
<td width="2%" rowspan="6"> </td>
<td width="14%" align="right" rowspan="6">
<p> : <? echo $t[18]; ?></p> <p> <? echo $line["encadreur"]; ?></p>
<p> : <? echo $t[19]; ?></p> <p> <? echo $line["sujet"]; ?></p>
<p> : <? echo $t[20]; ?></p> <p> <? echo $line["etab_master"];?></p> </td>
<td width="10%" align="right" > <? echo $line["etab_actsc_1"]; ?></td>
<td width="2%" align="right" > </td>
<td width="2%" align="right" > </td>
<td width="2%" align="right" > </td>
<td width="10%" align="right" > <? echo $line["nat_actsc_1"]; ?></td>
<td width="5%" align="right" > <? echo $line["an_actsc_1"]; ?></td>
<td width="2%" align="right"> </td>
<td width="6%" align="right" > <? echo $line["obs_bac"]; ?></td>
<td width="2%" align="right"> </td>
<td width="3%" align="right"> <? echo $line["date_bac"]; ?></td>
<td width="5%" align="right" > <? echo $line["spec_bac"]; ?></td>
<td width="2.5%" align="right" ><? echo $t[25]; ?></td>
<td width="8.5%" align="right" rowspan="6"><? echo $line["nom"] ; ?> <? echo $line["prenom"] ; ?></td>
<td width="3%" align="right" rowspan="6"> <? echo $line["num_cin"] ; ?></td>
<td width="2%" align="right" rowspan="6"> <? echo $line["num_ordre"] ; ?></td>
</tr>
<tr <? echo $color ?>>
<td align="right"> <? echo $line["etab_actsc_2"]; ?></td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> <? echo $line["nat_actsc_2"]; ?></td>
<td align="right"> <? echo $line["an_actsc_2"]; ?></td>
<td align="right"> </td>
<td align="right"> <? echo $line["obs_maitr"]; ?></td>
<td align="right"> </td>
<td align="right"> <? echo $line["date_maitr"]; ?></td>
<td align="right"> <? echo $line["spec_maitr"]; ?></td>
<td align="right"> <? echo $t[26]; ?></td>
</tr>
<tr <? echo $color ?>>
<td align="right"> <? echo $line["etab_actsc_3"]; ?></td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> <? echo $line["nat_actsc_3"]; ?></td>
<td align="right"> <? echo $line["an_actsc_3"]; ?></td>
<td align="right"> </td>
<td align="right"> <? echo $line["obs_mast"]; ?></td>
<td align="right"> </td>
<td align="right"> <? echo $line["date_mast"]; ?></td>
<td align="right"> <? echo $line["spec_mast"]; ?></td>
<td align="right"> <? echo $t[27]; ?></td>
</tr>
<tr <? echo $color ?>>
<td align="right"> <? echo $line["etab_actpf_1"]; ?></td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> <? echo $line["nat_actpf_1"]; ?></td>
<td align="right"> <? echo $line["an_actpf_1"]; ?></td>
<td align="right"> </td>
<td align="right"> <? echo $line["obs_doc"]; ?></td>
<td align="right"> </td>
<td align="right"> <? echo $line["date_doc"]; ?></td>
<td align="right"> <? echo $line["spec_doc"]; ?></td>
<td align="right"> <? echo $t[28]; ?></td>
</tr>
<tr <? echo $color ?>>
<td align="right"> <? echo $line["etab_actpf_2"]; ?></td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> <? echo $line["nat_actpf_2"]; ?></td>
<td align="right"> <? echo $line["an_actpf_2"]; ?></td>
<td rowspan="2" align="right"> </td>
<td rowspan="2" align="right"> <? echo $line["obs_autr"]; ?></td>
<td rowspan="2" align="right"> </td>
<td rowspan="2" align="right"> <? echo $line["date_autr"]; ?></td>
<td rowspan="2" align="right"> <? echo $line["spec_autr"]; ?></td>
<td rowspan="2" align="right"> <? echo $t[29]; ?></td>
</tr>
<tr <? echo $color ?>>
<td align="right"> <? echo $line["etab_actpf_3"]; ?></td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> </td>
<td align="right"> <? echo $line["nat_actpf_3"]; ?></td>
<td align="right"> <? echo $line["an_actpf_3"]; ?></td>
</tr>
<!-- fin personne -->
<?
}
if (trim($line["specialite"])=="") {$line["specialite"]=$specialite ;}
// echo("specialité xx = ") ;echo("$specialite");
// echo("linespecialité xx = ") ;echo($line["specialite"]);
?>
</table>
</div>
</body>
</html>
change <table width=100%>met <table width=X>
X et la taille fixe du tableau