19 |
* |
* |
20 |
* $Id$ |
* $Id$ |
21 |
* $Source$ |
* $Source$ |
|
* |
|
22 |
*/ |
*/ |
23 |
|
|
24 |
/** |
/** |
25 |
\file htdocs/projet/liste.php |
\file htdocs/projet/liste.php |
26 |
\ingroup projet |
\ingroup projet |
27 |
\brief Page liste des projets |
\brief Page liste des projets |
28 |
\version $Revision$ |
\version $Revision$ |
29 |
*/ |
*/ |
30 |
|
|
31 |
require("./pre.inc.php"); |
require("./pre.inc.php"); |
67 |
$pagenext = $page + 1; |
$pagenext = $page + 1; |
68 |
|
|
69 |
|
|
70 |
|
llxHeader(); |
71 |
|
|
72 |
/* |
/* |
73 |
* |
* |
74 |
* Affichage de la liste des projets |
* Affichage de la liste des projets |
78 |
$sql .= " , s.nom, s.idp, s.client"; |
$sql .= " , s.nom, s.idp, s.client"; |
79 |
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."projet as p"; |
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."projet as p"; |
80 |
$sql .= " WHERE p.fk_soc = s.idp"; |
$sql .= " WHERE p.fk_soc = s.idp"; |
|
|
|
81 |
if ($socid) |
if ($socid) |
82 |
{ |
{ |
83 |
$sql .= " AND s.idp = $socid"; |
$sql .= " AND s.idp = $socid"; |
84 |
} |
} |
|
|
|
85 |
if ($_GET["search_ref"]) |
if ($_GET["search_ref"]) |
86 |
{ |
{ |
87 |
$sql .= " AND p.ref LIKE '%".$_GET["search_ref"]."%'"; |
$sql .= " AND p.ref LIKE '%".$_GET["search_ref"]."%'"; |
94 |
{ |
{ |
95 |
$sql .= " AND s.nom LIKE '%".$_GET["search_societe"]."%'"; |
$sql .= " AND s.nom LIKE '%".$_GET["search_societe"]."%'"; |
96 |
} |
} |
|
|
|
97 |
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); |
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); |
98 |
|
|
99 |
$var=true; |
$var=true; |
103 |
$num = $db->num_rows($resql); |
$num = $db->num_rows($resql); |
104 |
$i = 0; |
$i = 0; |
105 |
|
|
|
//llxHeader("",$title,"Projet"); |
|
|
llxHeader(); |
|
|
|
|
106 |
print_barre_liste($langs->trans("Projects"), $page, "liste.php", "", $sortfield, $sortorder, "", $num); |
print_barre_liste($langs->trans("Projects"), $page, "liste.php", "", $sortfield, $sortorder, "", $num); |
107 |
|
|
|
print '<br>'; |
|
108 |
print '<table class="noborder" width="100%">'; |
print '<table class="noborder" width="100%">'; |
109 |
print '<tr class="liste_titre">'; |
print '<tr class="liste_titre">'; |
110 |
print_liste_field_titre($langs->trans("Ref"),"liste.php","p.ref","","","",$sortfield); |
print_liste_field_titre($langs->trans("Ref"),"liste.php","p.ref","","","",$sortfield); |
134 |
$objp = $db->fetch_object($resql); |
$objp = $db->fetch_object($resql); |
135 |
$var=!$var; |
$var=!$var; |
136 |
print "<tr $bc[$var]>"; |
print "<tr $bc[$var]>"; |
137 |
print "<td><a href=\"fiche.php?id=$objp->projectid\">$objp->title</a></td>\n"; |
print "<td><a href=\"fiche.php?id=$objp->projectid\">".img_object($langs->trans("ShowProject"),"project")." ".$objp->ref."</a></td>\n"; |
138 |
print "<td><a href=\"fiche.php?id=$objp->projectid\">$objp->ref</a></td>\n"; |
print "<td><a href=\"fiche.php?id=$objp->projectid\">".$objp->title."</a></td>\n"; |
139 |
print '<td>'; |
print '<td>'; |
140 |
print img_object($langs->trans("ShowCompanie"),"company"); |
print img_object($langs->trans("ShowCompany"),"company"); |
141 |
|
|
142 |
print ' <a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->idp.'">'.$objp->nom.'</a></td>'; |
print ' <a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->idp.'">'.$objp->nom.'</a></td>'; |
143 |
print '<td> </td>'; |
print '<td> </td>'; |
157 |
|
|
158 |
$db->close(); |
$db->close(); |
159 |
|
|
160 |
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); |
|
161 |
|
llxFooter('$Date$ - $Revision$'); |
162 |
|
|
163 |
?> |
?> |