Ajout d'un filtre
This commit is contained in:
parent
4b5ae083fb
commit
2f15430fac
@ -22,6 +22,11 @@
|
||||
require("./pre.inc.php3");
|
||||
require("../contact.class.php3");
|
||||
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id ;
|
||||
}
|
||||
|
||||
llxHeader();
|
||||
|
||||
/*
|
||||
@ -49,9 +54,10 @@ $sql = "SELECT s.nom,s.idp, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fi
|
||||
$sql .= " FROM llx_societe as s, llx_fichinter as f ";
|
||||
$sql .= " WHERE f.fk_soc = s.idp ";
|
||||
|
||||
if ($user->societe_id > 0)
|
||||
|
||||
if ($socid > 0)
|
||||
{
|
||||
$sql .= " AND s.idp = " . $user->societe_id;
|
||||
$sql .= " AND s.idp = " . $socid;
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1 ,$offset);
|
||||
@ -59,14 +65,14 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1 ,$offset);
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
$num = $db->num_rows();
|
||||
print_barre_liste("Liste des fiches d'intervention", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num);
|
||||
print_barre_liste("Liste des fiches d'intervention", $page, $PHP_SELF,"&socid=$socid",$sortfield,$sortorder,'',$num);
|
||||
|
||||
$i = 0;
|
||||
print '<TABLE border="0" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print "<TR class=\"liste_titre\">";
|
||||
print_liste_field_titre_new ("Num",$PHP_SELF,"f.ref","","&socidp=$socidp",'width="15%"',$sortfield);
|
||||
print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socidp=$socidp",'',$sortfield);
|
||||
print_liste_field_titre_new ("Date",$PHP_SELF,"f.datei","","&socidp=$socidp",'',$sortfield);
|
||||
print_liste_field_titre_new ("Num",$PHP_SELF,"f.ref","","&socid=$socid",'width="15%"',$sortfield);
|
||||
print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socid=$socid",'',$sortfield);
|
||||
print_liste_field_titre_new ("Date",$PHP_SELF,"f.datei","","&socid=$socid",'',$sortfield);
|
||||
print '<TD align="center">Durée</TD>';
|
||||
print '<TD align="center">Statut</TD><td> </td>';
|
||||
print "</TR>\n";
|
||||
@ -77,7 +83,9 @@ if ( $db->query($sql) )
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
print "<TD><a href=\"fiche.php3?id=$objp->fichid\">$objp->ref</a></TD>\n";
|
||||
print "<TD><a href=\"../comm/fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||
|
||||
print '<td><a href="index.php?socid='.$objp->idp.'"><img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filter.png" border="0"></a> ';
|
||||
print "<a href=\"../comm/fiche.php3?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||
print "<TD>".strftime("%d %B %Y",$objp->dp)."</TD>\n";
|
||||
print '<TD align="center">'.sprintf("%.1f",$objp->duree).'</TD>';
|
||||
print '<TD align="center">'.$objp->fk_statut.'</TD>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user