Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur 2022-08-30 19:38:35 +02:00
parent 499810c822
commit e0b1ad308b
21 changed files with 144 additions and 145 deletions

View File

@ -130,12 +130,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
llxHeader( $help_yrl = 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura';
"",
$langs->trans("BillsSetup"),
'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura'
);
llxHeader("", $langs->trans("BillsSetup"), $help_url);
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';

View File

@ -56,21 +56,23 @@ if (!$user->admin) {
accessforbidden(); 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 = ''; $errormsg = '';
$utils = new Utils($db);
/* /*
* Actions * 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') { 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); $ret = dol_delete_file($file, 1);
if ($ret) { if ($ret) {
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
@ -80,11 +82,6 @@ if ($action == 'delete') {
$action = ''; $action = '';
} }
/*
* View
*/
$_SESSION["commandbackuplastdone"] = ''; $_SESSION["commandbackuplastdone"] = '';
$_SESSION["commandbackuptorun"] = ''; $_SESSION["commandbackuptorun"] = '';
$_SESSION["commandbackupresult"] = ''; $_SESSION["commandbackupresult"] = '';
@ -103,13 +100,6 @@ if (!empty($MemoryLimit)) {
@ini_set('memory_limit', $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 // Start with empty buffer
$dump_buffer = ''; $dump_buffer = '';
$dump_buffer_len = 0; $dump_buffer_len = 0;
@ -122,9 +112,6 @@ $outputdir = $conf->admin->dir_output.'/backup';
$result = dol_mkdir($outputdir); $result = dol_mkdir($outputdir);
$utils = new Utils($db);
// MYSQL // MYSQL
if ($what == 'mysql') { if ($what == 'mysql') {
$cmddump = GETPOST("mysqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $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(); $db->close();
// Redirect to backup page // Redirect to backup page
header("Location: dolibarr_export.php".(GETPOST('page_y', 'int') ? '?page_y='.GETPOST('page_y', 'int') : '')); header("Location: dolibarr_export.php".(GETPOST('page_y', 'int') ? '?page_y='.GETPOST('page_y', 'int') : ''));
exit();

View File

@ -205,7 +205,12 @@ if ($compression == 'zip') {
print $errormsg; print $errormsg;
} }
// Output export
if ($export_type != 'externalmodule' || empty($what)) { if ($export_type != 'externalmodule' || empty($what)) {
top_httphead();
if ($errormsg) { if ($errormsg) {
setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors'); setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors');
} else { } else {
@ -218,12 +223,15 @@ if ($export_type != 'externalmodule' || empty($what)) {
$returnto = 'dolibarr_export.php'; $returnto = 'dolibarr_export.php';
header("Location: ".$returnto); header("Location: ".$returnto);
exit(); exit();
} else { } else {
top_httphead('application/zip');
$zipname = $outputdir."/".$file; $zipname = $outputdir."/".$file;
// Then download the zipped file. // Then download the zipped file.
header('Content-Type: application/zip');
header('Content-disposition: attachment; filename='.basename($zipname)); header('Content-disposition: attachment; filename='.basename($zipname));
header('Content-Length: '.filesize($zipname)); header('Content-Length: '.filesize($zipname));
readfile($zipname); readfile($zipname);

View File

@ -779,7 +779,6 @@ $projectstatic = new Project($db);
$title = $langs->trans("Orders"); $title = $langs->trans("Orders");
$help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
// llxHeader('',$title,$help_url);
$sql = 'SELECT'; $sql = 'SELECT';
if ($sall || $search_product_category > 0 || $search_user > 0) { if ($sall || $search_product_category > 0 || $search_user > 0) {

View File

@ -517,9 +517,15 @@ $morehtmlref = '';
if ($id > 0 || !empty($ref)) { if ($id > 0 || !empty($ref)) {
$title = $object->ref.' - '.$langs->trans("Transactions"); $title = $object->ref.' - '.$langs->trans("Transactions");
$helpurl = ""; } else {
llxHeader('', $title, $helpurl); $title = $langs->trans("BankTransactions");
}
$help_url = '';
llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $param);
if ($id > 0 || !empty($ref)) {
// Load bank groups // Load bank groups
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php';
$bankcateg = new BankCateg($db); $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 = "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 .= " b.fk_account, b.fk_type, b.fk_bordereau,";
$sql .= " ba.rowid as bankid, ba.ref as bankref"; $sql .= " ba.rowid as bankid, ba.ref as bankref";

View File

@ -223,6 +223,17 @@ if ($id > 0) {
$param .= '&id='.urlencode($id); $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)) { if (empty($numref)) {
$sortfield = 'numr'; $sortfield = 'numr';
@ -248,10 +259,6 @@ if (empty($numref)) {
$numrows = $db->num_rows($result); $numrows = $db->num_rows($result);
$i = 0; $i = 0;
$title = $object->ref.' - '.$langs->trans("AccountStatements");
$helpurl = "";
llxHeader('', $title, $helpurl);
// Onglets // Onglets
$head = bank_prepare_head($object); $head = bank_prepare_head($object);
print dol_get_fiche_head($head, 'statement', $langs->trans("FinancialAccount"), 0, 'account'); 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 * Show list of record into a bank statement
*/ */
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("AccountStatements");
$helpurl = "";
llxHeader('', $title, $helpurl);
// Onglets // Onglets
$head = account_statement_prepare_head($object, $numref); $head = account_statement_prepare_head($object, $numref);
print dol_get_fiche_head($head, 'statement', $langs->trans("AccountStatement"), -1, 'account'); print dol_get_fiche_head($head, 'statement', $langs->trans("AccountStatement"), -1, 'account');

View File

@ -265,6 +265,10 @@ $initialbalanceforterminal = array();
$theoricalamountforterminal = array(); $theoricalamountforterminal = array();
$theoricalnbofinvoiceforterminal = array(); $theoricalnbofinvoiceforterminal = array();
llxHeader('', $langs->trans("CashControl"));
if ($action == "create" || $action == "start" || $action == 'close') { if ($action == "create" || $action == "start" || $action == 'close') {
if ($action == 'close') { if ($action == 'close') {
$posmodule = $object->posmodule; $posmodule = $object->posmodule;
@ -376,8 +380,6 @@ if ($action == "create" || $action == "start" || $action == 'close') {
//var_dump($theoricalamountforterminal); var_dump($theoricalnbofinvoiceforterminal); //var_dump($theoricalamountforterminal); var_dump($theoricalnbofinvoiceforterminal);
if ($action != 'close') { if ($action != 'close') {
llxHeader('', $langs->trans("NewCashFence"));
print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register');
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
@ -597,8 +599,6 @@ if ($action == "create" || $action == "start" || $action == 'close') {
if (empty($action) || $action == "view" || $action == "close") { if (empty($action) || $action == "view" || $action == "close") {
$result = $object->fetch($id); $result = $object->fetch($id);
llxHeader('', $langs->trans("CashControl"));
if ($result <= 0) { if ($result <= 0) {
print $langs->trans("ErrorRecordNotFound"); print $langs->trans("ErrorRecordNotFound");
} else { } else {

View File

@ -92,20 +92,24 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View * View
*/ */
if (empty($object->id)) { $form = new Form($db);
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $object->ref." - ".$langs->trans('Documents'); if (empty($object->id)) {
$title = $langs->trans('Documents');
} else {
$title = $object->ref." - ".$langs->trans('Documents');
}
$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; $help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);
$form = new Form($db); if (empty($object->id)) {
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
if ($id > 0 || !empty($ref)) { if ($id > 0 || !empty($ref)) {
if ($object->fetch($id, $ref) > 0) { if ($object->fetch($id, $ref) > 0) {

View File

@ -77,19 +77,24 @@ if (empty($reshook)) {
* View * View
*/ */
$form = new Form($db);
if (empty($object->id)) {
$title = $object->ref." - ".$langs->trans('Notes');
} else {
$title = $langs->trans('Notes');
}
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);
if (empty($object->id)) { if (empty($object->id)) {
llxHeader();
$langs->load('errors'); $langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>'; echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter(); llxFooter();
exit; exit;
} }
$title = $object->ref." - ".$langs->trans('Notes');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);
$form = new Form($db);
if ($id > 0 || !empty($ref)) { if ($id > 0 || !empty($ref)) {
$object = new Facture($db); $object = new Facture($db);

View File

@ -1261,7 +1261,6 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0,
$hookmanager->initHooks(array('fileslib')); $hookmanager->initHooks(array('fileslib'));
$parameters = array( $parameters = array(
'GET' => $_GET,
'file' => $file, 'file' => $file,
'disableglob'=> $disableglob, 'disableglob'=> $disableglob,
'nophperrors' => $nophperrors 'nophperrors' => $nophperrors

View File

@ -741,7 +741,6 @@ if ($search_billed > 0) {
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; //$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
$help_url = ''; $help_url = '';
// llxHeader('',$title,$help_url);
$sql = 'SELECT'; $sql = 'SELECT';
if ($sall || $search_product_category > 0) { if ($sall || $search_product_category > 0) {

View File

@ -404,8 +404,6 @@ $facturestatic = new FactureFournisseur($db);
$formcompany = new FormCompany($db); $formcompany = new FormCompany($db);
$thirdparty = new Societe($db); $thirdparty = new Societe($db);
// llxHeader('',$langs->trans("SuppliersInvoices"),'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores');
$sql = "SELECT"; $sql = "SELECT";
if ($search_all || $search_product_category > 0) { if ($search_all || $search_product_category > 0) {
$sql = 'SELECT DISTINCT'; $sql = 'SELECT DISTINCT';

View File

@ -60,6 +60,17 @@ if (!$sortorder) {
} }
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('defineholidaylist'));
$extrafields = new ExtraFields($db);
$holiday = new Holiday($db);
if (empty($conf->holiday->enabled)) {
accessforbidden('Module not enabled');
}
// Protection if external user // Protection if external user
if ($user->socid > 0) { if ($user->socid > 0) {
accessforbidden(); accessforbidden();
@ -71,23 +82,6 @@ if (empty($user->rights->holiday->read)) {
} }
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
$hookmanager->initHooks(array('defineholidaylist'));
$extrafields = new ExtraFields($db);
$holiday = new Holiday($db);
if (empty($conf->holiday->enabled)) {
llxHeader('', $langs->trans('CPTitreMenu'));
print '<div class="tabBar">';
print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>';
print '</div>';
llxFooter();
exit();
}
/* /*
* Actions * Actions
*/ */
@ -212,7 +206,6 @@ $title = $langs->trans('CPTitreMenu');
llxHeader('', $title); llxHeader('', $title);
$typeleaves = $holiday->getTypes(1, 1); $typeleaves = $holiday->getTypes(1, 1);
$result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user. $result = $holiday->updateBalance(); // Create users into table holiday if they don't exists. TODO Remove this whif we use field into table user.
if ($result < 0) { if ($result < 0) {

View File

@ -59,29 +59,6 @@ $id = GETPOST('id', 'int');
$childids = $user->getAllChildIds(1); $childids = $user->getAllChildIds(1);
// Security check
$socid = 0;
if ($user->socid > 0) { // Protection if external user
//$socid = $user->socid;
accessforbidden();
}
$result = restrictedArea($user, 'holiday', '', '');
// If we are on the view of a specific user
if ($id > 0) {
$canread = 0;
if ($id == $user->id) {
$canread = 1;
}
if (!empty($user->rights->holiday->readall)) {
$canread = 1;
}
if (!empty($user->rights->holiday->read) && in_array($id, $childids)) {
$canread = 1;
}
if (!$canread) {
accessforbidden();
}
}
$diroutputmassaction = $conf->holiday->dir_output.'/temp/massgeneration/'.$user->id; $diroutputmassaction = $conf->holiday->dir_output.'/temp/massgeneration/'.$user->id;
@ -156,15 +133,36 @@ $arrayfields = array(
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
if (empty($conf->holiday->enabled)) {
llxHeader('', $langs->trans('CPTitreMenu')); // Security check
print '<div class="tabBar">'; $socid = 0;
print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>'; if ($user->socid > 0) { // Protection if external user
print '</div>'; //$socid = $user->socid;
llxFooter(); accessforbidden();
exit();
} }
if (empty($conf->holiday->enabled)) accessforbidden('Module not enabled');
$result = restrictedArea($user, 'holiday', '', '');
// If we are on the view of a specific user
if ($id > 0) {
$canread = 0;
if ($id == $user->id) {
$canread = 1;
}
if (!empty($user->rights->holiday->readall)) {
$canread = 1;
}
if (!empty($user->rights->holiday->read) && in_array($id, $childids)) {
$canread = 1;
}
if (!$canread) {
accessforbidden();
}
}
/* /*
* Actions * Actions

View File

@ -74,11 +74,6 @@ if (!$sortorder) {
$sortorder = "DESC"; $sortorder = "DESC";
} }
// Si l'utilisateur n'a pas le droit de lire cette page
if (!$user->rights->holiday->readall) {
accessforbidden();
}
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('users', 'other', 'holiday')); $langs->loadLangs(array('users', 'other', 'holiday'));
@ -92,12 +87,12 @@ $arrayfields = array();
$arrayofmassactions = array(); $arrayofmassactions = array();
if (empty($conf->holiday->enabled)) { if (empty($conf->holiday->enabled)) {
llxHeader('', $langs->trans('CPTitreMenu')); accessforbidden('Module not enabled');
print '<div class="tabBar">'; }
print '<span style="color: #FF0000;">'.$langs->trans('NotActiveModCP').'</span>';
print '</div>'; // Si l'utilisateur n'a pas le droit de lire cette page
llxFooter(); if (!$user->rights->holiday->readall) {
exit(); accessforbidden();
} }

View File

@ -1585,7 +1585,7 @@ if ($step == 5 && $datatoimport) {
$param .= '&updatekeys[]='.implode('&updatekeys[]=', $updatekeys); $param .= '&updatekeys[]='.implode('&updatekeys[]=', $updatekeys);
} }
llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); llxHeader('', $langs->trans("NewImport"), $help_url);
$head = import_prepare_head($param, 5); $head = import_prepare_head($param, 5);
@ -2051,7 +2051,7 @@ if ($step == 6 && $datatoimport) {
$param .= '&enclosure='.urlencode($enclosure); $param .= '&enclosure='.urlencode($enclosure);
} }
llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones'); llxHeader('', $langs->trans("NewImport"), $help_url);
$head = import_prepare_head($param, 6); $head = import_prepare_head($param, 6);

View File

@ -155,10 +155,11 @@ if ($action == 'add' && $permissiontoadd) {
* View * View
*/ */
$title = $langs->trans("IntracommReportTitle");
llxHeader("", $title);
// Creation mode // Creation mode
if ($action == 'create') { if ($action == 'create') {
$title = $langs->trans("IntracommReportTitle");
llxHeader("", $title);
print load_fiche_titre($langs->trans("IntracommReportTitle")); print load_fiche_titre($langs->trans("IntracommReportTitle"));
print '<form name="charge" method="post" action="'.$_SERVER["PHP_SELF"].'">'; print '<form name="charge" method="post" action="'.$_SERVER["PHP_SELF"].'">';
@ -294,8 +295,6 @@ if ($id > 0 && $action != 'edit') {
{ {
global $langs, $formother, $year, $month, $type_declaration; global $langs, $formother, $year, $month, $type_declaration;
$title = $langs->trans("IntracommReportDESTitle");
llxHeader("", $title);
print load_fiche_titre($langs->trans("IntracommReportDESTitle")); print load_fiche_titre($langs->trans("IntracommReportDESTitle"));
print dol_get_fiche_head(); print dol_get_fiche_head();

View File

@ -85,7 +85,8 @@ if (empty($action)) {
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>'; <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>';
$arrayofcss = array('/takepos/css/phone.css'); $arrayofcss = array('/takepos/css/phone.css');
top_htmlhead($head, $title, 0, 0, '', '');
top_htmlhead($head, $title, 0, 0, '', $arrayofcss);
} else { } else {
top_httphead('text/html', 1); top_httphead('text/html', 1);
} }

View File

@ -716,9 +716,9 @@ if (!empty($conf->project->enabled)) {
$help_url = 'EN:Module_Ticket|FR:DocumentationModuleTicket'; $help_url = 'EN:Module_Ticket|FR:DocumentationModuleTicket';
$page_title = $actionobject->getTitle($action); $title = $actionobject->getTitle($action);
llxHeader('', $page_title, $help_url); llxHeader('', $title, $help_url);
if ($action == 'create' || $action == 'presend') { if ($action == 'create' || $action == 'presend') {
$formticket = new FormTicket($db); $formticket = new FormTicket($db);

View File

@ -730,12 +730,18 @@ if (!empty($conf->stock->enabled)) {
$formproduct = new FormProduct($db); $formproduct = new FormProduct($db);
} }
if ($object->id > 0) {
$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname;
$title = $person_name." - ".$langs->trans('Card');
} else {
$title = $langs->trans("NewUser");
}
$help_url = ''; $help_url = '';
if ($action == 'create' || $action == 'adduserldap') { llxHeader('', $title, $help_url);
$title = $langs->trans("NewUser");
llxHeader('', $title, $help_url);
if ($action == 'create' || $action == 'adduserldap') {
print load_fiche_titre($langs->trans("NewUser"), '', 'user'); print load_fiche_titre($langs->trans("NewUser"), '', 'user');
print '<span class="opacitymedium">'.$langs->trans("CreateInternalUserDesc")."</span><br>\n"; print '<span class="opacitymedium">'.$langs->trans("CreateInternalUserDesc")."</span><br>\n";
@ -1353,10 +1359,6 @@ if ($action == 'create' || $action == 'adduserldap') {
} }
} }
$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname;
$title = $person_name." - ".$langs->trans('Card');
llxHeader('', $title, $help_url);
// Show tabs // Show tabs
if ($mode == 'employee') { // For HRM module development if ($mode == 'employee') { // For HRM module development
$title = $langs->trans("Employee"); $title = $langs->trans("Employee");

View File

@ -370,9 +370,12 @@ if ($action === 'confirm_deletecombination') {
$form = new Form($db); $form = new Form($db);
if (!empty($id) || !empty($ref)) { $title = $langs->trans("Variant");
llxHeader("", "", $langs->trans("CardProduct".$object->type));
llxHeader("", $title);
if (!empty($id) || !empty($ref)) {
$showbarcode = empty($conf->barcode->enabled) ? 0 : 1; $showbarcode = empty($conf->barcode->enabled) ? 0 : 1;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) {
$showbarcode = 0; $showbarcode = 0;
@ -932,9 +935,6 @@ if (!empty($id) || !empty($ref)) {
print '</div>'; print '</div>';
print '</form>'; print '</form>';
} }
} else {
llxHeader();
// not found
} }
// End of page // End of page