diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 609a6605d1a..350055348f8 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -130,12 +130,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); -llxHeader( - "", - $langs->trans("BillsSetup"), - 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura' -); +$help_yrl = 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura'; +llxHeader("", $langs->trans("BillsSetup"), $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index d21622d1f68..8b1e8ebf8c0 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -56,21 +56,23 @@ if (!$user->admin) { accessforbidden(); } -if ($file && !$what) { - //print DOL_URL_ROOT.'/dolibarr_export.php'; - header("Location: ".DOL_URL_ROOT.'/admin/tools/dolibarr_export.php?msg='.urlencode($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportMethod"))).(GETPOST('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : '')); - exit; -} - $errormsg = ''; +$utils = new Utils($db); + /* * Actions */ +if ($file && !$what) { + //print DOL_URL_ROOT.'/dolibarr_export.php'; + header("Location: ".DOL_URL_ROOT.'/admin/tools/dolibarr_export.php?msg='.urlencode($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportMethod"))).(GETPOST('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : '')); + exit; +} + if ($action == 'delete') { - $file = $conf->admin->dir_output.'/'.GETPOST('urlfile'); + $file = $conf->admin->dir_output.'/'.dol_sanitizeFileName(GETPOST('urlfile')); $ret = dol_delete_file($file, 1); if ($ret) { setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); @@ -80,11 +82,6 @@ if ($action == 'delete') { $action = ''; } - -/* - * View - */ - $_SESSION["commandbackuplastdone"] = ''; $_SESSION["commandbackuptorun"] = ''; $_SESSION["commandbackupresult"] = ''; @@ -103,13 +100,6 @@ if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); } - -//$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; -//llxHeader('','',$help_url); - -//print load_fiche_titre($langs->trans("Backup"),'','title_setup'); - - // Start with empty buffer $dump_buffer = ''; $dump_buffer_len = 0; @@ -122,9 +112,6 @@ $outputdir = $conf->admin->dir_output.'/backup'; $result = dol_mkdir($outputdir); -$utils = new Utils($db); - - // MYSQL if ($what == 'mysql') { $cmddump = GETPOST("mysqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg @@ -216,7 +203,16 @@ if ($errormsg) { }*/ } + + +/* + * View + */ + +top_httphead(); + $db->close(); // Redirect to backup page header("Location: dolibarr_export.php".(GETPOST('page_y', 'int') ? '?page_y='.GETPOST('page_y', 'int') : '')); +exit(); diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index bc627cc14f0..68cb81ccc24 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -205,7 +205,12 @@ if ($compression == 'zip') { print $errormsg; } + +// Output export + if ($export_type != 'externalmodule' || empty($what)) { + top_httphead(); + if ($errormsg) { setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors'); } else { @@ -218,12 +223,15 @@ if ($export_type != 'externalmodule' || empty($what)) { $returnto = 'dolibarr_export.php'; header("Location: ".$returnto); + exit(); } else { + top_httphead('application/zip'); + $zipname = $outputdir."/".$file; // Then download the zipped file. - header('Content-Type: application/zip'); + header('Content-disposition: attachment; filename='.basename($zipname)); header('Content-Length: '.filesize($zipname)); readfile($zipname); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b92140efa03..4ba2f410cc9 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -779,7 +779,6 @@ $projectstatic = new Project($db); $title = $langs->trans("Orders"); $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; -// llxHeader('',$title,$help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0 || $search_user > 0) { diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index af833e7e257..3ec26a3a1ef 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -517,9 +517,15 @@ $morehtmlref = ''; if ($id > 0 || !empty($ref)) { $title = $object->ref.' - '.$langs->trans("Transactions"); - $helpurl = ""; - llxHeader('', $title, $helpurl); +} else { + $title = $langs->trans("BankTransactions"); +} +$help_url = ''; +llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $param); + + +if ($id > 0 || !empty($ref)) { // Load bank groups require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; $bankcateg = new BankCateg($db); @@ -574,11 +580,8 @@ if ($id > 0 || !empty($ref)) { } } } -} else { - llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param); } - $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,"; $sql .= " b.fk_account, b.fk_type, b.fk_bordereau,"; $sql .= " ba.rowid as bankid, ba.ref as bankref"; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index c08336841e2..ea80f1caab3 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -223,6 +223,17 @@ if ($id > 0) { $param .= '&id='.urlencode($id); } +if (empty($numref)) { + $title = $object->ref.' - '.$langs->trans("AccountStatements"); + $helpurl = ""; +} else { + $title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements"); + $helpurl = ""; +} + + +llxHeader('', $title, $helpurl); + if (empty($numref)) { $sortfield = 'numr'; @@ -248,10 +259,6 @@ if (empty($numref)) { $numrows = $db->num_rows($result); $i = 0; - $title = $object->ref.' - '.$langs->trans("AccountStatements"); - $helpurl = ""; - llxHeader('', $title, $helpurl); - // Onglets $head = bank_prepare_head($object); print dol_get_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account'); @@ -387,10 +394,6 @@ if (empty($numref)) { * Show list of record into a bank statement */ - $title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements"); - $helpurl = ""; - llxHeader('', $title, $helpurl); - // Onglets $head = account_statement_prepare_head($object, $numref); print dol_get_fiche_head($head, 'statement', $langs->trans("AccountStatement"), -1, 'account'); diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 0130cfe10f0..a8b5f3d56bd 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -265,6 +265,10 @@ $initialbalanceforterminal = array(); $theoricalamountforterminal = array(); $theoricalnbofinvoiceforterminal = array(); + +llxHeader('', $langs->trans("CashControl")); + + if ($action == "create" || $action == "start" || $action == 'close') { if ($action == 'close') { $posmodule = $object->posmodule; @@ -376,8 +380,6 @@ if ($action == "create" || $action == "start" || $action == 'close') { //var_dump($theoricalamountforterminal); var_dump($theoricalnbofinvoiceforterminal); if ($action != 'close') { - llxHeader('', $langs->trans("NewCashFence")); - print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); print '
'; } -} else { - llxHeader(); - // not found } // End of page