/[dolibarr]/dolibarr/htdocs/projet/liste.php
ViewVC logotype

Diff of /dolibarr/htdocs/projet/liste.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by rodolphe, Sun Aug 21 12:11:44 2005 UTC revision 1.5 by eldy, Wed Aug 31 21:12:28 2005 UTC
# Line 19  Line 19 
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");
# Line 68  $pageprev = $page - 1; Line 67  $pageprev = $page - 1;
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
# Line 77  $sql = "SELECT p.rowid as projectid, p.r Line 78  $sql = "SELECT p.rowid as projectid, p.r
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"]."%'";
# Line 95  if ($_GET["search_societe"]) Line 94  if ($_GET["search_societe"])
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;
# Line 105  if ($resql) Line 103  if ($resql)
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);
# Line 140  if ($resql) Line 134  if ($resql)
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 '&nbsp;<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->idp.'">'.$objp->nom.'</a></td>';        print '&nbsp;<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->idp.'">'.$objp->nom.'</a></td>';
143        print '<td>&nbsp;</td>';        print '<td>&nbsp;</td>';
# Line 163  print "</table>"; Line 157  print "</table>";
157    
158  $db->close();  $db->close();
159    
160  llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");  
161    llxFooter('$Date$ - $Revision$');
162    
163  ?>  ?>

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26