From 24c77aed15fd9b2599c44568d1bf5c4471b1deb4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2009 18:07:54 +0000 Subject: [PATCH] HTML Code cleaner --- htdocs/product/barcode.php | 77 ++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/htdocs/product/barcode.php b/htdocs/product/barcode.php index 4e7e7ae650b..a2567fb5f69 100644 --- a/htdocs/product/barcode.php +++ b/htdocs/product/barcode.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -19,11 +19,11 @@ */ /** - \file htdocs/product/barcode.php - \ingroup product - \brief Page du code barre - \version $Id$ -*/ + * \file htdocs/product/barcode.php + * \ingroup product + * \brief Page with bar code informations of product + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); @@ -49,23 +49,23 @@ $result=restrictedArea($user,'produit|service&barcode',$id,'product','','',$fiel // Modification du type de code barre if ($_POST['action'] == 'setbarcodetype' && $user->rights->barcode->creer) { - $product = new Product($db); - $product->fetch($_GET["id"]); - $product->barcode_type = $_POST['barcodetype_id']; - $result = $product->update_barcode_type($user); - Header("Location: barcode.php?id=".$_GET["id"]); - exit; + $product = new Product($db); + $product->fetch($_GET["id"]); + $product->barcode_type = $_POST['barcodetype_id']; + $result = $product->update_barcode_type($user); + Header("Location: barcode.php?id=".$_GET["id"]); + exit; } // Modification du code barre if ($_POST['action'] == 'setbarcode' && $user->rights->barcode->creer) { - $product = new Product($db); - $product->fetch($_GET["id"]); - $product->barcode = $_POST['barcode']; //Todo: ajout v�rification de la validit� du code barre en fonction du type - $result = $product->update_barcode($user); - Header("Location: barcode.php?id=".$_GET["id"]); - exit; + $product = new Product($db); + $product->fetch($_GET["id"]); + $product->barcode = $_POST['barcode']; //Todo: ajout v�rification de la validit� du code barre en fonction du type + $result = $product->update_barcode($user); + Header("Location: barcode.php?id=".$_GET["id"]); + exit; } @@ -90,40 +90,43 @@ $titre=$langs->trans("CardProduct".$product->type); dol_fiche_head($head, 'barcode', $titre); -print ''; +print '
'."\n"; // Reference print ''; print ''; -print ''; +print ''."\n"; // Libelle print ''; // 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); -print ''; +print ''; -print ''; +print ''."\n"; - // Prix - print ''; +// Prix +print ''."\n"; // Statut print ''; +print ''."\n"; // Barcode type print ''; +print ''."\n"; // Barcode value print ''; +print ''."\n"; print "
'.$langs->trans("Ref").''; print $html->showrefnav($product,'ref','',1,'ref'); print '
'.$langs->trans("Label").''.$product->libelle.''; +print ''; +print ''; +print '
'.$langs->trans("SellingPrice").''; - if ($product->price_base_type == 'TTC') - { - print price($product->price_ttc).' '.$langs->trans($product->price_base_type); - } - else - { - print price($product->price).' '.$langs->trans($product->price_base_type); - } - print '
'.$langs->trans("SellingPrice").''; +if ($product->price_base_type == 'TTC') +{ + print price($product->price_ttc).' '.$langs->trans($product->price_base_type); +} +else +{ + print price($product->price).' '.$langs->trans($product->price_base_type); +} +print '
'.$langs->trans("Status").''; print $product->getLibStatut(2); -print '
'; @@ -141,7 +144,7 @@ else { print $product->barcode_type_label?$product->barcode_type_label:'
'.$langs->trans("SetDefaultBarcodeType").'
'; } -print '
'; @@ -155,7 +158,7 @@ if ($_GET['action'] == 'editbarcode') { print '
'; print ''; - print ''; + print ''; print ''; print ' '; } @@ -163,7 +166,7 @@ else { print $product->barcode; } -print '
\n"; print "\n";