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
|
$req= mssql_query("SELECT * FROM(SELECT TOP ".$pa." * FROM (SELECT TOP ".$k." num,dt,controle,valide,str,(select count(num) from eb_hv where origine=a.num) as a,user_m,user_c,date_m,date_c from eb_h a ".$w." ORDER BY num ASC ) AS t1 ORDER BY num desc)AS t2 ORDER BY num ASC");
while ($test=mssql_fetch_row($req))
{
list($num,$dt,$cont,$val,$str,$norg,$userm,$userc,$datm,$datc)=$test;
echo '<tr><td width=5%>';
echo '<a href="eb_lignes.php?num='.$num.'&adr=eb.php" title="Visualiser les Détails">'.$num.'</a>';
echo '</td><td width=10% >';
///recherche designation article
$req='select design from structure where code="'.$str.'"';
$res1=mssql_query($req);
$test1=mssql_fetch_row($res1);
list($dd)=$test1;
echo $dd;
echo '</td>';
echo '<td width=12%>';
echo $dt;
echo '</td><td width=6%>';
if ($cont==1) {echo 'oui';} else {echo 'non';}
echo '</td><td width=6%>';
if ($val==1) {echo 'oui';} else {echo 'non';}
echo '</td>';
echo '<td width=10% >par: '.$userc.'<br>le: '.$datc.'</td>';
echo '<td width=10% >par: '.$userm.'<br>le: '.$datm.'</td>';
echo '<td width=1%>';
if (($dmodif==1)&&($val==0)){ echo '<a href="eb_cache.php?num='.$num.'&action=modif&prem=oui"><IMG SRC="../../images/maj/edit.png" alt="" title="Modifier" border=0></a>';}
else
{ echo '<IMG SRC="../../images/maj/edit_gris.png" alt="" title="Modifier" border=0>';}
echo '</td>';
echo '<td width=1%>';
if (($dsup==1)&&($val==0)){ echo '<a href="eb.php?num='.$num.'&action=suppr" onclick = "if (! confirm(\'Etes vous sur de vouloir Supprimer?\')) return false;"><IMG SRC="../../images/maj/sup.png" alt="" title="Supprimer" border=0></a>';}
else
{ echo '<IMG SRC="../../images/maj/sup_gris.png" alt="" title="Modifier" border=0>';}
echo '</td>';
echo '<td width=1%>';
if (($dcont==1)&&($val==0)){ echo '<a href="eb.php?num='.$num.'&action=controler" onclick = "if (! confirm(\'Etes vous sur de vouloir Contôler?\')) return false;"><IMG SRC="../../images/maj/cont.png" alt="" title="Contrôler" border=0></a>';}
else
{ echo '<IMG SRC="../../images/maj/cont_gris.png" alt="" title="Contrôler le Droit de Dotation" border=0>';}
echo '</td>';
echo '<td width=1%>';
if (($dval==1)&&($cont==1)&&($val==0)){ echo '<a href="eb.php?num='.$num.'&action=valider" onclick = "if (! confirm(\'Etes vous sur de vouloir valider?\')) return false;"><IMG SRC="../../images/maj/val.png" alt="" title="Valider" border=0></a>';}
else
{ echo '<IMG SRC="../../images/maj/val_gris.png" alt="" title="Valider" border=0>';}
echo '</td>';
echo '<td width=1%>';
if (($constrf==1)&&($dajouttrf==1)&&($val==1)&&($norg==0)){ echo '<a href="ebv.php?numeb='.$num.'&action=ajout&stru='.$str.'" onclick = "if (! confirm(\'Etes vous sur de vouloir Envoyer la Demande de Dotation?\')) return false;"><IMG SRC="../../images/maj/trf.png" alt="" title="Envoyer" border=0></a>';}
else
{ echo '<IMG SRC="../../images/maj/trf_gris.png" alt="" title="Tranférer" border=0>';}
echo '</td>';
echo '</tr>';
if ($det2==1)
{
///détails
echo '<tr><td colspan=10>';
echo'omar je suis la';
$ress=mssql_query('select num,hab,taille,qte,mat,(select nom+\' \'+prenom+\' -\'+grade from agent where mat=b.mat) as det,observation from eb_h_lignes b where num="'.$num.'"');
$nb=0;
while ($tests=mssql_fetch_row($ress))
{
list($n,$hab,$taille,$qte,$mat,$det,$obs)=$tests;
echo '<tr class="detail">';
echo '<td >'.$mat.'</td>';
echo '<td >'.$det.'</td>';
echo '<td >'.$hab.'</td>';
echo '<td >'.$taille.'</td>';
echo '<td >'.$qte.'</td>';
echo '<td >'.$obs.'</td>';
echo '</tr>';
}
echo '</tbody></table>';
echo '</td></tr>';
}
} |
Partager