Debuggage

This commit is contained in:
Rodolphe Quiedeville 2005-04-03 15:37:59 +00:00
parent 9b8d29645f
commit 364fa10141

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
@ -23,7 +23,8 @@
* $Source$ * $Source$
*/ */
/*! \file htdocs/admin/expedition.php /*!
\file htdocs/admin/expedition.php
\ingroup expedition \ingroup expedition
\brief Page d'administration/configuration du module Expedition \brief Page d'administration/configuration du module Expedition
\version $Revision$ \version $Revision$
@ -33,27 +34,7 @@ require("./pre.inc.php");
$langs->load("admin"); $langs->load("admin");
if (!$user->admin) if (!$user->admin) accessforbidden();
accessforbidden();
if ($action == 'nbprod' && $user->admin)
{
$sql ="DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_NEW_FORM_NB_PRODUCT';";
$db->query($sql);
$sql ='';
$sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('EXPEDITION_NEW_FORM_NB_PRODUCT','".$value."',0);";
//$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = 'EXPEDITION_NEW_FORM_NB_PRODUCT', value='".$value."', visible=0";
if ($db->query($sql))
{
Header("Location: expedition.php");
}
}
llxHeader();
if ($_GET["action"] == 'set') if ($_GET["action"] == 'set')
{ {
@ -72,12 +53,11 @@ if ($_GET["action"] == 'set')
{ {
} }
Header("Location: expedition.php");
} }
// positionne la variable pour le test d'affichage de l'icone
$expedition_addon_var_pdf = EXPEDITION_ADDON_PDF;
if ($_GET["action"] == 'setpdf') if ($_GET["action"] == 'setpdf')
{ {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_ADDON_PDF';"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_ADDON_PDF';";
@ -100,8 +80,19 @@ if ($_GET["action"] == 'setpdf')
{ {
} }
Header("Location: expedition.php");
} }
llxHeader();
// positionne la variable pour le test d'affichage de l'icone
$expedition_addon_var_pdf = EXPEDITION_ADDON_PDF;
$expedition_default = EXPEDITION_DEFAULT; $expedition_default = EXPEDITION_DEFAULT;
if ($_GET["action"] == 'setdef') if ($_GET["action"] == 'setdef')
@ -128,12 +119,13 @@ if ($_GET["action"] == 'setdef')
$def = array(); $def = array();
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."propal_model_pdf"; $sql = "SELECT nom FROM ".MAIN_DB_PREFIX."propal_model_pdf";
if ($db->query($sql)) $resql = $db->query($sql);
if ($resql)
{ {
$i = 0; $i = 0;
while ($i < $db->num_rows()) while ($i < $db->num_rows($resql))
{ {
$array = $db->fetch_array($i); $array = $db->fetch_array($resql);
array_push($def, $array[0]); array_push($def, $array[0]);
$i++; $i++;
} }
@ -240,7 +232,8 @@ print "</tr>\n";
clearstatcache(); clearstatcache();
if(is_dir($dir)) { if(is_dir($dir))
{
$handle=opendir($dir); $handle=opendir($dir);
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)