/[dolibarr]/dolibarr/htdocs/product/photos.php
ViewVC logotype

Diff of /dolibarr/htdocs/product/photos.php

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

revision 1.19 by eldy, Sun Oct 9 21:27:15 2005 UTC revision 1.20 by eldy, Sat Dec 3 03:49:01 2005 UTC
# Line 52  $types[1] = $langs->trans("Service"); Line 52  $types[1] = $langs->trans("Service");
52   * Actions   * Actions
53   */   */
54    
55  if ($_POST["sendit"] && defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1)  if ($_POST["sendit"] && $conf->global->MAIN_UPLOAD_DOC)
56  {  {
57      if ($_GET["id"])      if ($_GET["id"])
58      {      {
# Line 80  if ($_GET["action"] == 'delete' && $_GET Line 80  if ($_GET["action"] == 'delete' && $_GET
80  llxHeader("","",$langs->trans("CardProduct0"));  llxHeader("","",$langs->trans("CardProduct0"));
81    
82    
83  if ($_GET["id"])  if ($_GET["id"] || $_GET["ref"])
84  {  {
85    
86      $product = new Product($db);      $product = new Product($db);
87      $result = $product->fetch($_GET["id"]);      if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
88        if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
89    
90      if ($result)      if ($result)
91      {      {
# Line 157  if ($_GET["id"]) Line 158  if ($_GET["id"])
158                  $head[$h][1] = $langs->trans('Documents');                  $head[$h][1] = $langs->trans('Documents');
159                  $h++;                  $h++;
160    
161          dolibarr_fiche_head($head, $hselected, $langs->trans("CardProduct".$product->type).' : '.$product->ref);          $titre=$langs->trans("CardProduct".$product->type);
162            dolibarr_fiche_head($head, $hselected, $titre);
163    
164          print($mesg);          print($mesg);
165    
166          print '<table class="border" width="100%">';          print '<table class="border" width="100%">';
167    
168            // Reference
169          print '<tr>';          print '<tr>';
170          print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="2">'.$product->ref.'</td>';          print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="2">';
171            $product->load_previous_next_ref();
172            $previous_ref = $product->ref_previous?'<a href="'.$_SERVER["PHP_SELF"].'?ref='.$product->ref_previous.'">'.img_previous().'</a>':'';
173            $next_ref     = $product->ref_next?'<a href="'.$_SERVER["PHP_SELF"].'?ref='.$product->ref_next.'">'.img_next().'</a>':'';
174            if ($previous_ref || $next_ref) print '<table class="nobordernopadding" width="100%"><tr class="nobordernopadding"><td class="nobordernopadding">';
175            print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'">'.$product->ref.'</a>';
176            if ($previous_ref || $next_ref) print '</td><td class="nobordernopadding" align="center" width="20">'.$previous_ref.'</td><td class="nobordernopadding" align="center" width="20">'.$next_ref.'</td></tr></table>';
177            print '</td>';
178          print '</tr>';          print '</tr>';
179    
180            // Libelle
181          print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$product->libelle.'</td>';          print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$product->libelle.'</td>';
182          print '</tr>';          print '</tr>';
183    

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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