HTML Code cleaner

This commit is contained in:
Laurent Destailleur 2009-12-07 18:07:54 +00:00
parent 234871dab5
commit 24c77aed15

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -19,10 +19,10 @@
*/ */
/** /**
\file htdocs/product/barcode.php * \file htdocs/product/barcode.php
\ingroup product * \ingroup product
\brief Page du code barre * \brief Page with bar code informations of product
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -90,23 +90,26 @@ $titre=$langs->trans("CardProduct".$product->type);
dol_fiche_head($head, 'barcode', $titre); dol_fiche_head($head, 'barcode', $titre);
print '<table class="border" width="100%">'; print '<table class="border" width="100%">'."\n";
// Reference // Reference
print '<tr>'; print '<tr>';
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">'; print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="3">';
print $html->showrefnav($product,'ref','',1,'ref'); print $html->showrefnav($product,'ref','',1,'ref');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>'."\n";
// Libelle // Libelle
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>';
// Barcode image // Barcode image
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($product->barcode_type_coder).'&code='.urlencode($product->barcode).'&encoding='.urlencode($product->barcode_type_code); $url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($product->barcode_type_coder).'&code='.urlencode($product->barcode).'&encoding='.urlencode($product->barcode_type_code);
print '<td width="300" align="center" rowspan="5"><img src="'.$url.'"></td>'; print '<td width="300" align="center" rowspan="5">';
print '<!-- url barcode = '.$url.' -->';
print '<img src="'.$url.'">';
print '</td>';
print '</tr>'; print '</tr>'."\n";
// Prix // Prix
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("SellingPrice").'</td><td colspan="2">';
@ -118,12 +121,12 @@ print '</tr>';
{ {
print price($product->price).' '.$langs->trans($product->price_base_type); print price($product->price).' '.$langs->trans($product->price_base_type);
} }
print '</td></tr>'; print '</td></tr>'."\n";
// Statut // Statut
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
print $product->getLibStatut(2); print $product->getLibStatut(2);
print '</td></tr>'; print '</td></tr>'."\n";
// Barcode type // Barcode type
print '<tr><td nowrap>'; print '<tr><td nowrap>';
@ -141,7 +144,7 @@ else
{ {
print $product->barcode_type_label?$product->barcode_type_label:'<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>'; print $product->barcode_type_label?$product->barcode_type_label:'<div class="warning">'.$langs->trans("SetDefaultBarcodeType").'<div>';
} }
print '</td></tr>'; print '</td></tr>'."\n";
// Barcode value // Barcode value
print '<tr><td nowrap>'; print '<tr><td nowrap>';
@ -163,7 +166,7 @@ else
{ {
print $product->barcode; print $product->barcode;
} }
print '</td></tr>'; print '</td></tr>'."\n";
print "</table>\n"; print "</table>\n";
print "</div>\n"; print "</div>\n";