diff --git a/htdocs/document.php b/htdocs/document.php index 279a3353ed6..f54d07b9895 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -19,7 +19,6 @@ * or see http://www.gnu.org/ * * $Id$ - * $Source$ */ /** @@ -31,16 +30,12 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); -require_once("main.inc.php"); +require_once("./main.inc.php"); -function llxHeader() -{ - global $user,$langs; - top_menu($head, $title); - $menu = new Menu(); - left_menu($menu->liste); -} +// C'est un wrapper, donc header vierge +function llxHeader() { } + $action = $_GET["action"]; $original_file = urldecode($_GET["file"]); @@ -204,14 +199,14 @@ if ($modulepart) // Wrapping pour les bons de livraison if ($modulepart == 'livraison') { - $user->getrights('livraison'); + $user->getrights('expedition'); if ($user->rights->expedition->livraison->lire || eregi('^specimen',$original_file)) { $accessallowed=1; } $original_file=$conf->livraison->dir_output.'/'.$original_file; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='$refname'"; - } + } // Wrapping pour la telephonie if ($modulepart == 'telephonie') @@ -332,7 +327,7 @@ if ($modulepart) } // Basic protection (against external users only) -if ($user->societe_id>0) +if ($user->societe_id > 0) { if ($sqlprotectagainstexternals) { diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index ea3d01721a2..cfef8dff7f5 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -19,7 +19,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ // Code identique a /expedition/commande.php @@ -274,14 +273,12 @@ if ($_GET["action"] == 'create') echo '
'; $lignes = $commande->fetch_lines(1); + $numcommandes = sizeof($commande->lignes); /* Lecture des expeditions déjà effectuées */ $commande->loadExpeditions(); - $num = sizeof($commande->lignes); - $i = 0; - - if ($num) + if ($numcommandes) { print ''; print ''; @@ -301,10 +298,12 @@ if ($_GET["action"] == 'create') } print "\n"; } + $var=true; - while ($i < $num) + $indicecommande = 0; + while ($indicecommande < $numcommandes) { - $ligne = $commande->lignes[$i]; + $ligne = $commande->lignes[$indicecommande]; $var=!$var; print "\n"; if ($ligne->fk_product > 0) @@ -344,8 +343,8 @@ if ($_GET["action"] == 'create') // Quantité à livrer print ''; // Stock @@ -396,14 +395,14 @@ if ($_GET["action"] == 'create') { // Quantité à livrer print ''; } print "\n"; - $i++; + $indicecommande++; $var=!$var; }
'.$langs->trans("Description").'
'; - print ''; - print ''; + print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; print '