Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_field_in_service_object
This commit is contained in:
commit
ed65bca666
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
open_collective: dolibarr
|
open_collective: dolibarr
|
||||||
custom: https://wiki.dolibarr.org/index.php/Subscribe
|
custom: https://wiki.dolibarr.org/index.php/Subscribe
|
||||||
# github: [eldy]
|
github: [eldy]
|
||||||
39
ChangeLog
39
ChangeLog
@ -2,6 +2,45 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 14.0.1 compared to 14.0.0 *****
|
||||||
|
|
||||||
|
FIX: $conf->task used but it does not exist, use $conf->projet instead
|
||||||
|
FIX: #18181
|
||||||
|
FIX: #18212 : Add url field
|
||||||
|
FIX: #18267
|
||||||
|
FIX: #18289 #18294
|
||||||
|
FIX: #18341 lang not loaded
|
||||||
|
FIX: #18389 Accountancy - Bug on LDcompta10 export for supplier invoice
|
||||||
|
FIX: #18399 Fix shipment validation email template override.
|
||||||
|
FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT)
|
||||||
|
FIX: Accountancy - Rules to delete & modify transaction not applied in ledger & subledger
|
||||||
|
FIX: Accountancy - Search date on journal
|
||||||
|
FIX: Accountancy - SQL error on select journal on journal
|
||||||
|
FIX: Accountancy - SQL error when insert a manuel transaction
|
||||||
|
FIX: add include missing file '/core/actions_dellink.inc.php' in project card
|
||||||
|
FIX: avoid to have link to create bookmark on page to create bookmark
|
||||||
|
FIX: bad approver shown on holiday once approved
|
||||||
|
FIX: bad closing div on error message
|
||||||
|
FIX: cannot add time spentd when column ref is not displayed
|
||||||
|
FIX: Can't remove a permission of a group
|
||||||
|
FIX: Can't set cost price when product is not on purchase
|
||||||
|
FIX: compatibility postgresql
|
||||||
|
FIX: filter on status Draft in modulebuilder
|
||||||
|
FIX: holiday card: hooks uninitialized
|
||||||
|
FIX: Invoice - Missing button to reopen an abandoned situation invoice
|
||||||
|
FIX: Link of download main doc on vat list
|
||||||
|
FIX: look and field v14
|
||||||
|
FIX: Missing column Date validation in ledger & subledger
|
||||||
|
FIX: on admin/pdf.php (with javascript enabled) if you set some boolean confs then click on "save", all boolean values are reset
|
||||||
|
FIX: on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref)
|
||||||
|
FIX: postgresql filter select search extrafield
|
||||||
|
FIX: shipping validation workflow: 'ORDER_NEW' trigger called from wrong object
|
||||||
|
FIX: show info of company into user dropdown
|
||||||
|
FIX: totalDayAll hours in tasks
|
||||||
|
FIX: update product lot
|
||||||
|
FIX: using Tulip, deposit mask was not saved
|
||||||
|
FIX: #yogosha6907
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
||||||
|
|
||||||
|
|||||||
@ -48,17 +48,16 @@ $includecustom=0;
|
|||||||
$includeconstants=array();
|
$includeconstants=array();
|
||||||
|
|
||||||
if (empty($argv[1])) {
|
if (empty($argv[1])) {
|
||||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
|
||||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||||
exit -1;
|
exit -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_str($argv[1]);
|
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $argc) {
|
while ($i < $argc) {
|
||||||
if (! empty($argv[$i])) {
|
if (! empty($argv[$i])) {
|
||||||
parse_str($argv[$i]);
|
parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ...
|
||||||
}
|
}
|
||||||
if (preg_match('/includeconstant=/', $argv[$i])) {
|
if (preg_match('/includeconstant=/', $argv[$i])) {
|
||||||
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
|
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
|
||||||
@ -125,8 +124,8 @@ print "\n";
|
|||||||
|
|
||||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||||
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
print 'Delete current files '.$outputdir.'/filelist*.xml*'."\n";
|
||||||
dol_delete_file($outputdir.'/filelist*.xml', 0, 1, 1);
|
dol_delete_file($outputdir.'/filelist*.xml*', 0, 1, 1);
|
||||||
|
|
||||||
$checksumconcat=array();
|
$checksumconcat=array();
|
||||||
|
|
||||||
@ -237,6 +236,14 @@ fputs($fp, '</dolibarr_script_dir_checksum>'."\n");
|
|||||||
fputs($fp, '</checksum_list>'."\n");
|
fputs($fp, '</checksum_list>'."\n");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
print "File ".$outputfile." generated\n";
|
if (empty($buildzip)) {
|
||||||
|
print "File ".$outputfile." generated\n";
|
||||||
|
} else {
|
||||||
|
$result = dol_compress_file($outputfile, $outputfile.'.zip');
|
||||||
|
if ($result > 0) {
|
||||||
|
dol_delete_file($outputfile);
|
||||||
|
print "File ".$outputfile.".zip generated\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@ -43,12 +43,12 @@ if (!$user->admin) {
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
||||||
|
|
||||||
|
$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'login', 'other'
|
||||||
|
|
||||||
if (!defined("MAIN_MOTD")) {
|
if (!defined("MAIN_MOTD")) {
|
||||||
define("MAIN_MOTD", "");
|
define("MAIN_MOTD", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
@ -94,168 +94,178 @@ if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKG
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
$error = 0;
|
||||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
|
||||||
//dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
if ($mode == 'language') {
|
||||||
|
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||||
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
//dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
|
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array()))));
|
if ($mode == 'template') {
|
||||||
if ($val == '') {
|
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
|
|
||||||
} else {
|
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||||
|
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array()))));
|
||||||
|
if ($val == '') {
|
||||||
|
dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity);
|
||||||
|
} else {
|
||||||
|
dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array()))));
|
if ($mode == 'other') {
|
||||||
if ($val == '') {
|
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
//dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
//dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", GETPOST("MAIN_MENU_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||||
|
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
|
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array()))));
|
if ($mode == 'login') {
|
||||||
if ($val == '') {
|
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity);
|
//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array()))));
|
$varforimage = 'imagebackground';
|
||||||
if ($val == '') {
|
$dirforimage = $conf->mycompany->dir_output . '/logos/';
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
if ($_FILES[$varforimage]["tmp_name"]) {
|
||||||
} else {
|
$reg = array();
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity);
|
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
|
||||||
}
|
$original_file = $reg[1];
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array()))));
|
$isimage = image_format_supported($original_file);
|
||||||
if ($val == '') {
|
if ($isimage >= 0) {
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity);
|
dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file);
|
||||||
} else {
|
if (!is_dir($dirforimage)) {
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity);
|
dol_mkdir($dirforimage);
|
||||||
}
|
}
|
||||||
|
$result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']);
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array()))));
|
if ($result > 0) {
|
||||||
if ($val == '') {
|
dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity);
|
} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
|
||||||
} else {
|
$error++;
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity);
|
$langs->load("errors");
|
||||||
}
|
$tmparray = explode(':', $result);
|
||||||
|
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors');
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
} else {
|
||||||
if ($val == '') {
|
$error++;
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity);
|
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
||||||
} else {
|
}
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array()))));
|
|
||||||
if ($val == '') {
|
|
||||||
dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity);
|
|
||||||
} else {
|
|
||||||
dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
|
||||||
|
|
||||||
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
|
||||||
//dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
|
||||||
//dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", GETPOST("MAIN_MENU_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
|
||||||
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
|
||||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
|
||||||
|
|
||||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
|
||||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
|
||||||
//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
|
||||||
|
|
||||||
$varforimage = 'imagebackground'; $dirforimage = $conf->mycompany->dir_output.'/logos/';
|
|
||||||
if ($_FILES[$varforimage]["tmp_name"]) {
|
|
||||||
$reg = array();
|
|
||||||
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
|
|
||||||
$original_file = $reg[1];
|
|
||||||
|
|
||||||
$isimage = image_format_supported($original_file);
|
|
||||||
if ($isimage >= 0) {
|
|
||||||
dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
|
|
||||||
if (!is_dir($dirforimage)) {
|
|
||||||
dol_mkdir($dirforimage);
|
|
||||||
}
|
|
||||||
$result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']);
|
|
||||||
if ($result > 0) {
|
|
||||||
dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity);
|
|
||||||
} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
|
|
||||||
$error++;
|
|
||||||
$langs->load("errors");
|
|
||||||
$tmparray = explode(':', $result);
|
|
||||||
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors');
|
|
||||||
} else {
|
} else {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
$langs->load("errors");
|
||||||
|
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$error++;
|
|
||||||
$langs->load("errors");
|
|
||||||
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
||||||
|
|
||||||
|
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".'&mode='.$mode.(GETPOSTISSET('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||||
$_SESSION["mainmenu"] = ""; // Le gestionnaire de menu a pu changer
|
|
||||||
|
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".(GETPOSTISSET('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,6 +284,7 @@ $formadmin = new FormAdmin($db);
|
|||||||
print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup');
|
print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup');
|
||||||
|
|
||||||
print '<span class="opacitymedium">'.$langs->trans("DisplayDesc")."</span><br>\n";
|
print '<span class="opacitymedium">'.$langs->trans("DisplayDesc")."</span><br>\n";
|
||||||
|
print "<br>\n";
|
||||||
|
|
||||||
//WYSIWYG Editor
|
//WYSIWYG Editor
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
@ -282,242 +293,223 @@ print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP
|
|||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="page_y" value="">';
|
print '<input type="hidden" name="page_y" value="">';
|
||||||
|
print '<input type="hidden" id="mode" name="mode" value="'.dol_escape_htmltag($mode).'">';
|
||||||
|
|
||||||
|
$head = ihm_prepare_head();
|
||||||
|
|
||||||
|
print dol_get_fiche_head($head, $mode, '', -1, '');
|
||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
print '<br>';
|
if ($mode == 'language') {
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||||
print '<tr class="liste_titre"><th>'.img_picto('', 'language').' '.$langs->trans("Language").'</th><th></th>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Default language
|
// Default language
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||||
print img_picto('', 'language', 'class="pictofixedwidth"');
|
print img_picto('', 'language', 'class="pictofixedwidth"');
|
||||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
||||||
//print '<input class="button button-save smallpaddingimp" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
//print '<input class="button button-save smallpaddingimp" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Multilingual GUI
|
// Multilingual GUI
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>';
|
||||||
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>' . "\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
print '<div class="center">';
|
|
||||||
print '<input class="button button-save" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<br><br>';
|
|
||||||
|
|
||||||
// Themes and themes options
|
|
||||||
showSkins(null, 1);
|
|
||||||
print '<br>';
|
|
||||||
print '<div class="center">';
|
|
||||||
print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<br><br>';
|
|
||||||
|
|
||||||
// Other
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
|
||||||
print '<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
|
|
||||||
print '<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans("Miscellaneous").'</th>';
|
|
||||||
print '<th></th>';
|
|
||||||
print '<th width="20"> </tg>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Disable javascript and ajax
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DisableJavascript").'</td><td>';
|
|
||||||
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
|
|
||||||
print ' <span class="opacitymedium"> '.$langs->trans("DisableJavascriptNote").'</span>';
|
|
||||||
print '</td>';
|
|
||||||
print '<td>';
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Max size of lists
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'"></td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Max size of short lists on customer card
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="'.$conf->global->MAIN_SIZE_SHORTLIST_LIMIT.'"></td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// show input border
|
|
||||||
/*
|
|
||||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
|
||||||
print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// First day for weeks
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("WeekStartOnDay").'</td><td>';
|
|
||||||
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// DefaultWorkingDays
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
|
||||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5').'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// DefaultWorkingHours
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
|
||||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18').'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname/Name
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
|
||||||
$array = array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
|
|
||||||
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Hide unauthorized menus
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("HideUnauthorizedMenu").'</td><td>';
|
|
||||||
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
|
|
||||||
print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Hide unauthorized button
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
|
||||||
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
|
|
||||||
print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Hide version link
|
|
||||||
/*
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("HideVersionLink").'</td><td>';
|
|
||||||
print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Show bugtrack link
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
|
||||||
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="'.(empty($conf->global->MAIN_BUGTRACK_ENABLELINK) ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK).'">';
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Hide wiki link on login page
|
|
||||||
$pictohelp = '<span class="fa fa-question-circle"></span>';
|
|
||||||
print '<tr class="oddeven"><td>'.str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')).'</td><td>';
|
|
||||||
print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
|
|
||||||
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Message of the day on home page
|
|
||||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
|
||||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
|
||||||
foreach ($substitutionarray as $key => $val) {
|
|
||||||
$texthelp .= $key.'<br>';
|
|
||||||
}
|
}
|
||||||
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
|
||||||
|
|
||||||
print '</td><td colspan="2">';
|
if ($mode == 'template') {
|
||||||
|
// Themes and themes options
|
||||||
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
showSkins(null, 1);
|
||||||
$doleditor->Create();
|
|
||||||
|
|
||||||
print '</td></tr>'."\n";
|
|
||||||
|
|
||||||
print '</table>'."\n";
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
print '<div class="center">';
|
|
||||||
print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<br><br>';
|
|
||||||
|
|
||||||
// Other
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
|
||||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
|
||||||
print '<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans("LoginPage").'</th>';
|
|
||||||
print '<th></th>';
|
|
||||||
print '<th width="20"> </th>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Hide helpcenter link on login page
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
|
||||||
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
|
|
||||||
print '</td>';
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Message on login page
|
|
||||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user'));
|
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
|
||||||
print '<tr class="oddeven"><td>';
|
|
||||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
|
||||||
foreach ($substitutionarray as $key => $val) {
|
|
||||||
$texthelp .= $key.'<br>';
|
|
||||||
}
|
}
|
||||||
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
|
|
||||||
print '</td><td colspan="2">';
|
|
||||||
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
|
||||||
$doleditor->Create();
|
|
||||||
print '</td></tr>'."\n";
|
|
||||||
|
|
||||||
// Background
|
if ($mode == 'other') {
|
||||||
print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td colspan="2">';
|
// Other
|
||||||
print '<div class="centpercent inline-block">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
$disabled = '';
|
print '<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
|
||||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
|
||||||
$disabled = ' disabled="disabled"';
|
// Disable javascript and ajax
|
||||||
}
|
print '<tr class="oddeven"><td>' . $langs->trans("DisableJavascript") . '</td><td>';
|
||||||
print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"'.$disabled.'>';
|
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
if ($disabled) {
|
print ' <span class="opacitymedium"> ' . $langs->trans("DisableJavascriptNote") . '</span>';
|
||||||
print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') ';
|
print '</td>';
|
||||||
}
|
print '<td>';
|
||||||
if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
|
print '</td>';
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin">'.img_delete($langs->trans("Delete")).'</a>';
|
print '</tr>';
|
||||||
if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) {
|
|
||||||
print ' ';
|
// Max size of lists
|
||||||
print '<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).'">';
|
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Max size of short lists on customer card
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// show input border
|
||||||
|
/*
|
||||||
|
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
||||||
|
print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
// First day for weeks
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>';
|
||||||
|
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// DefaultWorkingDays
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>';
|
||||||
|
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5') . '">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// DefaultWorkingHours
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>';
|
||||||
|
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18') . '">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Firstname/Name
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>';
|
||||||
|
$array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname"));
|
||||||
|
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Hide unauthorized menus
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>';
|
||||||
|
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
|
||||||
|
print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Hide unauthorized button
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>';
|
||||||
|
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
|
||||||
|
print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Hide version link
|
||||||
|
/*
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans("HideVersionLink").'</td><td>';
|
||||||
|
print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Show bugtrack link
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")) . '</td><td>';
|
||||||
|
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (empty($conf->global->MAIN_BUGTRACK_ENABLELINK) ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Hide wiki link on login page
|
||||||
|
$pictohelp = '<span class="fa fa-question-circle"></span>';
|
||||||
|
print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
|
||||||
|
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Message of the day on home page
|
||||||
|
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
||||||
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
||||||
|
foreach ($substitutionarray as $key => $val) {
|
||||||
|
$texthelp .= $key . '<br>';
|
||||||
}
|
}
|
||||||
} else {
|
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
||||||
print '<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
|
||||||
}
|
|
||||||
print '</div>';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</td><td colspan="2">';
|
||||||
print '</div>';
|
|
||||||
|
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||||
|
$doleditor->Create();
|
||||||
|
|
||||||
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
|
print '</table>' . "\n";
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mode == 'login') {
|
||||||
|
// Other
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
|
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||||
|
|
||||||
|
// Hide helpcenter link on login page
|
||||||
|
print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>';
|
||||||
|
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
|
||||||
|
print '</td>';
|
||||||
|
print '<td width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Message on login page
|
||||||
|
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user'));
|
||||||
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
||||||
|
foreach ($substitutionarray as $key => $val) {
|
||||||
|
$texthelp .= $key . '<br>';
|
||||||
|
}
|
||||||
|
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
|
||||||
|
print '</td><td colspan="2">';
|
||||||
|
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||||
|
$doleditor->Create();
|
||||||
|
print '</td></tr>' . "\n";
|
||||||
|
|
||||||
|
// Background
|
||||||
|
print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td colspan="2">';
|
||||||
|
print '<div class="centpercent inline-block">';
|
||||||
|
$disabled = '';
|
||||||
|
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||||
|
$disabled = ' disabled="disabled"';
|
||||||
|
}
|
||||||
|
print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>';
|
||||||
|
if ($disabled) {
|
||||||
|
print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') ';
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
|
||||||
|
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin">' . img_delete($langs->trans("Delete")) . '</a>';
|
||||||
|
if (file_exists($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_LOGIN_BACKGROUND)) {
|
||||||
|
print ' ';
|
||||||
|
print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&file=' . urlencode('logos/' . $conf->global->MAIN_LOGIN_BACKGROUND) . '">';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">';
|
||||||
|
}
|
||||||
|
print '</div>';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '</table>' . "\n";
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@ -17,9 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/blockedlog/ajax/block-info.php
|
* \file htdocs/blockedlog/ajax/check_signature.php
|
||||||
* \ingroup blockedlog
|
* \ingroup blockedlog
|
||||||
* \brief block-info
|
* \brief This page is not used yet.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -38,13 +38,15 @@ if (!defined('NOREQUIREHTML')) {
|
|||||||
|
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php';
|
||||||
|
|
||||||
|
|
||||||
if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
|
if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
|
||||||
exit('BLOCKEDLOG_AUTHORITY_URL not set');
|
exit('BLOCKEDLOG_AUTHORITY_URL not set');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php';
|
|
||||||
|
|
||||||
$auth = new BlockedLogAuthority($db);
|
$auth = new BlockedLogAuthority($db);
|
||||||
$auth->syncSignatureWithAuthority();
|
$auth->syncSignatureWithAuthority();
|
||||||
@ -63,8 +65,11 @@ if (is_array($bocks)) {
|
|||||||
|
|
||||||
$hash = $auth->getBlockchainHash();
|
$hash = $auth->getBlockchainHash();
|
||||||
|
|
||||||
$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.$auth->signature.'&h='.$hash;
|
// Call external authority
|
||||||
|
$url = $conf->global->BLOCKEDLOG_AUTHORITY_URL.'/blockedlog/ajax/authority.php?s='.urlencode($auth->signature).'&h='.urlencode($hash);
|
||||||
|
|
||||||
|
$resarray = getURLContent($url, 'GET', '', 1, array(), array(), 2);
|
||||||
|
$res = $resarray['content'];
|
||||||
|
|
||||||
$res = file_get_contents($url);
|
|
||||||
//echo $url;
|
//echo $url;
|
||||||
echo $res;
|
echo dol_escape_htmltag($res);
|
||||||
|
|||||||
@ -1185,9 +1185,9 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Project").'</td><td id="project-input-container">';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("Project").'</td><td id="project-input-container">';
|
||||||
print img_picto('', 'project', 'class="pictofixedwidth"');
|
print img_picto('', 'project', 'class="pictofixedwidth"');
|
||||||
print $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
|
print $formproject->select_projects((empty($societe->id) ? '' : $societe->id), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
|
||||||
|
|
||||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">';
|
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.(empty($societe->id) ? '' : $societe->id).'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">';
|
||||||
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
|
print '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||||
$urloption = '?action=create&donotclearsession=1';
|
$urloption = '?action=create&donotclearsession=1';
|
||||||
$url = dol_buildpath('comm/action/card.php', 2).$urloption;
|
$url = dol_buildpath('comm/action/card.php', 2).$urloption;
|
||||||
|
|||||||
@ -59,6 +59,8 @@ if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) {
|
|||||||
$filtert = $user->id;
|
$filtert = $user->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$newparam = '';
|
||||||
|
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST("sortfield", 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST("sortorder", 'alpha');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
|
|||||||
@ -292,6 +292,11 @@ if ($socid > 0) {
|
|||||||
$sql .= " AND s.rowid = ".((int) $socid);
|
$sql .= " AND s.rowid = ".((int) $socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filter_dateouvertureprevue = '';
|
||||||
|
$filter_date1 = '';
|
||||||
|
$filter_date2 = '';
|
||||||
|
$filter_opcloture = '';
|
||||||
|
|
||||||
$filter_dateouvertureprevue_start = dol_mktime(0, 0, 0, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear);
|
$filter_dateouvertureprevue_start = dol_mktime(0, 0, 0, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear);
|
||||||
$filter_dateouvertureprevue_end = dol_mktime(23, 59, 59, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear);
|
$filter_dateouvertureprevue_end = dol_mktime(23, 59, 59, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear);
|
||||||
if ($filter_dateouvertureprevue_start != '' && $filter_opouvertureprevue == -1) {
|
if ($filter_dateouvertureprevue_start != '' && $filter_opouvertureprevue == -1) {
|
||||||
@ -425,6 +430,7 @@ if ($filter_date2_start != '') {
|
|||||||
if ($filter_datecloture_start != '') {
|
if ($filter_datecloture_start != '') {
|
||||||
$param .= '&opclotureday='.$op2day.'&opcloturemonth='.$op2month.'&opclotureyear='.$op2year;
|
$param .= '&opclotureday='.$op2day.'&opcloturemonth='.$op2month.'&opclotureyear='.$op2year;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($optioncss != '') {
|
if ($optioncss != '') {
|
||||||
$param .= '&optioncss='.$optioncss;
|
$param .= '&optioncss='.$optioncss;
|
||||||
}
|
}
|
||||||
@ -468,7 +474,7 @@ if ($mode == "5") {
|
|||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contract', 0, '', '', $limit);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contract', 0, '', '', $limit);
|
||||||
|
|
||||||
if ($sall) {
|
if (!empty($sall)) {
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
}
|
}
|
||||||
@ -476,6 +482,7 @@ if ($sall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$morefilter = '';
|
$morefilter = '';
|
||||||
|
$moreforfilter = '';
|
||||||
|
|
||||||
// If the user can view categories of products
|
// If the user can view categories of products
|
||||||
if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||||
|
|||||||
@ -66,10 +66,12 @@ class GoogleAPI
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
// Desired address
|
// Desired address
|
||||||
$urladdress = "https://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".$this->key;
|
$urladdress = "https://maps.google.com/maps/geo?q=".urlencode($address)."&output=xml&key=".urlencode($this->key);
|
||||||
|
|
||||||
// Retrieve the URL contents
|
// Retrieve the URL contents
|
||||||
$page = file_get_contents($urladdress);
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
|
$pagearray = getURLContent($urladdress, 'GET');
|
||||||
|
$page = $pagearray['content'];
|
||||||
|
|
||||||
$code = strstr($page, '<coordinates>');
|
$code = strstr($page, '<coordinates>');
|
||||||
$code = strstr($code, '>');
|
$code = strstr($code, '>');
|
||||||
|
|||||||
@ -160,9 +160,10 @@ function versiondolibarrarray()
|
|||||||
* @param int $linelengthlimit Limit for length of each line (Use 0 if unknown, may be faster if defined)
|
* @param int $linelengthlimit Limit for length of each line (Use 0 if unknown, may be faster if defined)
|
||||||
* @param int $nocommentremoval Do no try to remove comments (in such a case, we consider that each line is a request, so use also $linelengthlimit=0)
|
* @param int $nocommentremoval Do no try to remove comments (in such a case, we consider that each line is a request, so use also $linelengthlimit=0)
|
||||||
* @param int $offsetforchartofaccount Offset to use to load chart of account table to update sql on the fly to add offset to rowid and account_parent value
|
* @param int $offsetforchartofaccount Offset to use to load chart of account table to update sql on the fly to add offset to rowid and account_parent value
|
||||||
|
* @param int $colspan 2=Add a colspan=2 on td
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handler = '', $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0)
|
function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handler = '', $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0, $colspan = 0)
|
||||||
{
|
{
|
||||||
global $db, $conf, $langs, $user;
|
global $db, $conf, $langs, $user;
|
||||||
|
|
||||||
@ -282,13 +283,9 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr><td class="tdtop" colspan="2">';
|
print '<tr><td class="tdtop"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
}
|
print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div>";
|
||||||
if (!$silent) {
|
print '</td></tr>';
|
||||||
print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div></td>";
|
|
||||||
}
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
@ -337,7 +334,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
|
|
||||||
// Add log of request
|
// Add log of request
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr class="trforrunsql"><td class="tdtop opacitymedium">'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
|
print '<tr class="trforrunsql"><td class="tdtop opacitymedium"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
|
||||||
}
|
}
|
||||||
dol_syslog('Admin.lib::run_sql Request '.($i + 1), LOG_DEBUG);
|
dol_syslog('Admin.lib::run_sql Request '.($i + 1), LOG_DEBUG);
|
||||||
$sqlmodified = 0;
|
$sqlmodified = 0;
|
||||||
@ -371,13 +368,9 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
$cursor = $reg[1];
|
$cursor = $reg[1];
|
||||||
if (empty($listofinsertedrowid[$cursor])) {
|
if (empty($listofinsertedrowid[$cursor])) {
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr><td class="tdtop" colspan="2">';
|
print '<tr><td class="tdtop"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
}
|
print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div>";
|
||||||
if (!$silent) {
|
print '</td></tr>';
|
||||||
print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div></td>";
|
|
||||||
}
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
@ -437,22 +430,14 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
// Is it an error we accept
|
// Is it an error we accept
|
||||||
if (!in_array($errno, $okerrors)) {
|
if (!in_array($errno, $okerrors)) {
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr><td class="tdtop" colspan="2">';
|
print '<tr><td class="tdtop"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
}
|
print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div>";
|
||||||
if (!$silent) {
|
print '</td></tr>'."\n";
|
||||||
print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div></td>";
|
|
||||||
}
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>'."\n";
|
|
||||||
}
|
}
|
||||||
dol_syslog('Admin.lib::run_sql Request '.($i + 1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
|
dol_syslog('Admin.lib::run_sql Request '.($i + 1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>'."\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -636,7 +621,7 @@ function dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0,
|
|||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param int $nbofactivatedmodules Number f oactivated modules
|
* @param int $nbofactivatedmodules Number if activated modules
|
||||||
* @param int $nboftotalmodules Nb of total modules
|
* @param int $nboftotalmodules Nb of total modules
|
||||||
* @return array Array of tabs to show
|
* @return array Array of tabs to show
|
||||||
*/
|
*/
|
||||||
@ -679,6 +664,45 @@ function modules_prepare_head($nbofactivatedmodules, $nboftotalmodules)
|
|||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare array with list of tabs
|
||||||
|
*
|
||||||
|
* @return array Array of tabs to show
|
||||||
|
*/
|
||||||
|
function ihm_prepare_head()
|
||||||
|
{
|
||||||
|
global $langs, $conf, $user;
|
||||||
|
$h = 0;
|
||||||
|
$head = array();
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=language";
|
||||||
|
$head[$h][1] = $langs->trans("DefaultLanguage");
|
||||||
|
$head[$h][2] = 'language';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=template";
|
||||||
|
$head[$h][1] = $langs->trans("DefaultSkin");
|
||||||
|
$head[$h][2] = 'template';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=login";
|
||||||
|
$head[$h][1] = $langs->trans("LoginPage");
|
||||||
|
$head[$h][2] = 'login';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT."/admin/ihm.php?mode=other";
|
||||||
|
$head[$h][1] = $langs->trans("Miscellaneous");
|
||||||
|
$head[$h][2] = 'other';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin');
|
||||||
|
|
||||||
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'ihm_admin', 'remove');
|
||||||
|
|
||||||
|
|
||||||
|
return $head;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
|
|||||||
@ -2130,7 +2130,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
|
|||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$ret = '';
|
$ret = '';
|
||||||
$countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
|
$countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR', 'CN'); // See also MAIN_FORCE_STATE_INTO_ADDRESS
|
||||||
|
|
||||||
// See format of addresses on https://en.wikipedia.org/wiki/Address
|
// See format of addresses on https://en.wikipedia.org/wiki/Address
|
||||||
// Address
|
// Address
|
||||||
@ -2138,7 +2138,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs
|
|||||||
$ret .= ($extralangcode ? $object->array_languages['address'][$extralangcode] : (empty($object->address) ? '' : $object->address));
|
$ret .= ($extralangcode ? $object->array_languages['address'][$extralangcode] : (empty($object->address) ? '' : $object->address));
|
||||||
}
|
}
|
||||||
// Zip/Town/State
|
// Zip/Town/State
|
||||||
if (isset($object->country_code) && in_array($object->country_code, array('AU', 'CA', 'US')) || !empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) {
|
if (isset($object->country_code) && in_array($object->country_code, array('AU', 'CA', 'US', 'CN')) || !empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)) {
|
||||||
// US: title firstname name \n address lines \n town, state, zip \n country
|
// US: title firstname name \n address lines \n town, state, zip \n country
|
||||||
$town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : (empty($object->town) ? '' : $object->town));
|
$town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : (empty($object->town) ? '' : $object->town));
|
||||||
$ret .= ($ret ? $sep : '').$town;
|
$ret .= ($ret ? $sep : '').$town;
|
||||||
|
|||||||
@ -111,7 +111,7 @@ function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $auth
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('other', 'main', 'errors'));
|
$langs->loadLangs(array('other', 'main', 'errors'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorFailedToLoadLoginFileForMode", $mode);
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorFailedToLoadLoginFileForMode", $mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,13 +76,13 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) {
|
if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) {
|
if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorBadLoginPassword");
|
||||||
}
|
}
|
||||||
|
|
||||||
// We must check entity
|
// We must check entity
|
||||||
@ -153,7 +153,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorBadLoginPassword");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO db error for '".$usertotest."' error=".$db->lasterror(), LOG_ERR);
|
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO db error for '".$usertotest."' error=".$db->lasterror(), LOG_ERR);
|
||||||
|
|||||||
@ -38,7 +38,7 @@ function check_user_password_empty($usertotest, $passwordtotest, $entitytotest)
|
|||||||
dol_syslog("functions_empty::check_user_password_empty usertotest=".$usertotest);
|
dol_syslog("functions_empty::check_user_password_empty usertotest=".$usertotest);
|
||||||
|
|
||||||
$login = '';
|
$login = '';
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("FailedToLogin");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("FailedToLogin");
|
||||||
|
|
||||||
return $login;
|
return $login;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,13 +50,13 @@ function check_user_password_http($usertotest, $passwordtotest, $entitytotest)
|
|||||||
if ($tmpuser->datestartvalidity && $db->jdate($tmpuser->datestartvalidity) >= $now) {
|
if ($tmpuser->datestartvalidity && $db->jdate($tmpuser->datestartvalidity) >= $now) {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) {
|
if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other'));
|
$langs->loadLangs(array('main', 'other'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLDAPFunctionsAreDisabledOnThisPHP").' '.$langs->trans("TryAnotherConnectionMode");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLDAPFunctionsAreDisabledOnThisPHP").' '.$langs->transnoentitiesnoconv("TryAnotherConnectionMode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
$ldap->close();
|
$ldap->close();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
$langs->load('ldap');
|
$langs->load('ldap');
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("YouMustChangePassNextLogon", $usertotest, $ldap->domainFQDN);
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("YouMustChangePassNextLogon", $usertotest, $ldap->domainFQDN);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -169,14 +169,14 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
$ldap->close();
|
$ldap->close();
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) {
|
if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) {
|
||||||
$ldap->close();
|
$ldap->close();
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other'));
|
$langs->loadLangs(array('main', 'other'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorBadLoginPassword");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Login failed. Return false, together with the error code and text from
|
/* Login failed. Return false, together with the error code and text from
|
||||||
@ -268,7 +268,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other', 'errors'));
|
$langs->loadLangs(array('main', 'other', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = ($ldap->error ? $ldap->error : $langs->trans("ErrorBadLoginPassword"));
|
$_SESSION["dol_loginmesg"] = ($ldap->error ? $ldap->error : $langs->transnoentitiesnoconv("ErrorBadLoginPassword"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$ldap->close();
|
$ldap->close();
|
||||||
|
|||||||
@ -45,11 +45,11 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
|
|||||||
// Get identity from user and redirect browser to OpenID Server
|
// Get identity from user and redirect browser to OpenID Server
|
||||||
if (GETPOSTISSET('username')) {
|
if (GETPOSTISSET('username')) {
|
||||||
$openid = new SimpleOpenID();
|
$openid = new SimpleOpenID();
|
||||||
$openid->SetIdentity($_POST['username']);
|
$openid->SetIdentity(GETPOST('username'));
|
||||||
$protocol = ($conf->file->main_force_https ? 'https://' : 'http://');
|
$protocol = ($conf->file->main_force_https ? 'https://' : 'http://');
|
||||||
$openid->SetTrustRoot($protocol.$_SERVER["HTTP_HOST"]);
|
$openid->SetTrustRoot($protocol.$_SERVER["HTTP_HOST"]);
|
||||||
$openid->SetRequiredFields(array('email', 'fullname'));
|
$openid->SetRequiredFields(array('email', 'fullname'));
|
||||||
$_SESSION['dol_entity'] = $_POST["entity"];
|
$_SESSION['dol_entity'] = GETPOST("entity", 'int');
|
||||||
//$openid->SetOptionalFields(array('dob','gender','postcode','country','language','timezone'));
|
//$openid->SetOptionalFields(array('dob','gender','postcode','country','language','timezone'));
|
||||||
if ($openid->sendDiscoveryRequestToGetXRDS()) {
|
if ($openid->sendDiscoveryRequestToGetXRDS()) {
|
||||||
$openid->SetApprovedURL($protocol.$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]); // Send Response from OpenID server to this script
|
$openid->SetApprovedURL($protocol.$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]); // Send Response from OpenID server to this script
|
||||||
@ -62,15 +62,15 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
|
|||||||
} elseif ($_GET['openid_mode'] == 'id_res') {
|
} elseif ($_GET['openid_mode'] == 'id_res') {
|
||||||
// Perform HTTP Request to OpenID server to validate key
|
// Perform HTTP Request to OpenID server to validate key
|
||||||
$openid = new SimpleOpenID();
|
$openid = new SimpleOpenID();
|
||||||
$openid->SetIdentity($_GET['openid_identity']);
|
$openid->SetIdentity(GETPOST('openid_identity'));
|
||||||
$openid_validation_result = $openid->ValidateWithServer();
|
$openid_validation_result = $openid->ValidateWithServer();
|
||||||
if ($openid_validation_result === true) {
|
if ($openid_validation_result === true) {
|
||||||
// OK HERE KEY IS VALID
|
// OK HERE KEY IS VALID
|
||||||
|
|
||||||
$sql = "SELECT login, entity, datestartvalidity, dateendvalidity";
|
$sql = "SELECT login, entity, datestartvalidity, dateendvalidity";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user";
|
$sql .= " FROM ".MAIN_DB_PREFIX."user";
|
||||||
$sql .= " WHERE openid = '".$db->escape($_GET['openid_identity'])."'";
|
$sql .= " WHERE openid = '".$db->escape(GETPOST('openid_identity'))."'";
|
||||||
$sql .= " AND entity IN (0,".($_SESSION["dol_entity"] ? $_SESSION["dol_entity"] : 1).")";
|
$sql .= " AND entity IN (0,".($_SESSION["dol_entity"] ? ((int) $_SESSION["dol_entity"]) : 1).")";
|
||||||
|
|
||||||
dol_syslog("functions_openid::check_user_password_openid", LOG_DEBUG);
|
dol_syslog("functions_openid::check_user_password_openid", LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -81,13 +81,13 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
|
|||||||
if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) {
|
if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) {
|
if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
|
||||||
return '--bad-login-validity--';
|
return '--bad-login-validity--';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -332,7 +332,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->fil
|
|||||||
if (!empty($_SESSION['dol_loginmesg'])) {
|
if (!empty($_SESSION['dol_loginmesg'])) {
|
||||||
?>
|
?>
|
||||||
<div class="center login_main_message"><div class="error">
|
<div class="center login_main_message"><div class="error">
|
||||||
<?php echo $_SESSION['dol_loginmesg']; ?>
|
<?php echo dol_escape_htmltag($_SESSION['dol_loginmesg']); ?>
|
||||||
</div></div>
|
</div></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,10 +59,12 @@ table.main-inside {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
/* border-bottom: 1px solid #ccc; */
|
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
|
table.main-inside-borderbottom {
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
table.main {
|
table.main {
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
|
|||||||
@ -114,7 +114,7 @@ if ($action == "set") {
|
|||||||
|
|
||||||
$morehtml = '';
|
$morehtml = '';
|
||||||
|
|
||||||
pHeader($langs->trans("SetupEnd"), "step5");
|
pHeader($langs->trans("SetupEnd"), "step5", 'set', '', '', 'main-inside main-inside-borderbottom');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Test if we can run a first install process
|
// Test if we can run a first install process
|
||||||
|
|||||||
@ -102,7 +102,7 @@ if (!$versionfrom && !$versionto) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pHeader('', "upgrade2", GETPOST('action', 'aZ09'), 'versionfrom='.$versionfrom.'&versionto='.$versionto);
|
pHeader('', "upgrade2", GETPOST('action', 'aZ09'), 'versionfrom='.$versionfrom.'&versionto='.$versionto, '', 'main-inside main-inside-borderbottom');
|
||||||
|
|
||||||
$actiondone = 0;
|
$actiondone = 0;
|
||||||
|
|
||||||
@ -348,9 +348,10 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td class="right">'.$file.'</td></tr>'."\n";
|
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td class="right">'.$file.'</td></tr>'."\n";
|
||||||
|
|
||||||
// Run sql script
|
// Run sql script
|
||||||
$ok = run_sql($dir.$file, 0, '', 1);
|
$ok = run_sql($dir.$file, 0, '', 1, '', 'default', 32768, 0, 0, 2);
|
||||||
$listoffileprocessed[$dir.$file] = $dir.$file;
|
$listoffileprocessed[$dir.$file] = $dir.$file;
|
||||||
|
|
||||||
|
|
||||||
// Scan if there is migration scripts that depends of Dolibarr version
|
// Scan if there is migration scripts that depends of Dolibarr version
|
||||||
// for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql")
|
// for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql")
|
||||||
$modulesfile = array();
|
$modulesfile = array();
|
||||||
@ -369,17 +370,20 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($modulesfile as $modulefilelong => $modulefileshort) {
|
if (count($modulesfile)) {
|
||||||
if (in_array($modulefilelong, $listoffileprocessed)) {
|
print '<tr><td colspan="2"><hr style="border-color: #ccc; border-top-style: none;"></td></tr>';
|
||||||
continue;
|
|
||||||
|
foreach ($modulesfile as $modulefilelong => $modulefileshort) {
|
||||||
|
if (in_array($modulefilelong, $listoffileprocessed)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td class="right">'.$modulefileshort.'</td></tr>'."\n";
|
||||||
|
|
||||||
|
// Run sql script
|
||||||
|
$okmodule = run_sql($modulefilelong, 0, '', 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
|
||||||
|
$listoffileprocessed[$modulefilelong] = $modulefilelong;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="2"><hr></td></tr>';
|
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td class="right">'.$modulefileshort.'</td></tr>'."\n";
|
|
||||||
|
|
||||||
// Run sql script
|
|
||||||
$okmodule = run_sql($modulefilelong, 0, '', 1); // Note: Result of migration of external module should not decide if we continue migration of Dolibarr or not.
|
|
||||||
$listoffileprocessed[$modulefilelong] = $modulefilelong;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,7 +113,7 @@ if ((!$versionfrom || preg_match('/version/', $versionfrom)) && (!$versionto ||
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pHeader('', 'step5', GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'upgrade', 'versionfrom='.$versionfrom.'&versionto='.$versionto);
|
pHeader('', 'step5', GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'upgrade', 'versionfrom='.$versionfrom.'&versionto='.$versionto, '', 'main-inside main-inside-borderbottom');
|
||||||
|
|
||||||
|
|
||||||
if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) {
|
if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) {
|
||||||
|
|||||||
@ -8,21 +8,21 @@ FONTFORPDF=helvetica
|
|||||||
FONTSIZEFORPDF=10
|
FONTSIZEFORPDF=10
|
||||||
SeparatorDecimal=,
|
SeparatorDecimal=,
|
||||||
SeparatorThousand=Space
|
SeparatorThousand=Space
|
||||||
FormatDateShort=%m/%d/%Y
|
FormatDateShort=%d-%m-%Y
|
||||||
FormatDateShortInput=%m/%d/%Y
|
FormatDateShortInput=%d-%m-%Y
|
||||||
FormatDateShortJava=MM/dd/yyyy
|
FormatDateShortJava=dd-MM-yyyy
|
||||||
FormatDateShortJavaInput=MM/dd/yyyy
|
FormatDateShortJavaInput=dd-MM-yyyy
|
||||||
FormatDateShortJQuery=mm/dd/yy
|
FormatDateShortJQuery=dd-mm-yy
|
||||||
FormatDateShortJQueryInput=mm/dd/yy
|
FormatDateShortJQueryInput=dd-mm-yy
|
||||||
FormatHourShortJQuery=HH:MI
|
FormatHourShortJQuery=HH:MI
|
||||||
FormatHourShort=%I:%M %p
|
FormatHourShort=%I:%M %p
|
||||||
FormatHourShortDuration=%H:%M
|
FormatHourShortDuration=%H:%M
|
||||||
FormatDateTextShort=%b %d, %Y
|
FormatDateTextShort=%d %b, %Y
|
||||||
FormatDateText=%B %d, %Y
|
FormatDateText=%d %B, %Y
|
||||||
FormatDateHourShort=%m/%d/%Y %I:%M %p
|
FormatDateHourShort=%d-%m-%Y %I:%M %p
|
||||||
FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p
|
FormatDateHourSecShort=%d-%m-%Y %I:%M:%S %p
|
||||||
FormatDateHourTextShort=%b %d, %Y, %I:%M %p
|
FormatDateHourTextShort=%d %m, %Y, %I:%M %p
|
||||||
FormatDateHourText=%B %d, %Y, %I:%M %p
|
FormatDateHourText=%d %B, %Y, %I:%M %p
|
||||||
DatabaseConnection=Databaseverbinding
|
DatabaseConnection=Databaseverbinding
|
||||||
NoTemplateDefined=Geen sjabloon beschikbaar voor dit e-mailtype
|
NoTemplateDefined=Geen sjabloon beschikbaar voor dit e-mailtype
|
||||||
AvailableVariables=Beschikbare substitutievariabelen
|
AvailableVariables=Beschikbare substitutievariabelen
|
||||||
|
|||||||
@ -651,7 +651,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
// Load translation files required by page
|
// Load translation files required by page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadValueForCode");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorBadValueForCode");
|
||||||
$test = false;
|
$test = false;
|
||||||
|
|
||||||
// Call trigger for the "security events" log
|
// Call trigger for the "security events" log
|
||||||
@ -745,7 +745,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
// Bad password. No authmode has found a good password.
|
// Bad password. No authmode has found a good password.
|
||||||
// We set a generic message if not defined inside function checkLoginPassEntity or subfunctions
|
// We set a generic message if not defined inside function checkLoginPassEntity or subfunctions
|
||||||
if (empty($_SESSION["dol_loginmesg"])) {
|
if (empty($_SESSION["dol_loginmesg"])) {
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword");
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorBadLoginPassword");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call trigger for the "security events" log
|
// Call trigger for the "security events" log
|
||||||
@ -798,7 +798,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
// Load translation files required by page
|
// Load translation files required by page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorCantLoadUserFromDolibarrDatabase", $login);
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorCantLoadUserFromDolibarrDatabase", $login);
|
||||||
|
|
||||||
$user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
$user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
||||||
}
|
}
|
||||||
@ -862,7 +862,7 @@ if (!defined('NOLOGIN')) {
|
|||||||
// Load translation files required by page
|
// Load translation files required by page
|
||||||
$langs->loadLangs(array('main', 'errors'));
|
$langs->loadLangs(array('main', 'errors'));
|
||||||
|
|
||||||
$_SESSION["dol_loginmesg"] = $langs->trans("ErrorCantLoadUserFromDolibarrDatabase", $login);
|
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorCantLoadUserFromDolibarrDatabase", $login);
|
||||||
|
|
||||||
$user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
$user->trigger_mesg = 'ErrorCantLoadUserFromDolibarrDatabase - login='.$login;
|
||||||
}
|
}
|
||||||
@ -2016,24 +2016,24 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
|||||||
$dropdownBody .= '<div id="topmenulogincompanyinfo" >';
|
$dropdownBody .= '<div id="topmenulogincompanyinfo" >';
|
||||||
|
|
||||||
if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') {
|
if ($langs->transcountry("ProfId1", $mysoc->country_code) != '-') {
|
||||||
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId1", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIREN).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId1", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_SIREN")).'</span>';
|
||||||
}
|
}
|
||||||
if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') {
|
if ($langs->transcountry("ProfId2", $mysoc->country_code) != '-') {
|
||||||
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId2", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_SIRET).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId2", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_SIRET")).'</span>';
|
||||||
}
|
}
|
||||||
if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') {
|
if ($langs->transcountry("ProfId3", $mysoc->country_code) != '-') {
|
||||||
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId3", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_APE).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId3", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_APE")).'</span>';
|
||||||
}
|
}
|
||||||
if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') {
|
if ($langs->transcountry("ProfId4", $mysoc->country_code) != '-') {
|
||||||
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId4", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_RCS).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId4", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_RCS")).'</span>';
|
||||||
}
|
}
|
||||||
if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') {
|
if ($langs->transcountry("ProfId5", $mysoc->country_code) != '-') {
|
||||||
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId5", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID5).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId5", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_PROFID5")).'</span>';
|
||||||
}
|
}
|
||||||
if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') {
|
if ($langs->transcountry("ProfId6", $mysoc->country_code) != '-') {
|
||||||
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId6", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_PROFID6).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->transcountry("ProfId6", $mysoc->country_code).'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_PROFID6")).'</span>';
|
||||||
}
|
}
|
||||||
$dropdownBody .= '<br><b>'.$langs->trans("VATIntraShort").'</b>: <span>'.showValueWithClipboardCPButton($conf->global->MAIN_INFO_TVAINTRA).'</span>';
|
$dropdownBody .= '<br><b>'.$langs->trans("VATIntraShort").'</b>: <span>'.showValueWithClipboardCPButton(getDolGlobalString("MAIN_INFO_TVAINTRA")).'</span>';
|
||||||
|
|
||||||
$dropdownBody .= '</div>';
|
$dropdownBody .= '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,8 @@ foreach ($result as $driver) {
|
|||||||
$classname = 'printing_'.$driver;
|
$classname = 'printing_'.$driver;
|
||||||
$langs->load($driver);
|
$langs->load($driver);
|
||||||
$printer = new $classname($db);
|
$printer = new $classname($db);
|
||||||
if ($conf->global->{$printer->active}) {
|
$keyforprinteractive = $printer->active;
|
||||||
|
if ($keyforprinteractive && $conf->global->$keyforprinteractive) {
|
||||||
//$printer->listJobs('commande');
|
//$printer->listJobs('commande');
|
||||||
$result = $printer->listJobs();
|
$result = $printer->listJobs();
|
||||||
print $printer->resprint;
|
print $printer->resprint;
|
||||||
|
|||||||
@ -88,8 +88,8 @@ $mesg = ''; $error = 0; $errors = array();
|
|||||||
$refalreadyexists = 0;
|
$refalreadyexists = 0;
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'alpha') : null);
|
||||||
$type = (GETPOST('type', 'int') !== '') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT;
|
$type = (GETPOSTISSET('type') ? GETPOST('type', 'int') : Product::TYPE_PRODUCT);
|
||||||
$action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view');
|
$action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
@ -113,6 +113,16 @@ if (!empty($user->socid)) {
|
|||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load object modCodeProduct
|
||||||
|
$module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard');
|
||||||
|
if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') {
|
||||||
|
$module = substr($module, 0, dol_strlen($module) - 4);
|
||||||
|
}
|
||||||
|
$result = dol_include_once('/core/modules/product/'.$module.'.php');
|
||||||
|
if ($result > 0) {
|
||||||
|
$modCodeProduct = new $module();
|
||||||
|
}
|
||||||
|
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
$object->type = $type; // so test later to fill $usercancxxx is correct
|
$object->type = $type; // so test later to fill $usercancxxx is correct
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@ -248,9 +258,11 @@ if (empty($reshook)) {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (empty($ref)) {
|
if (empty($ref)) {
|
||||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors');
|
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
||||||
$action = "create";
|
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors');
|
||||||
$error++;
|
$action = "create";
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($duration_value) && empty($duration_unit)) {
|
if (!empty($duration_value) && empty($duration_unit)) {
|
||||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors');
|
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors');
|
||||||
@ -432,6 +444,11 @@ if (empty($reshook)) {
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$ref && !empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
||||||
|
// Generate ref...
|
||||||
|
$ref = $modCodeProduct->getNextValue($object, $type);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
}
|
}
|
||||||
@ -471,7 +488,9 @@ if (empty($reshook)) {
|
|||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
$object->oldcopy = clone $object;
|
$object->oldcopy = clone $object;
|
||||||
|
|
||||||
$object->ref = $ref;
|
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
||||||
|
$object->ref = $ref;
|
||||||
|
}
|
||||||
$object->label = GETPOST('label', $label_security_check);
|
$object->label = GETPOST('label', $label_security_check);
|
||||||
|
|
||||||
$desc = dol_htmlcleanlastbr(preg_replace('/ $/', '', GETPOST('desc', 'restricthtml')));
|
$desc = dol_htmlcleanlastbr(preg_replace('/ $/', '', GETPOST('desc', 'restricthtml')));
|
||||||
@ -1085,16 +1104,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
print '<tr>';
|
if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) {
|
||||||
$tmpcode = '';
|
print '<tr>';
|
||||||
if (!empty($modCodeProduct->code_auto)) {
|
$tmpcode = '';
|
||||||
$tmpcode = $modCodeProduct->getNextValue($object, $type);
|
if (!empty($modCodeProduct->code_auto)) {
|
||||||
|
$tmpcode = $modCodeProduct->getNextValue($object, $type);
|
||||||
|
}
|
||||||
|
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">';
|
||||||
|
if ($refalreadyexists) {
|
||||||
|
print $langs->trans("RefAlreadyExists");
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">';
|
|
||||||
if ($refalreadyexists) {
|
|
||||||
print $langs->trans("RefAlreadyExists");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label', $label_security_check)).'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag(GETPOST('label', $label_security_check)).'"></td></tr>';
|
||||||
@ -2444,16 +2465,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load object modCodeProduct
|
|
||||||
$module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard');
|
|
||||||
if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') {
|
|
||||||
$module = substr($module, 0, dol_strlen($module) - 4);
|
|
||||||
}
|
|
||||||
$result = dol_include_once('/core/modules/product/'.$module.'.php');
|
|
||||||
if ($result > 0) {
|
|
||||||
$modCodeProduct = new $module();
|
|
||||||
}
|
|
||||||
|
|
||||||
$tmpcode = '';
|
$tmpcode = '';
|
||||||
if (!empty($modCodeProduct->code_auto)) {
|
if (!empty($modCodeProduct->code_auto)) {
|
||||||
$tmpcode = $modCodeProduct->getNextValue($object, $object->type);
|
$tmpcode = $modCodeProduct->getNextValue($object, $object->type);
|
||||||
|
|||||||
@ -2239,7 +2239,7 @@ class Product extends CommonObject
|
|||||||
* @param string $ref Ref of product/service to load
|
* @param string $ref Ref of product/service to load
|
||||||
* @param string $ref_ext Ref ext of product/service to load
|
* @param string $ref_ext Ref ext of product/service to load
|
||||||
* @param string $barcode Barcode of product/service to load
|
* @param string $barcode Barcode of product/service to load
|
||||||
* @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead
|
* @param int $ignore_expression When module dynamicprices is on, ignores the math expression for calculating price and uses the db value instead
|
||||||
* @param int $ignore_price_load Load product without loading prices arrays (when we are sure we don't need them)
|
* @param int $ignore_price_load Load product without loading prices arrays (when we are sure we don't need them)
|
||||||
* @param int $ignore_lang_load Load product without loading language arrays (when we are sure we don't need them)
|
* @param int $ignore_lang_load Load product without loading language arrays (when we are sure we don't need them)
|
||||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||||
@ -2459,8 +2459,8 @@ class Product extends CommonObject
|
|||||||
$sql .= " WHERE entity IN (".getEntity('productprice').")";
|
$sql .= " WHERE entity IN (".getEntity('productprice').")";
|
||||||
$sql .= " AND price_level=".((int) $i);
|
$sql .= " AND price_level=".((int) $i);
|
||||||
$sql .= " AND fk_product = ".((int) $this->id);
|
$sql .= " AND fk_product = ".((int) $this->id);
|
||||||
$sql .= " ORDER BY date_price DESC, rowid DESC";
|
$sql .= " ORDER BY date_price DESC, rowid DESC"; // Get the most recent line
|
||||||
$sql .= " LIMIT 1";
|
$sql .= " LIMIT 1"; // Only the first one
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$result = $this->db->fetch_array($resql);
|
$result = $this->db->fetch_array($resql);
|
||||||
|
|||||||
@ -231,9 +231,9 @@ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $obj
|
|||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
if ($action == '') {
|
if ($action == '') {
|
||||||
if ($user->rights->produit->creer || $user->rights->service->creer) {
|
if ($user->rights->produit->creer || $user->rights->service->creer) {
|
||||||
print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&id=' . $object->id . '">' . $langs->trans("Add") . '</a>';
|
print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Add") . '</a>';
|
||||||
if ($cnt_trans > 0) {
|
if ($cnt_trans > 0) {
|
||||||
print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&id=' . $object->id . '">' . $langs->trans("Update") . '</a>';
|
print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Update") . '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1333,7 +1333,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Duration - Time spent
|
// Duration - Time spent
|
||||||
print '<td>';
|
print '<td class="nowraponall">';
|
||||||
$durationtouse = ($_POST['timespent_duration'] ? $_POST['timespent_duration'] : '');
|
$durationtouse = ($_POST['timespent_duration'] ? $_POST['timespent_duration'] : '');
|
||||||
if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin')) {
|
if (GETPOSTISSET('timespent_durationhour') || GETPOSTISSET('timespent_durationmin')) {
|
||||||
$durationtouse = (GETPOST('timespent_durationhour') * 3600 + GETPOST('timespent_durationmin') * 60);
|
$durationtouse = (GETPOST('timespent_durationhour') * 3600 + GETPOST('timespent_durationmin') * 60);
|
||||||
@ -1600,7 +1600,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
|
|||||||
|
|
||||||
// Time spent
|
// Time spent
|
||||||
if (!empty($arrayfields['t.task_duration']['checked'])) {
|
if (!empty($arrayfields['t.task_duration']['checked'])) {
|
||||||
print '<td class="right">';
|
print '<td class="right nowraponall">';
|
||||||
if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
|
if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
|
||||||
print '<input type="hidden" name="old_duration" value="'.$task_time->task_duration.'">';
|
print '<input type="hidden" name="old_duration" value="'.$task_time->task_duration.'">';
|
||||||
print $form->select_duration('new_duration', $task_time->task_duration, 0, 'text');
|
print $form->select_duration('new_duration', $task_time->task_duration, 0, 'text');
|
||||||
|
|||||||
@ -672,7 +672,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
// Add GroupBy from hooks
|
// Add GroupBy from hooks
|
||||||
$parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall);
|
$parameters = array('fieldstosearchall' => $fieldstosearchall);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2010-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2010-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||||
|
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -65,6 +66,22 @@ $search_town = GETPOST('search_town', 'alpha');
|
|||||||
$search_zip = GETPOST('search_zip', 'alpha');
|
$search_zip = GETPOST('search_zip', 'alpha');
|
||||||
$search_state = GETPOST("search_state");
|
$search_state = GETPOST("search_state");
|
||||||
$search_country = GETPOST("search_country", 'int');
|
$search_country = GETPOST("search_country", 'int');
|
||||||
|
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||||
|
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||||
|
$search_date_startyear = GETPOST('search_date_startyear', 'int');
|
||||||
|
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||||
|
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||||
|
$search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||||
|
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||||
|
$search_date_valid_startday = GETPOST('search_date_valid_startday', 'int');
|
||||||
|
$search_date_valid_startmonth = GETPOST('search_date_valid_startmonth', 'int');
|
||||||
|
$search_date_valid_startyear = GETPOST('search_date_valid_startyear', 'int');
|
||||||
|
$search_date_valid_endday = GETPOST('search_date_valid_endday', 'int');
|
||||||
|
$search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int');
|
||||||
|
$search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int');
|
||||||
|
$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver
|
||||||
|
$search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear);
|
||||||
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
|
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
|
||||||
$search_montant_ht = GETPOST('search_montant_ht', 'alpha');
|
$search_montant_ht = GETPOST('search_montant_ht', 'alpha');
|
||||||
$search_montant_vat = GETPOST('search_montant_vat', 'alpha');
|
$search_montant_vat = GETPOST('search_montant_vat', 'alpha');
|
||||||
@ -83,12 +100,6 @@ $search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
|||||||
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
|
||||||
|
|
||||||
$mesg = (GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
$mesg = (GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
||||||
$year = GETPOST("year");
|
|
||||||
$month = GETPOST("month");
|
|
||||||
$day = GETPOST("day");
|
|
||||||
$yearvalid = GETPOST("yearvalid");
|
|
||||||
$monthvalid = GETPOST("monthvalid");
|
|
||||||
$dayvalid = GETPOST("dayvalid");
|
|
||||||
|
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
@ -202,6 +213,8 @@ if ($reshook < 0) {
|
|||||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$search_product_category = 0;
|
||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
// Do we click on purge search criteria ?
|
// Do we click on purge search criteria ?
|
||||||
@ -227,12 +240,22 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||||||
$search_type = '';
|
$search_type = '';
|
||||||
$search_country = '';
|
$search_country = '';
|
||||||
$search_type_thirdparty = '';
|
$search_type_thirdparty = '';
|
||||||
$yearvalid = '';
|
$search_date_startday = '';
|
||||||
$monthvalid = '';
|
$search_date_startmonth = '';
|
||||||
$dayvalid = '';
|
$search_date_startyear = '';
|
||||||
$year = '';
|
$search_date_endday = '';
|
||||||
$month = '';
|
$search_date_endmonth = '';
|
||||||
$day = '';
|
$search_date_endyear = '';
|
||||||
|
$search_date_start = '';
|
||||||
|
$search_date_end = '';
|
||||||
|
$search_date_valid_startday = '';
|
||||||
|
$search_date_valid_startmonth = '';
|
||||||
|
$search_date_valid_startyear = '';
|
||||||
|
$search_date_valid_endday = '';
|
||||||
|
$search_date_valid_endmonth = '';
|
||||||
|
$search_date_valid_endyear = '';
|
||||||
|
$search_date_valid_start = '';
|
||||||
|
$search_date_valid_end = '';
|
||||||
$search_status = '';
|
$search_status = '';
|
||||||
$object_statut = '';
|
$object_statut = '';
|
||||||
}
|
}
|
||||||
@ -376,8 +399,18 @@ if ($socid) {
|
|||||||
if ($search_status >= 0 && $search_status != '') {
|
if ($search_status >= 0 && $search_status != '') {
|
||||||
$sql .= ' AND sp.fk_statut IN ('.$db->sanitize($db->escape($search_status)).')';
|
$sql .= ' AND sp.fk_statut IN ('.$db->sanitize($db->escape($search_status)).')';
|
||||||
}
|
}
|
||||||
$sql .= dolSqlDateFilter("sp.date_livraison", $day, $month, $year);
|
if ($search_date_start) {
|
||||||
$sql .= dolSqlDateFilter("sp.date_valid", $dayvalid, $monthvalid, $yearvalid);
|
$sql .= " AND sp.date_livraison >= '".$db->idate($search_date_start)."'";
|
||||||
|
}
|
||||||
|
if ($search_date_end) {
|
||||||
|
$sql .= " AND sp.date_livraison <= '".$db->idate($search_date_end)."'";
|
||||||
|
}
|
||||||
|
if ($search_date_valid_start) {
|
||||||
|
$sql .= " AND sp.date_valid >= '".$db->idate($search_date_valid_start)."'";
|
||||||
|
}
|
||||||
|
if ($search_date_valid_end) {
|
||||||
|
$sql .= " AND sp.date_valid <= '".$db->idate($search_date_valid_end)."'";
|
||||||
|
}
|
||||||
if ($search_sale > 0) {
|
if ($search_sale > 0) {
|
||||||
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale);
|
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale);
|
||||||
}
|
}
|
||||||
@ -446,11 +479,41 @@ if ($resql) {
|
|||||||
if ($sall) {
|
if ($sall) {
|
||||||
$param .= '&sall='.urlencode($sall);
|
$param .= '&sall='.urlencode($sall);
|
||||||
}
|
}
|
||||||
if ($month) {
|
if ($search_date_startday) {
|
||||||
$param .= '&month='.urlencode($month);
|
$param .= '&search_date_startday='.urlencode($search_date_startday);
|
||||||
}
|
}
|
||||||
if ($year) {
|
if ($search_date_startmonth) {
|
||||||
$param .= '&year='.urlencode($year);
|
$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_startyear) {
|
||||||
|
$param .= '&search_date_startyear='.urlencode($search_date_startyear);
|
||||||
|
}
|
||||||
|
if ($search_date_endday) {
|
||||||
|
$param .= '&search_date_endday='.urlencode($search_date_endday);
|
||||||
|
}
|
||||||
|
if ($search_date_endmonth) {
|
||||||
|
$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_endyear) {
|
||||||
|
$param .= '&search_date_endyear='.urlencode($search_date_endyear);
|
||||||
|
}
|
||||||
|
if ($search_date_valid_startday) {
|
||||||
|
$param .= '&search_date_valid_startday='.urlencode($search_date_valid_startday);
|
||||||
|
}
|
||||||
|
if ($search_date_valid_startmonth) {
|
||||||
|
$param .= '&search_date_valid_startmonth='.urlencode($search_date_valid_startmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_valid_startyear) {
|
||||||
|
$param .= '&search_date_valid_startyear='.urlencode($search_date_valid_startyear);
|
||||||
|
}
|
||||||
|
if ($search_date_valid_endday) {
|
||||||
|
$param .= '&search_date_valid_endday='.urlencode($search_date_valid_endday);
|
||||||
|
}
|
||||||
|
if ($search_date_valid_endmonth) {
|
||||||
|
$param .= '&search_date_valid_endmonth='.urlencode($search_date_valid_endmonth);
|
||||||
|
}
|
||||||
|
if ($search_date_valid_endyear) {
|
||||||
|
$param .= '&search_date_valid_endyear='.urlencode($search_date_valid_endyear);
|
||||||
}
|
}
|
||||||
if ($search_ref) {
|
if ($search_ref) {
|
||||||
$param .= '&search_ref='.urlencode($search_ref);
|
$param .= '&search_ref='.urlencode($search_ref);
|
||||||
@ -641,21 +704,23 @@ if ($resql) {
|
|||||||
// Date
|
// Date
|
||||||
if (!empty($arrayfields['sp.date_valid']['checked'])) {
|
if (!empty($arrayfields['sp.date_valid']['checked'])) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
//print $langs->trans('Month').': ';
|
print '<div class="nowrap">';
|
||||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="monthvalid" value="'.dol_escape_htmltag($monthvalid).'">';
|
print $form->selectDate($search_date_valid_start ? $search_date_valid_start : -1, 'search_date_valid_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
//print ' '.$langs->trans('Year').': ';
|
print '</div>';
|
||||||
$syearvalid = $yearvalid;
|
print '<div class="nowrap">';
|
||||||
$formother->select_year($syearvalid, 'yearvalid', 1, 20, 5);
|
print $form->selectDate($search_date_valid_end ? $search_date_valid_end : -1, 'search_date_valid_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Date
|
// Date
|
||||||
if (!empty($arrayfields['sp.date_livraison']['checked'])) {
|
if (!empty($arrayfields['sp.date_livraison']['checked'])) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
//print $langs->trans('Month').': ';
|
print '<div class="nowrap">';
|
||||||
print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).'">';
|
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
//print ' '.$langs->trans('Year').': ';
|
print '</div>';
|
||||||
$syear = $year;
|
print '<div class="nowrap">';
|
||||||
$formother->select_year($syear, 'year', 1, 20, 5);
|
print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/theme/eldy/style.css.php
|
* \file htdocs/takepos/css/pos.css.php
|
||||||
* \brief File for CSS style sheet Eldy
|
* \brief File for CSS style for TakePOS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
|
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
|
||||||
|
|||||||
@ -1387,6 +1387,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
.width400 { width: 400px; }
|
.width400 { width: 400px; }
|
||||||
.width500 { width: 500px; }
|
.width500 { width: 500px; }
|
||||||
.maxwidth25 { max-width: 25px; }
|
.maxwidth25 { max-width: 25px; }
|
||||||
|
.maxwidth40 { max-width: 40px; }
|
||||||
.maxwidth50 { max-width: 50px; }
|
.maxwidth50 { max-width: 50px; }
|
||||||
.maxwidth75 { max-width: 75px; }
|
.maxwidth75 { max-width: 75px; }
|
||||||
.maxwidthdate { max-width: 80px; }
|
.maxwidthdate { max-width: 80px; }
|
||||||
|
|||||||
@ -1427,6 +1427,7 @@ table[summary="list_of_modules"] .fa-cog {
|
|||||||
.width400 { width: 400px; }
|
.width400 { width: 400px; }
|
||||||
.width500 { width: 500px; }
|
.width500 { width: 500px; }
|
||||||
.maxwidth25 { max-width: 25px; }
|
.maxwidth25 { max-width: 25px; }
|
||||||
|
.maxwidth40 { max-width: 40px; }
|
||||||
.maxwidth50 { max-width: 50px; }
|
.maxwidth50 { max-width: 50px; }
|
||||||
.maxwidth75 { max-width: 75px; }
|
.maxwidth75 { max-width: 75px; }
|
||||||
.maxwidth100 { max-width: 100px; }
|
.maxwidth100 { max-width: 100px; }
|
||||||
|
|||||||
@ -97,7 +97,7 @@ if (empty($reshook)) {
|
|||||||
if ($edituser->pass_temp && dol_verifyHash($edituser->pass_temp.'-'.$edituser->id.'-'.$dolibarr_main_instance_unique_id, $passworduidhash)) {
|
if ($edituser->pass_temp && dol_verifyHash($edituser->pass_temp.'-'.$edituser->id.'-'.$dolibarr_main_instance_unique_id, $passworduidhash)) {
|
||||||
// Clear session
|
// Clear session
|
||||||
unset($_SESSION['dol_login']);
|
unset($_SESSION['dol_login']);
|
||||||
$_SESSION['dol_loginmesg'] = $langs->trans('NewPasswordValidated'); // Save message for the session page
|
$_SESSION['dol_loginmesg'] = $langs->transnoentitiesnoconv('NewPasswordValidated'); // Save message for the session page
|
||||||
|
|
||||||
$newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0);
|
$newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0);
|
||||||
dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database");
|
dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user