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
| <html>
<head>
<script language="javascript">
function ajout() {
document.ajoutdesssin.action="moteur.php";
document.ajoutdessin.submit();
}
</script>
</head>
<body bgcolor=''>
<p align=center><font size ="+6">Rechercher dossier</font></p>
<body bgcolor=''>
<center>
<br>
<form name="ajoutdessin" Action="javascript:ajout() method="POST">
<form method="POST" action=""><input type="hidden" name="PHPSESSID" value="3ac6765a3c14904c9e26c8c0c721a952" />
SAISIR REFERENCE DOSSIER : <input type="text" name="recherche">
<input type="SUBMIT" value="Rechercher"><br><br>
</form>
<!--<form name="saisirdessin" Action="javascript:verif() method="POST">-->
<?php
include('connexion.php');
connexion();
// COMPARAISON ZONE DE TEXTE AU LIBELLE DE LA BASE
$REF_DOS = isset($_POST['recherche']) ? $_POST['recherche'] : '';
$result = mysql_query("SELECT REF_DOSSIER,NO_FIC,LIBELLE_FICHIER,NOM_FICHIER,DOSSIER_ASSOCIE,NB_OBSERVATION,FORMATE FROM fichier WHERE REF_DOSSIER LIKE '%$REF_DOS%'") or die (mysql_error());
for($i=0;$i<mysql_num_rows($result);$i++){
//if ($recherche==null) {
//echo mysql_result($result,$i,'REF_DOSSIER')==null;
//echo mysql_result($result,$i,'NO_FIC')==null;
//echo mysql_result($result,$i,'LIBELLE_FICHIER')==null;
//echo mysql_result($result,$i,'NOM_FICHIER')==null;
//echo mysql_result($result,$i,'DOSSIER_ASSOCIE')==null;
//echo mysql_result($result,$i,'NB_OBSERVATION')==null;
//echo mysql_result($result,$i,'FORMATE')==null;
//}
//else{
while ($ligne=mysql_fetch_array($result)){
$liste_champdes = null ;
for ($co=1;$co<mysql_num_fields($result);$co++) {
$liste_champdes = $liste_champdes."*".mysql_field_name($result,$co)."=".$ligne[$co];
}
//echo "<br><br>listedes====".$liste_champdes."";
/* tableau1 */
/* ligne des titres */
$tablo_champdes = explode('*',$liste_champdes);
echo "<table border=1><tr>" ;
for($tu=0;$tu<count($tablo_champdes);$tu++) {
$list_champpo = explode('*', $tablo_champdes[$tu]);
for($lt=0;$lt<count($list_champpo);$lt++) {
$list_var = explode('=', $list_champpo[$lt]);
echo "<td><b>".$list_var[0]."</b></td>" ;
}
}
echo "</tr><tr>" ;
/* contenu */
for($tu=0;$tu<count($tablo_champdes);$tu++) {
$list_champpo = explode('*', $tablo_champdes[$tu]);
for($lt=0;$lt<count($list_champpo);$lt++) {
$list_var = explode('=', $list_champpo[$lt]);
echo "<td>".$list_var[1]."</td>" ;
}
}echo"<br>";
echo "</tr></table>" ;
}
echo "<br>";
}
//}
mysql_close();
?>
<br>
<center><input type="button" name="boutonval" value="AJOUTER" onclick='ajout();'></center>
</form>
</body>
</html> |
Partager