Merge pull request #15828 from hregis/fix_php_8.0
FIX avoid warning with php 8.0
This commit is contained in:
commit
209ff84a18
@ -114,57 +114,57 @@ print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans(
|
|||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||||
print '<input name="nom" id="name" class="minwidth200" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_NAME ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : GETPOST("nom", 'nohtml')).'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
|
print '<input name="nom" id="name" class="minwidth200" value="'.(GETPOSTISSET('nom') ? GETPOST('nom', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_NAME) ? $conf->global->MAIN_INFO_ACCOUNTANT_NAME : '')).'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="address">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : GETPOST("address", 'nohtml')).'</textarea></td></tr>'."\n";
|
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_3.'">'.(GETPOSTISSET('address') ? GETPOST('address', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS) ? $conf->global->MAIN_INFO_ACCOUNTANT_ADDRESS : '')).'</textarea></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="zipcode">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||||
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_ZIP ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : GETPOST("zipcode", 'alpha')).'"></td></tr>'."\n";
|
print '<input class="minwidth100" name="zipcode" id="zipcode" value="'.(GETPOSTISSET('zipcode') ? GETPOST('zipcode', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_ZIP) ? $conf->global->MAIN_INFO_ACCOUNTANT_ZIP : '')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="town">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||||
print '<input name="town" class="minwidth100" id="town" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_TOWN ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : GETPOST("town", 'nohtml')).'"></td></tr>'."\n";
|
print '<input name="town" class="minwidth100" id="town" value="'.(GETPOSTISSET('town') ? GETPOST('town', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_TOWN) ? $conf->global->MAIN_INFO_ACCOUNTANT_TOWN : '')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
print '<tr class="oddeven"><td><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
||||||
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
|
||||||
print $form->select_country($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'country_id');
|
print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
|
||||||
$formcompany->select_departement($conf->global->MAIN_INFO_ACCOUNTANT_STATE, $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY, 'state_id');
|
$formcompany->select_departement((GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id');
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||||
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="tel" id="phone" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_PHONE.'"></td></tr>';
|
print '<input name="tel" id="phone" value="'.(GETPOSTISSET('tel') ? GETPOST('tel', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_PHONE) ? $conf->global->MAIN_INFO_ACCOUNTANT_PHONE : '')).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||||
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="fax" id="fax" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_FAX.'"></td></tr>';
|
print '<input name="fax" id="fax" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_FAX) ? $conf->global->MAIN_INFO_ACCOUNTANT_FAX : '')).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||||
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="mail" id="email" class="minwidth200" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_MAIL.'"></td></tr>';
|
print '<input name="mail" id="email" class="minwidth200" value="'.(GETPOSTISSET('mail') ? GETPOST('mail', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_MAIL) ? $conf->global->MAIN_INFO_ACCOUNTANT_MAIL : '')).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||||
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="web" id="web" class="minwidth300" value="'.$conf->global->MAIN_INFO_ACCOUNTANT_WEB.'"></td></tr>';
|
print '<input name="web" id="web" class="minwidth300" value="'.(GETPOSTISSET('web') ? GETPOST('web', 'alpha') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_WEB) ? $conf->global->MAIN_INFO_ACCOUNTANT_WEB : '')).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Code
|
// Code
|
||||||
print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="code">'.$langs->trans("AccountantFileNumber").'</label></td><td>';
|
||||||
print '<input name="code" id="code" class="minwidth100" value="'.($conf->global->MAIN_INFO_ACCOUNTANT_CODE ? $conf->global->MAIN_INFO_ACCOUNTANT_CODE : GETPOST("code", 'nohtml')).'"></td></tr>'."\n";
|
print '<input name="code" id="code" class="minwidth100" value="'.(GETPOSTISSET('code') ? GETPOST('code', 'nohtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_CODE) ? $conf->global->MAIN_INFO_ACCOUNTANT_CODE : '')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOSTISSET('note') ? GETPOST('note', 'restricthtml') : $conf->global->MAIN_INFO_ACCOUNTANT_NOTE).'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOSTISSET('note') ? GETPOST('note', 'restricthtml') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_NOTE) ? $conf->global->MAIN_INFO_ACCOUNTANT_NOTE : '')).'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -446,14 +446,14 @@ print '<td>';
|
|||||||
print $langs->trans("MaxNbOfLinesForBoxes");
|
print $langs->trans("MaxNbOfLinesForBoxes");
|
||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" class="flat" size="6" name="MAIN_BOXES_MAXLINES" value="'.$conf->global->MAIN_BOXES_MAXLINES.'">';
|
print '<input type="text" class="flat" size="6" name="MAIN_BOXES_MAXLINES" value="'.(!empty($conf->global->MAIN_BOXES_MAXLINES) ? $conf->global->MAIN_BOXES_MAXLINES : '').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Activate FileCache - Developement
|
// Activate FileCache - Developement
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||||
print '<tr class="oddeven"><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>';
|
print '<tr class="oddeven"><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>';
|
||||||
print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', $conf->global->MAIN_ACTIVATE_FILECACHE, 1);
|
print $form->selectyesno('MAIN_ACTIVATE_FILECACHE', (!empty($conf->global->MAIN_ACTIVATE_FILECACHE) ? $conf->global->MAIN_ACTIVATE_FILECACHE : 0), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -393,18 +393,18 @@ print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans(
|
|||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
print '<tr class="oddeven"><td class="fieldrequired wordbreak"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
|
||||||
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM ? $conf->global->MAIN_INFO_SOCIETE_NOM : GETPOST("nom", 'nohtml')).'"'.(empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? ' autofocus="autofocus"' : '').'></td></tr>'."\n";
|
print '<input name="nom" id="name" class="minwidth200" value="'.dol_escape_htmltag((GETPOSTISSET('nom') ? GETPOST('nom', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? $conf->global->MAIN_INFO_SOCIETE_NOM : '')).'"'.(empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? ' autofocus="autofocus"' : '')).'></td></tr>'."\n";
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans("CompanyAddress").'</label></td><td>';
|
||||||
print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.'">'.($conf->global->MAIN_INFO_SOCIETE_ADDRESS ? $conf->global->MAIN_INFO_SOCIETE_ADDRESS : GETPOST("MAIN_INFO_SOCIETE_ADDRESS", 'nohtml')).'</textarea></td></tr>'."\n";
|
print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.'">'.(GETPOSTISSET('MAIN_INFO_SOCIETE_ADDRESS') ? GETPOST('MAIN_INFO_SOCIETE_ADDRESS', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS) ? $conf->global->MAIN_INFO_SOCIETE_ADDRESS : '')).'</textarea></td></tr>'."\n";
|
||||||
|
|
||||||
// Zip
|
// Zip
|
||||||
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans("CompanyZip").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans("CompanyZip").'</label></td><td>';
|
||||||
print '<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP ? $conf->global->MAIN_INFO_SOCIETE_ZIP : GETPOST("MAIN_INFO_SOCIETE_ZIP", 'alpha')).'"></td></tr>'."\n";
|
print '<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_ZIP') ? GETPOST('MAIN_INFO_SOCIETE_ZIP', 'alpha') : (!empty($conf->global->MAIN_INFO_SOCIETE_ZIP) ? $conf->global->MAIN_INFO_SOCIETE_ZIP : ''))).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans("CompanyTown").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans("CompanyTown").'</label></td><td>';
|
||||||
print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN ? $conf->global->MAIN_INFO_SOCIETE_TOWN : GETPOST("MAIN_INFO_SOCIETE_TOWN", 'nohtml')).'"></td></tr>'."\n";
|
print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_TOWN') ? GETPOST('MAIN_INFO_SOCIETE_TOWN', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_TOWN) ? $conf->global->MAIN_INFO_SOCIETE_TOWN : ''))).'"></td></tr>'."\n";
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
|
||||||
@ -431,25 +431,25 @@ print '</td></tr>'."\n";
|
|||||||
// Phone
|
// Phone
|
||||||
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
|
||||||
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="tel" id="phone" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL).'"></td></tr>';
|
print '<input name="tel" id="phone" value="'.dol_escape_htmltag((GETPOSTISSET('tel') ? GETPOST('tel', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_TEL) ? $conf->global->MAIN_INFO_SOCIETE_TEL : ''))).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Fax
|
// Fax
|
||||||
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
|
||||||
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="fax" id="fax" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_FAX).'"></td></tr>';
|
print '<input name="fax" id="fax" value="'.dol_escape_htmltag((GETPOSTISSET('fax') ? GETPOST('fax', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_FAX) ? $conf->global->MAIN_INFO_SOCIETE_FAX : ''))).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Email
|
// Email
|
||||||
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
|
||||||
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="mail" id="email" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL).'"></td></tr>';
|
print '<input name="mail" id="email" class="minwidth200" value="'.dol_escape_htmltag((GETPOSTISSET('mail') ? GETPOST('mail', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_MAIL) ? $conf->global->MAIN_INFO_SOCIETE_MAIL : ''))).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Web
|
// Web
|
||||||
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
|
||||||
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
|
print img_picto('', 'globe', '', false, 0, 0, '', 'paddingright');
|
||||||
print '<input name="web" id="web" class="minwidth300" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB).'"></td></tr>';
|
print '<input name="web" id="web" class="minwidth300" value="'.dol_escape_htmltag((GETPOSTISSET('web') ? GETPOST('web', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_WEB) ? $conf->global->MAIN_INFO_SOCIETE_WEB : ''))).'"></td></tr>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
@ -457,7 +457,7 @@ if (!empty($conf->barcode->enabled)) {
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print '<label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
print '<label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
|
||||||
print '<span class="fa paddingright fa-barcode"></span>';
|
print '<span class="fa paddingright fa-barcode"></span>';
|
||||||
print '<input name="barcode" id="barcode" class="minwidth150" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_GENCOD).'"></td></tr>';
|
print '<input name="barcode" id="barcode" class="minwidth150" value="'.dol_escape_htmltag((GETPOSTISSET('barcode') ? GETPOST('barcode', 'alphanohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_GENCODE) ? $conf->global->MAIN_INFO_SOCIETE_GENCODE : ''))).'"></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ print '</td></tr>';
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
|
||||||
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOSTISSET('note') ? GETPOST('note', 'restricthtml') : $conf->global->MAIN_INFO_SOCIETE_NOTE).'</textarea></td></tr>';
|
print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOSTISSET('note') ? GETPOST('note', 'restricthtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '')).'</textarea></td></tr>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -549,17 +549,17 @@ $langs->load("companies");
|
|||||||
|
|
||||||
// Managing Director(s)
|
// Managing Director(s)
|
||||||
print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
||||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MANAGERS).'"></td></tr>';
|
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth200" value="'.dol_escape_htmltag((GETPOSTISSET('MAIN_INFO_SOCIETE_MANAGERS') ? GETPOST('MAIN_INFO_SOCIETE_MANAGERS', 'nohtml') : (!empty($conf->global->MAIN_INFO_SOCIETE_MANAGERS) ? $conf->global->MAIN_INFO_SOCIETE_MANAGERS : ''))).'"></td></tr>';
|
||||||
|
|
||||||
// GDPR contact
|
// GDPR contact
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
|
print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth500" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_GDPR).'"></td></tr>';
|
print '<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth500" value="'.dol_escape_htmltag((GETPOSTISSET("MAIN_INFO_GDPR") ? GETPOST("MAIN_INFO_GDPR", 'nohtml') : (!empty($conf->global->MAIN_INFO_GDPR) ? $conf->global->MAIN_INFO_GDPR : ''))).'"></td></tr>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||||
print '<input name="capital" id="capital" class="maxwidth100" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_CAPITAL).'"></td></tr>';
|
print '<input name="capital" id="capital" class="maxwidth100" value="'.dol_escape_htmltag((GETPOSTISSET('capital') ? GETPOST('capital', 'nohtml') : (!empty($conf->global->MAIN_INFO_CAPITAL) ? $conf->global->MAIN_INFO_CAPITAL : ''))).'"></td></tr>';
|
||||||
|
|
||||||
// Juridical Status
|
// Juridical Status
|
||||||
print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||||
|
|||||||
@ -117,11 +117,11 @@ foreach ($listofnetworks as $key => $value) {
|
|||||||
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($key).'_URL';
|
$networkconstname = 'MAIN_INFO_SOCIETE_'.strtoupper($key).'_URL';
|
||||||
$networkconstid = 'MAIN_INFO_SOCIETE_'.strtoupper($key);
|
$networkconstid = 'MAIN_INFO_SOCIETE_'.strtoupper($key);
|
||||||
print '<td><span class="fa paddingright '.($value['icon'] ? $value['icon'] : 'fa-link').'"></span>';
|
print '<td><span class="fa paddingright '.($value['icon'] ? $value['icon'] : 'fa-link').'"></span>';
|
||||||
print '<input name="'.$key.'url" id="'.$key.'url" class="minwidth300" value="'.dol_escape_htmltag($conf->global->$networkconstname).'">';
|
print '<input name="'.$key.'url" id="'.$key.'url" class="minwidth300" value="'.(!empty($conf->global->$networkconstname) ? dol_escape_htmltag($conf->global->$networkconstname) : '').'">';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="'.$key.'" id="'.$key.'" class="minwidth300" value="'.dol_escape_htmltag($conf->global->$networkconstid).'">';
|
print '<input name="'.$key.'" id="'.$key.'" class="minwidth300" value="'.(!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : '').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.dol_print_socialnetworks($conf->global->$networkconstid, 0, 0, $key, $listofnetworks).'</td>';
|
print '<td>'.dol_print_socialnetworks((!empty($conf->global->$networkconstid) ? dol_escape_htmltag($conf->global->$networkconstid) : ''), 0, 0, $key, $listofnetworks).'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,9 +72,9 @@ $hookmanager->initHooks(array('admindefaultvalues', 'globaladmin'));
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
|
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
|
||||||
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
|
if (!GETPOST('confirmmassaction', 'alpha') && !empty($massaction) && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
|
||||||
|
|
||||||
$parameters = array('socid'=>$socid);
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ llxHeader('', $langs->trans("Setup"), $wikihelp);
|
|||||||
|
|
||||||
$param = '&mode='.$mode;
|
$param = '&mode='.$mode;
|
||||||
|
|
||||||
$enabledisablehtml .= $langs->trans("EnableDefaultValues").' ';
|
$enabledisablehtml = $langs->trans("EnableDefaultValues").' ';
|
||||||
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
|
if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
|
||||||
{
|
{
|
||||||
// Button off, click to enable
|
// Button off, click to enable
|
||||||
@ -213,7 +213,7 @@ if ($defaultkey) $param .= '&defaultkey='.urlencode($defaultkey);
|
|||||||
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
|
if ($defaultvalue) $param .= '&defaultvalue='.urlencode($defaultvalue);
|
||||||
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug) ? '?debug=1' : '').'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && !empty($debug)) ? '?debug=1' : '').'" method="POST">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
|||||||
@ -163,7 +163,7 @@ if ($action == 'edit')
|
|||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
||||||
print '</td><td><input class="flat" name="'.$mainroundingruletot.'" size="3" value="'.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : $conf->global->MAIN_ROUNDING_RULE_TOT).'"></td></tr>';
|
print '</td><td><input class="flat" name="'.$mainroundingruletot.'" size="3" value="'.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : (!empty($conf->global->MAIN_ROUNDING_RULE_TOT) ? $conf->global->MAIN_ROUNDING_RULE_TOT : '')).'"></td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ if ($action == 'edit')
|
|||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"), $langs->trans("ParameterActiveForNextInputOnly"));
|
||||||
print '</td><td align="right">'.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : $conf->global->MAIN_ROUNDING_RULE_TOT).'</td></tr>';
|
print '</td><td align="right">'.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : (!empty($conf->global->MAIN_ROUNDING_RULE_TOT) ? $conf->global->MAIN_ROUNDING_RULE_TOT : '')).'</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -290,6 +290,11 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
// Id
|
// Id
|
||||||
$parent_rowid = GETPOST('menuId', 'int');
|
$parent_rowid = GETPOST('menuId', 'int');
|
||||||
|
$parent_mainmenu = '';
|
||||||
|
$parent_leftmenu = '';
|
||||||
|
$parent_langs = '';
|
||||||
|
$parent_level = '';
|
||||||
|
|
||||||
if (GETPOST('menuId', 'int')) {
|
if (GETPOST('menuId', 'int')) {
|
||||||
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int');
|
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int');
|
||||||
$res = $db->query($sql);
|
$res = $db->query($sql);
|
||||||
@ -328,8 +333,8 @@ if ($action == 'create') {
|
|||||||
} else {
|
} else {
|
||||||
print '<select name="type" class="flat" id="topleft">';
|
print '<select name="type" class="flat" id="topleft">';
|
||||||
print '<option value=""> </option>';
|
print '<option value=""> </option>';
|
||||||
print '<option value="top"'.($_POST["type"] && $_POST["type"] == 'top' ? ' selected' : '').'>'.$langs->trans('Top').'</option>';
|
print '<option value="top"'.(!empty($_POST["type"]) && $_POST["type"] == 'top' ? ' selected' : '').'>'.$langs->trans('Top').'</option>';
|
||||||
print '<option value="left"'.($_POST["type"] && $_POST["type"] == 'left' ? ' selected' : '').'>'.$langs->trans('Left').'</option>';
|
print '<option value="left"'.(!empty($_POST["type"]) && $_POST["type"] == 'left' ? ' selected' : '').'>'.$langs->trans('Left').'</option>';
|
||||||
print '</select>';
|
print '</select>';
|
||||||
}
|
}
|
||||||
print '</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
print '</td><td>'.$langs->trans('DetailType').'</td></tr>';
|
||||||
@ -370,8 +375,8 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
// Target
|
// Target
|
||||||
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
print '<tr><td>'.$langs->trans('Target').'</td><td><select class="flat" name="target">';
|
||||||
print '<option value=""'.($menu->target == "" ? ' selected' : '').'> </option>';
|
print '<option value=""'.(isset($menu->target) && $menu->target == "" ? ' selected' : '').'> </option>';
|
||||||
print '<option value="_blank"'.($menu->target == "_blank" ? ' selected' : '').'>'.$langs->trans('_blank').'</option>';
|
print '<option value="_blank"'.(isset($menu->target) && $menu->target == "_blank" ? ' selected' : '').'>'.$langs->trans('_blank').'</option>';
|
||||||
print '</select></td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
print '</select></td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
|
||||||
|
|
||||||
// Enabled
|
// Enabled
|
||||||
|
|||||||
@ -367,7 +367,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
$remainingdata = array();
|
$remainingdata = array();
|
||||||
foreach ($data as $datar)
|
foreach ($data as $datar)
|
||||||
{
|
{
|
||||||
if (empty($datar['rowid']) || $tree_recur_alreadyadded[$datar['rowid']]) continue;
|
if (empty($datar['rowid']) || !empty($tree_recur_alreadyadded[$datar['rowid']])) continue;
|
||||||
$remainingdata[] = $datar;
|
$remainingdata[] = $datar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -495,13 +495,19 @@ if ($mode == 'common' || $mode == 'commonkanban') {
|
|||||||
dol_set_focus('#search_keyword');
|
dol_set_focus('#search_keyword');
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') {
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
if (isset($optioncss) && $optioncss != '') {
|
||||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
}
|
}
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
if (isset($sortfield) && $sortfield != '') {
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
}
|
||||||
|
if (isset($sortorder) && $sortorder != '') {
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
}
|
||||||
|
if (isset($page) && $page != '') {
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
}
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
print dol_get_fiche_head($head, 'modules', '', -1);
|
print dol_get_fiche_head($head, 'modules', '', -1);
|
||||||
@ -999,7 +1005,7 @@ if ($mode == 'marketplace') {
|
|||||||
<div id="listing-content">
|
<div id="listing-content">
|
||||||
<table summary="list_of_modules" id="list_of_modules" class="productlist centpercent">
|
<table summary="list_of_modules" id="list_of_modules" class="productlist centpercent">
|
||||||
<tbody id="listOfModules">
|
<tbody id="listOfModules">
|
||||||
<?php echo $dolistore->get_products($categorie); ?>
|
<?php echo $dolistore->get_products(!empty($categorie) ? $categorie: ''); ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -1080,28 +1086,36 @@ if ($mode == 'deploy') {
|
|||||||
$max = $conf->global->MAIN_UPLOAD_DOC; // In Kb
|
$max = $conf->global->MAIN_UPLOAD_DOC; // In Kb
|
||||||
$maxphp = @ini_get('upload_max_filesize'); // In unknown
|
$maxphp = @ini_get('upload_max_filesize'); // In unknown
|
||||||
if (preg_match('/k$/i', $maxphp)) {
|
if (preg_match('/k$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/k$/i', '', $maxphp);
|
||||||
$maxphp = $maxphp * 1;
|
$maxphp = $maxphp * 1;
|
||||||
}
|
}
|
||||||
if (preg_match('/m$/i', $maxphp)) {
|
if (preg_match('/m$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/m$/i', '', $maxphp);
|
||||||
$maxphp = $maxphp * 1024;
|
$maxphp = $maxphp * 1024;
|
||||||
}
|
}
|
||||||
if (preg_match('/g$/i', $maxphp)) {
|
if (preg_match('/g$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/g$/i', '', $maxphp);
|
||||||
$maxphp = $maxphp * 1024 * 1024;
|
$maxphp = $maxphp * 1024 * 1024;
|
||||||
}
|
}
|
||||||
if (preg_match('/t$/i', $maxphp)) {
|
if (preg_match('/t$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/t$/i', '', $maxphp);
|
||||||
$maxphp = $maxphp * 1024 * 1024 * 1024;
|
$maxphp = $maxphp * 1024 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
$maxphp2 = @ini_get('post_max_size'); // In unknown
|
$maxphp2 = @ini_get('post_max_size'); // In unknown
|
||||||
if (preg_match('/k$/i', $maxphp2)) {
|
if (preg_match('/k$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/k$/i', '', $maxphp2);
|
||||||
$maxphp2 = $maxphp2 * 1;
|
$maxphp2 = $maxphp2 * 1;
|
||||||
}
|
}
|
||||||
if (preg_match('/m$/i', $maxphp2)) {
|
if (preg_match('/m$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/m$/i', '', $maxphp2);
|
||||||
$maxphp2 = $maxphp2 * 1024;
|
$maxphp2 = $maxphp2 * 1024;
|
||||||
}
|
}
|
||||||
if (preg_match('/g$/i', $maxphp2)) {
|
if (preg_match('/g$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/g$/i', '', $maxphp2);
|
||||||
$maxphp2 = $maxphp2 * 1024 * 1024;
|
$maxphp2 = $maxphp2 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
if (preg_match('/t$/i', $maxphp2)) {
|
if (preg_match('/t$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/t$/i', '', $maxphp2);
|
||||||
$maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
|
$maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
// Now $max and $maxphp and $maxphp2 are in Kb
|
// Now $max and $maxphp and $maxphp2 are in Kb
|
||||||
|
|||||||
@ -95,37 +95,37 @@ if (empty($action) || $action == 'edit' || $action == 'updateedit')
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Monday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Monday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="monday" id="monday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_MONDAY : GETPOST("monday", 'alpha')).'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
|
print '<input name="monday" id="monday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_MONDAY : GETPOST("monday", 'alpha')).'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' autofocus="autofocus"').'></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Tuesday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Tuesday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="tuesday" id="tuesday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY : GETPOST("tuesday", 'alpha')).'"></td></tr>'."\n";
|
print '<input name="tuesday" id="tuesday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY : GETPOST("tuesday", 'alpha')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Wednesday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Wednesday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="wednesday" id="wednesday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY : GETPOST("wednesday", 'alpha')).'"></td></tr>'."\n";
|
print '<input name="wednesday" id="wednesday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY : GETPOST("wednesday", 'alpha')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Thursday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Thursday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="thursday" id="thursday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY : GETPOST("thursday", 'alpha')).'"></td></tr>'."\n";
|
print '<input name="thursday" id="thursday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY : GETPOST("thursday", 'alpha')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Friday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Friday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="friday" id="friday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY : GETPOST("friday", 'alpha')).'"></td></tr>'."\n";
|
print '<input name="friday" id="friday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY : GETPOST("friday", 'alpha')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Saturday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Saturday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="saturday" id="saturday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY : GETPOST("saturday", 'alpha')).'"></td></tr>'."\n";
|
print '<input name="saturday" id="saturday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY : GETPOST("saturday", 'alpha')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("Sunday"), $langs->trans("OpeningHoursFormatDesc"));
|
print $form->textwithpicto($langs->trans("Sunday"), $langs->trans("OpeningHoursFormatDesc"));
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<input name="sunday" id="sunday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY : GETPOST("sunday", 'alpha')).'"></td></tr>'."\n";
|
print '<input name="sunday" id="sunday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY : GETPOST("sunday", 'alpha')).'"></td></tr>'."\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -161,7 +161,7 @@ print '<div class="div-table-responsive-no-min">';
|
|||||||
print '<table summary="more" class="noborder centpercent">';
|
print '<table summary="more" class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td width="200px">'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
$selected = $conf->global->MAIN_PDF_FORMAT;
|
$selected = (isset($conf->global->MAIN_PDF_FORMAT) ? $conf->global->MAIN_PDF_FORMAT : '');
|
||||||
if (empty($selected)) $selected = dol_getDefaultFormat();
|
if (empty($selected)) $selected = dol_getDefaultFormat();
|
||||||
|
|
||||||
// Show pdf format
|
// Show pdf format
|
||||||
@ -320,13 +320,13 @@ print '</td></tr>';
|
|||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowDetailsInPDFPageFoot").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("ShowDetailsInPDFPageFoot").'</td><td>';
|
||||||
print $form->selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS);
|
print $form->selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS : 0));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").'</td><td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").'</td><td>';
|
||||||
//if (! empty($conf->global->MAIN_MULTILANGS))
|
//if (! empty($conf->global->MAIN_MULTILANGS))
|
||||||
//{
|
//{
|
||||||
print $formadmin->select_language(GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : $conf->global->PDF_USE_ALSO_LANGUAGE_CODE, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);
|
print $formadmin->select_language(GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0), 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1);
|
||||||
//} else {
|
//} else {
|
||||||
// print '<span class="opacitymedium">'.$langs->trans("MultiLangNotEnabled").'</span>';
|
// print '<span class="opacitymedium">'.$langs->trans("MultiLangNotEnabled").'</span>';
|
||||||
//}
|
//}
|
||||||
|
|||||||
@ -166,7 +166,7 @@ if ($result)
|
|||||||
if (is_object($modules[$obj->module]) && ($modules[$obj->module]->module_position > 0))
|
if (is_object($modules[$obj->module]) && ($modules[$obj->module]->module_position > 0))
|
||||||
{
|
{
|
||||||
// TODO Define familyposition
|
// TODO Define familyposition
|
||||||
$family = $modules[$obj->module]->family_position;
|
$family = (!empty($modules[$obj->module]->family_position) ? $modules[$obj->module]->family_position : '');
|
||||||
$familyposition = 0;
|
$familyposition = 0;
|
||||||
$sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".$modules[$obj->module]->module_position.",";
|
$sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".$modules[$obj->module]->module_position.",";
|
||||||
$sqlupdate .= " family_position = ".$familyposition;
|
$sqlupdate .= " family_position = ".$familyposition;
|
||||||
@ -214,7 +214,7 @@ if ($result)
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$perm_libelle = ($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $obj->label));
|
$perm_libelle = (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ($langs->trans("PermissionAdvanced".$obj->id) != ("PermissionAdvanced".$obj->id)) ? $langs->trans("PermissionAdvanced".$obj->id) : (($langs->trans("Permission".$obj->id) != ("Permission".$obj->id)) ? $langs->trans("Permission".$obj->id) : $obj->label));
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ print '<tr class="oddeven">';
|
|||||||
print '<td>'.$langs->trans("MAIN_PROXY_USE").'</td><td class="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_USE").'</td><td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print $form->selectyesno('MAIN_PROXY_USE', $conf->global->MAIN_PROXY_USE, 1);
|
print $form->selectyesno('MAIN_PROXY_USE', (!empty($conf->global->MAIN_PROXY_USE) ? $conf->global->MAIN_PROXY_USE : 0), 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ print '<tr class="oddeven">';
|
|||||||
print '<td>'.$langs->trans("MAIN_PROXY_HOST").'</td><td class="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_HOST").'</td><td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_PROXY_HOST" type="text" size="16" value="'.$conf->global->MAIN_PROXY_HOST.'">';
|
print '<input class="flat" name="MAIN_PROXY_HOST" type="text" size="16" value="'.(!empty($conf->global->MAIN_PROXY_HOST) ? $conf->global->MAIN_PROXY_HOST : '').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ print '<tr class="oddeven">';
|
|||||||
print '<td>'.$langs->trans("MAIN_PROXY_PORT").'</td><td class="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_PORT").'</td><td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_PROXY_PORT" type="text" size="4" value="'.$conf->global->MAIN_PROXY_PORT.'">';
|
print '<input class="flat" name="MAIN_PROXY_PORT" type="text" size="4" value="'.(!empty($conf->global->MAIN_PROXY_PORT) ? $conf->global->MAIN_PROXY_PORT : '').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ print '<tr class="oddeven">';
|
|||||||
print '<td>'.$langs->trans("MAIN_PROXY_USER").'</td><td class="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_USER").'</td><td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_PROXY_USER" type="text" size="16" value="'.$conf->global->MAIN_PROXY_USER.'">';
|
print '<input class="flat" name="MAIN_PROXY_USER" type="text" size="16" value="'.(!empty($conf->global->MAIN_PROXY_USER) ? $conf->global->MAIN_PROXY_USER : '').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ print '<tr class="oddeven">';
|
|||||||
print '<td>'.$langs->trans("MAIN_PROXY_PASS").'</td><td class="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_PASS").'</td><td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print '<input class="flat" name="MAIN_PROXY_PASS" type="text" size="16" value="'.$conf->global->MAIN_PROXY_PASS.'">';
|
print '<input class="flat" name="MAIN_PROXY_PASS" type="text" size="16" value="'.(!empty($conf->global->MAIN_PROXY_PASS) ? $conf->global->MAIN_PROXY_PASS : '').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -241,8 +241,8 @@ print '</tr>';
|
|||||||
foreach ($arrayhandler as $key => $module)
|
foreach ($arrayhandler as $key => $module)
|
||||||
{
|
{
|
||||||
// Show modules according to features level
|
// Show modules according to features level
|
||||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
if (!empty($module->version) && $module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
if (!empty($module->version) && $module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||||
|
|
||||||
if ($module->isEnabled())
|
if ($module->isEnabled())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -116,7 +116,7 @@ print '</tr>';
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="2">'.$langs->trans("MaxSizeForUploadedFiles").'.';
|
print '<td colspan="2">'.$langs->trans("MaxSizeForUploadedFiles").'.';
|
||||||
$max = @ini_get('upload_max_filesize');
|
$max = @ini_get('upload_max_filesize');
|
||||||
if ($max) print ' '.$langs->trans("MustBeLowerThanPHPLimit", $max * 1024, $langs->trans("Kb")).'.';
|
if (isset($max)) print ' '.$langs->trans("MustBeLowerThanPHPLimit", ((int) $max) * 1024, $langs->trans("Kb")).'.';
|
||||||
else print ' '.$langs->trans("NoMaxSizeByPHPLimit").'.';
|
else print ' '.$langs->trans("NoMaxSizeByPHPLimit").'.';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|||||||
@ -51,15 +51,39 @@ if (isset($title))
|
|||||||
|
|
||||||
// Check PHP setup is OK
|
// Check PHP setup is OK
|
||||||
$maxphp = @ini_get('upload_max_filesize'); // In unknown
|
$maxphp = @ini_get('upload_max_filesize'); // In unknown
|
||||||
if (preg_match('/k$/i', $maxphp)) $maxphp = $maxphp * 1;
|
if (preg_match('/k$/i', $maxphp)) {
|
||||||
if (preg_match('/m$/i', $maxphp)) $maxphp = $maxphp * 1024;
|
$maxphp = preg_replace('/k$/i', '', $maxphp);
|
||||||
if (preg_match('/g$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024;
|
$maxphp = $maxphp * 1;
|
||||||
if (preg_match('/t$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024 * 1024;
|
}
|
||||||
|
if (preg_match('/m$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/m$/i', '', $maxphp);
|
||||||
|
$maxphp = $maxphp * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/g$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/g$/i', '', $maxphp);
|
||||||
|
$maxphp = $maxphp * 1024 * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/t$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/t$/i', '', $maxphp);
|
||||||
|
$maxphp = $maxphp * 1024 * 1024 * 1024;
|
||||||
|
}
|
||||||
$maxphp2 = @ini_get('post_max_size'); // In unknown
|
$maxphp2 = @ini_get('post_max_size'); // In unknown
|
||||||
if (preg_match('/k$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1;
|
if (preg_match('/k$/i', $maxphp2)) {
|
||||||
if (preg_match('/m$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024;
|
$maxphp2 = preg_replace('/k$/i', '', $maxphp2);
|
||||||
if (preg_match('/g$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024;
|
$maxphp2 = $maxphp2 * 1;
|
||||||
if (preg_match('/t$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
|
}
|
||||||
|
if (preg_match('/m$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/m$/i', '', $maxphp2);
|
||||||
|
$maxphp2 = $maxphp2 * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/g$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/g$/i', '', $maxphp2);
|
||||||
|
$maxphp2 = $maxphp2 * 1024 * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/t$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/t$/i', '', $maxphp2);
|
||||||
|
$maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
|
||||||
|
}
|
||||||
if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2)
|
if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2)
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
|
|||||||
@ -62,9 +62,9 @@ $hookmanager->initHooks(array('admintranslation', 'globaladmin'));
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
|
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
|
||||||
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
|
if (!GETPOST('confirmmassaction', 'alpha') && !empty($massaction) && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
|
||||||
|
|
||||||
$parameters = array('socid'=>$socid);
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
@ -217,14 +217,14 @@ print '<br>';
|
|||||||
|
|
||||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
if (isset($optioncss) && $optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||||
if ($langcode) $param .= '&langcode='.urlencode($langcode);
|
if ($langcode) $param .= '&langcode='.urlencode($langcode);
|
||||||
if ($transkey) $param .= '&transkey='.urlencode($transkey);
|
if ($transkey) $param .= '&transkey='.urlencode($transkey);
|
||||||
if ($transvalue) $param .= '&transvalue='.urlencode($transvalue);
|
if ($transvalue) $param .= '&transvalue='.urlencode($transvalue);
|
||||||
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug) ? '?debug=1' : '').'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && !empty($debug)) ? '?debug=1' : '').'" method="POST">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if (isset($optioncss) && $optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
@ -472,7 +472,7 @@ if ($mode == 'searchkey')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="nowrap right">';
|
print '<td class="nowrap right">';
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
$searchpicto = $form->showFilterAndCheckAddButtons(!empty($massactionbutton) ? 1 : 0, 'checkforselect', 1);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -87,7 +87,7 @@ $extrafields->fetch_name_optionals_label($object->table_element);
|
|||||||
$hookmanager->initHooks(array('thirdpartycomm', 'globalcard'));
|
$hookmanager->initHooks(array('thirdpartycomm', 'globalcard'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
|
$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);
|
||||||
|
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0) {
|
||||||
if (!($object->client > 0) || empty($user->rights->societe->lire)) {
|
if (!($object->client > 0) || empty($user->rights->societe->lire)) {
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class box_commandes extends ModeleBoxes
|
|||||||
$societestatic = new Societe($this->db);
|
$societestatic = new Societe($this->db);
|
||||||
$userstatic = new User($this->db);
|
$userstatic = new User($this->db);
|
||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."CustomerOrders", $max));
|
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."CustomerOrders", $max));
|
||||||
|
|
||||||
if ($user->rights->commande->lire)
|
if ($user->rights->commande->lire)
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@ class box_commandes extends ModeleBoxes
|
|||||||
if (!empty($conf->global->ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY)) $sql .= " AND c.fk_statut = 1";
|
if (!empty($conf->global->ORDER_BOX_LAST_ORDERS_VALIDATED_ONLY)) $sql .= " AND c.fk_statut = 1";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
||||||
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -92,7 +92,7 @@ class box_contracts extends ModeleBoxes
|
|||||||
$sql .= " AND c.entity = ".$conf->entity;
|
$sql .= " AND c.entity = ".$conf->entity;
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_contrat DESC, c.ref DESC ";
|
if (! empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_contrat DESC, c.ref DESC ";
|
||||||
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class box_factures extends ModeleBoxes
|
|||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$text = $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."CustomerBills", $max);
|
$text = $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."CustomerBills", $max);
|
||||||
$this->info_box_head = array(
|
$this->info_box_head = array(
|
||||||
'text' => $text,
|
'text' => $text,
|
||||||
'limit'=> dol_strlen($text)
|
'limit'=> dol_strlen($text)
|
||||||
@ -106,7 +106,7 @@ class box_factures extends ModeleBoxes
|
|||||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||||
else $sql .= " ORDER BY f.tms DESC, f.ref DESC ";
|
else $sql .= " ORDER BY f.tms DESC, f.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class box_factures_fourn extends ModeleBoxes
|
|||||||
$thirdpartystatic = new Fournisseur($this->db);
|
$thirdpartystatic = new Fournisseur($this->db);
|
||||||
|
|
||||||
$this->info_box_head = array(
|
$this->info_box_head = array(
|
||||||
'text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."SupplierBills", $max)
|
'text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."SupplierBills", $max)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($user->rights->fournisseur->facture->lire)
|
if ($user->rights->fournisseur->facture->lire)
|
||||||
@ -104,7 +104,7 @@ class box_factures_fourn extends ModeleBoxes
|
|||||||
$sql .= " AND f.entity = ".$conf->entity;
|
$sql .= " AND f.entity = ".$conf->entity;
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY f.datef DESC, f.ref DESC ";
|
||||||
else $sql .= " ORDER BY f.tms DESC, f.ref DESC ";
|
else $sql .= " ORDER BY f.tms DESC, f.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -112,10 +112,10 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||||||
$shownb = GETPOST($param_shownb, 'alpha');
|
$shownb = GETPOST($param_shownb, 'alpha');
|
||||||
$showtot = GETPOST($param_showtot, 'alpha');
|
$showtot = GETPOST($param_showtot, 'alpha');
|
||||||
} else {
|
} else {
|
||||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||||
$endyear = $tmparray['year'];
|
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||||
$shownb = $tmparray['shownb'];
|
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||||
$showtot = $tmparray['showtot'];
|
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||||
}
|
}
|
||||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||||
$nowarray = dol_getdate(dol_now(), true);
|
$nowarray = dol_getdate(dol_now(), true);
|
||||||
|
|||||||
@ -109,13 +109,14 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
|||||||
$shownb = GETPOST($param_shownb, 'alpha');
|
$shownb = GETPOST($param_shownb, 'alpha');
|
||||||
$showtot = GETPOST($param_showtot, 'alpha');
|
$showtot = GETPOST($param_showtot, 'alpha');
|
||||||
} else {
|
} else {
|
||||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||||
$endyear = $tmparray['year'];
|
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||||
$shownb = $tmparray['shownb'];
|
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||||
$showtot = $tmparray['showtot'];
|
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||||
}
|
}
|
||||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||||
$nowarray = dol_getdate(dol_now(), true);
|
$nowarray = dol_getdate(dol_now(), true);
|
||||||
|
if (empty($year)) $year = $nowarray['year'];
|
||||||
if (empty($endyear)) $endyear = $nowarray['year'];
|
if (empty($endyear)) $endyear = $nowarray['year'];
|
||||||
$startyear = $endyear - 1;
|
$startyear = $endyear - 1;
|
||||||
$mode = 'supplier';
|
$mode = 'supplier';
|
||||||
|
|||||||
@ -112,10 +112,10 @@ class box_graph_orders_permonth extends ModeleBoxes
|
|||||||
$shownb = GETPOST($param_shownb, 'alpha');
|
$shownb = GETPOST($param_shownb, 'alpha');
|
||||||
$showtot = GETPOST($param_showtot, 'alpha');
|
$showtot = GETPOST($param_showtot, 'alpha');
|
||||||
} else {
|
} else {
|
||||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||||
$endyear = $tmparray['year'];
|
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||||
$shownb = $tmparray['shownb'];
|
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||||
$showtot = $tmparray['showtot'];
|
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||||
}
|
}
|
||||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||||
$nowarray = dol_getdate(dol_now(), true);
|
$nowarray = dol_getdate(dol_now(), true);
|
||||||
|
|||||||
@ -111,10 +111,10 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
|||||||
$shownb = GETPOST($param_shownb, 'alpha');
|
$shownb = GETPOST($param_shownb, 'alpha');
|
||||||
$showtot = GETPOST($param_showtot, 'alpha');
|
$showtot = GETPOST($param_showtot, 'alpha');
|
||||||
} else {
|
} else {
|
||||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||||
$endyear = $tmparray['year'];
|
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||||
$shownb = $tmparray['shownb'];
|
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||||
$showtot = $tmparray['showtot'];
|
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||||
}
|
}
|
||||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||||
$nowarray = dol_getdate(dol_now(), true);
|
$nowarray = dol_getdate(dol_now(), true);
|
||||||
|
|||||||
@ -95,11 +95,11 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
$showpropalnb = GETPOST($param_showpropalnb, 'alpha');
|
$showpropalnb = GETPOST($param_showpropalnb, 'alpha');
|
||||||
$showordernb = GETPOST($param_showordernb, 'alpha');
|
$showordernb = GETPOST($param_showordernb, 'alpha');
|
||||||
} else {
|
} else {
|
||||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||||
$year = $tmparray['year'];
|
$year = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||||
$showinvoicenb = $tmparray['showinvoicenb'];
|
$showinvoicenb = (!empty($tmparray['showinvoicenb']) ? $tmparray['showinvoicenb'] : '');
|
||||||
$showpropalnb = $tmparray['showpropalnb'];
|
$showpropalnb = (!empty($tmparray['showpropalnb']) ? $tmparray['showpropalnb'] : '');
|
||||||
$showordernb = $tmparray['showordernb'];
|
$showordernb = (!empty($tmparray['showordernb']) ? $tmparray['showordernb'] : '');
|
||||||
}
|
}
|
||||||
if (empty($showinvoicenb) && empty($showpropalnb) && empty($showordernb)) { $showpropalnb = 1; $showinvoicenb = 1; $showordernb = 1; }
|
if (empty($showinvoicenb) && empty($showpropalnb) && empty($showordernb)) { $showpropalnb = 1; $showinvoicenb = 1; $showordernb = 1; }
|
||||||
if (empty($conf->facture->enabled) || empty($user->rights->facture->lire)) $showinvoicenb = 0;
|
if (empty($conf->facture->enabled) || empty($user->rights->facture->lire)) $showinvoicenb = 0;
|
||||||
|
|||||||
@ -112,10 +112,10 @@ class box_graph_propales_permonth extends ModeleBoxes
|
|||||||
$shownb = GETPOST($param_shownb, 'alpha');
|
$shownb = GETPOST($param_shownb, 'alpha');
|
||||||
$showtot = GETPOST($param_showtot, 'alpha');
|
$showtot = GETPOST($param_showtot, 'alpha');
|
||||||
} else {
|
} else {
|
||||||
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true);
|
$tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array());
|
||||||
$endyear = $tmparray['year'];
|
$endyear = (!empty($tmparray['year']) ? $tmparray['year'] : '');
|
||||||
$shownb = $tmparray['shownb'];
|
$shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : '');
|
||||||
$showtot = $tmparray['showtot'];
|
$showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : '');
|
||||||
}
|
}
|
||||||
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
if (empty($shownb) && empty($showtot)) { $shownb = 1; $showtot = 1; }
|
||||||
$nowarray = dol_getdate(dol_now(), true);
|
$nowarray = dol_getdate(dol_now(), true);
|
||||||
@ -176,8 +176,10 @@ class box_graph_propales_permonth extends ModeleBoxes
|
|||||||
//$datatype2 = array('lines','bars');
|
//$datatype2 = array('lines','bars');
|
||||||
|
|
||||||
$filenamenb = $dir."/".$prefix."propalsamountinyear-".$endyear.".png";
|
$filenamenb = $dir."/".$prefix."propalsamountinyear-".$endyear.".png";
|
||||||
|
if (!empty($mode)) {
|
||||||
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png';
|
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png';
|
||||||
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$endyear.'.png';
|
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$endyear.'.png';
|
||||||
|
}
|
||||||
|
|
||||||
$px2 = new DolGraph();
|
$px2 = new DolGraph();
|
||||||
$mesg = $px2->isGraphKo();
|
$mesg = $px2->isGraphKo();
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||||
$tmpentry = array('enabled'=>((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && !empty($conf->stock->enabled)), 'perms'=>($user->rights->stock->lire), 'module'=>'product|service|stock');
|
$tmpentry = array('enabled'=>((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && !empty($conf->stock->enabled)), 'perms'=>!empty($user->rights->stock->lire), 'module'=>'product|service|stock');
|
||||||
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
|
$showmode = isVisibleToUserType(($user->socid > 0 ? 1 : 0), $tmpentry, $listofmodulesforexternal);
|
||||||
$this->hidden = ($showmode != 1);
|
$this->hidden = ($showmode != 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class box_propales extends ModeleBoxes
|
|||||||
$propalstatic = new Propal($this->db);
|
$propalstatic = new Propal($this->db);
|
||||||
$societestatic = new Societe($this->db);
|
$societestatic = new Societe($this->db);
|
||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."Propals", $max));
|
$this->info_box_head = array('text' => $langs->trans("BoxTitleLast".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."Propals", $max));
|
||||||
|
|
||||||
if ($user->rights->propale->lire)
|
if ($user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
@ -96,7 +96,7 @@ class box_propales extends ModeleBoxes
|
|||||||
$sql .= " AND p.entity IN (".getEntity('propal').")";
|
$sql .= " AND p.entity IN (".getEntity('propal').")";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY p.datep DESC, p.ref DESC ";
|
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY p.datep DESC, p.ref DESC ";
|
||||||
else $sql .= " ORDER BY p.tms DESC, p.ref DESC ";
|
else $sql .= " ORDER BY p.tms DESC, p.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class box_supplier_orders extends ModeleBoxes
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||||
$thirdpartystatic = new Fournisseur($this->db);
|
$thirdpartystatic = new Fournisseur($this->db);
|
||||||
|
|
||||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatest".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE ? "" : "Modified")."SupplierOrders", $max));
|
$this->info_box_head = array('text' => $langs->trans("BoxTitleLatest".(!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) ? "" : "Modified")."SupplierOrders", $max));
|
||||||
|
|
||||||
if ($user->rights->fournisseur->commande->lire)
|
if ($user->rights->fournisseur->commande->lire)
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ class box_supplier_orders extends ModeleBoxes
|
|||||||
$sql .= " AND c.entity IN (".getEntity('supplier_order').")";
|
$sql .= " AND c.entity IN (".getEntity('supplier_order').")";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC ";
|
||||||
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
else $sql .= " ORDER BY c.tms DESC, c.ref DESC ";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
|
|||||||
$sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")";
|
$sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.")";
|
||||||
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||||
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
if ($user->socid) $sql .= " AND s.rowid = ".$user->socid;
|
||||||
if ($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC";
|
if (!empty($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE)) $sql .= " ORDER BY c.date_commande DESC, c.ref DESC";
|
||||||
else $sql .= " ORDER BY c.date_livraison ASC, c.fk_statut ASC";
|
else $sql .= " ORDER BY c.date_livraison ASC, c.fk_statut ASC";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|
||||||
|
|||||||
@ -601,7 +601,7 @@ abstract class CommonObject
|
|||||||
if (empty($lastname)) $lastname = (isset($this->lastname) ? $this->lastname : (isset($this->name) ? $this->name : (isset($this->nom) ? $this->nom : (isset($this->societe) ? $this->societe : (isset($this->company) ? $this->company : '')))));
|
if (empty($lastname)) $lastname = (isset($this->lastname) ? $this->lastname : (isset($this->name) ? $this->name : (isset($this->nom) ? $this->nom : (isset($this->societe) ? $this->societe : (isset($this->company) ? $this->company : '')))));
|
||||||
|
|
||||||
$ret = '';
|
$ret = '';
|
||||||
if ($option && $this->civility_code)
|
if (!empty($option) && !empty($this->civility_code))
|
||||||
{
|
{
|
||||||
if ($langs->transnoentitiesnoconv("Civility".$this->civility_code) != "Civility".$this->civility_code) $ret .= $langs->transnoentitiesnoconv("Civility".$this->civility_code).' ';
|
if ($langs->transnoentitiesnoconv("Civility".$this->civility_code) != "Civility".$this->civility_code) $ret .= $langs->transnoentitiesnoconv("Civility".$this->civility_code).' ';
|
||||||
else $ret .= $this->civility_code.' ';
|
else $ret .= $this->civility_code.' ';
|
||||||
@ -720,7 +720,7 @@ abstract class CommonObject
|
|||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
$outdone = 0;
|
$outdone = 0;
|
||||||
$coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
|
$coords = $this->getFullAddress(1, ', ', (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) ? $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT : 0));
|
||||||
if ($coords)
|
if ($coords)
|
||||||
{
|
{
|
||||||
if (!empty($conf->use_javascript_ajax))
|
if (!empty($conf->use_javascript_ajax))
|
||||||
@ -1407,7 +1407,7 @@ abstract class CommonObject
|
|||||||
} elseif (strpos($obj->element, 'supplier') !== false && $obj->element != 'supplier_proposal') {
|
} elseif (strpos($obj->element, 'supplier') !== false && $obj->element != 'supplier_proposal') {
|
||||||
$modulename = 'fournisseur';
|
$modulename = 'fournisseur';
|
||||||
}
|
}
|
||||||
if ($conf->{$modulename}->enabled) {
|
if (!empty($conf->{$modulename}->enabled)) {
|
||||||
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
|
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
|
||||||
$transkey = "TypeContact_".$obj->element."_".$source."_".$obj->code;
|
$transkey = "TypeContact_".$obj->element."_".$source."_".$obj->code;
|
||||||
$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
|
||||||
@ -6846,7 +6846,7 @@ abstract class CommonObject
|
|||||||
$value = $getposttemp;
|
$value = $getposttemp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = $this->array_options["options_".$key]; // No GET, no POST, no default value, so we take value of object.
|
$value = (!empty($this->array_options["options_".$key]) ? $this->array_options["options_".$key] : ''); // No GET, no POST, no default value, so we take value of object.
|
||||||
}
|
}
|
||||||
//var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value);
|
//var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -964,7 +964,7 @@ class DolGraph
|
|||||||
$array_of_ykeys = array_keys($valarray);
|
$array_of_ykeys = array_keys($valarray);
|
||||||
$alabelexists = 1;
|
$alabelexists = 1;
|
||||||
$tmpykey = explode('_', ($array_of_ykeys[$i + ($alabelexists ? 1 : 0)]), 3);
|
$tmpykey = explode('_', ($array_of_ykeys[$i + ($alabelexists ? 1 : 0)]), 3);
|
||||||
if (!empty($tmpykey[2]) || $tmpykey[2] == '0') { // This is a 'Group by' array
|
if (isset($tmpykey[2]) && (!empty($tmpykey[2]) || $tmpykey[2] == '0')) { // This is a 'Group by' array
|
||||||
$tmpvalue = (array_key_exists('y_' . $tmpykey[1] . '_' . $tmpykey[2], $valarray) ? $valarray['y_' . $tmpykey[1] . '_' . $tmpykey[2]] : $valarray[$i + 1]);
|
$tmpvalue = (array_key_exists('y_' . $tmpykey[1] . '_' . $tmpykey[2], $valarray) ? $valarray['y_' . $tmpykey[1] . '_' . $tmpykey[2]] : $valarray[$i + 1]);
|
||||||
$values[$x] = (is_numeric($tmpvalue) ? $tmpvalue : null);
|
$values[$x] = (is_numeric($tmpvalue) ? $tmpvalue : null);
|
||||||
$arrayofgroupslegend[$i] = array(
|
$arrayofgroupslegend[$i] = array(
|
||||||
@ -1203,7 +1203,7 @@ class DolGraph
|
|||||||
$foundnegativecolor = 0;
|
$foundnegativecolor = 0;
|
||||||
$usecolorvariantforgroupby = 0;
|
$usecolorvariantforgroupby = 0;
|
||||||
// We used a 'group by' and we have too many colors so we generated color variants per
|
// We used a 'group by' and we have too many colors so we generated color variants per
|
||||||
if (is_array($arrayofgroupslegend[$i]) && count($arrayofgroupslegend[$i]) > 0) { // If we used a group by.
|
if (!empty($arrayofgroupslegend) && is_array($arrayofgroupslegend[$i]) && count($arrayofgroupslegend[$i]) > 0) { // If we used a group by.
|
||||||
$nbofcolorneeds = count($arrayofgroupslegend);
|
$nbofcolorneeds = count($arrayofgroupslegend);
|
||||||
$nbofcolorsavailable = count($theme_datacolor);
|
$nbofcolorsavailable = count($theme_datacolor);
|
||||||
if ($nbofcolorneeds > $nbofcolorsavailable) {
|
if ($nbofcolorneeds > $nbofcolorsavailable) {
|
||||||
@ -1278,7 +1278,7 @@ class DolGraph
|
|||||||
$this->stringtoshow .= '{';
|
$this->stringtoshow .= '{';
|
||||||
$this->stringtoshow .= 'dolibarrinfo: \'y_' . $i . '\', ';
|
$this->stringtoshow .= 'dolibarrinfo: \'y_' . $i . '\', ';
|
||||||
$this->stringtoshow .= 'label: \'' . dol_escape_js(dol_string_nohtmltag($textoflegend)) . '\', ';
|
$this->stringtoshow .= 'label: \'' . dol_escape_js(dol_string_nohtmltag($textoflegend)) . '\', ';
|
||||||
$this->stringtoshow .= 'pointStyle: \'' . ($this->type[$i] == 'linesnopoint' ? 'line' : 'circle') . '\', ';
|
$this->stringtoshow .= 'pointStyle: \'' . ((!empty($this->type[$i]) && $this->type[$i] == 'linesnopoint') ? 'line' : 'circle') . '\', ';
|
||||||
$this->stringtoshow .= 'fill: ' . ($type == 'bar' ? 'true' : 'false') . ', ';
|
$this->stringtoshow .= 'fill: ' . ($type == 'bar' ? 'true' : 'false') . ', ';
|
||||||
if ($isfunnel) {
|
if ($isfunnel) {
|
||||||
$this->stringtoshow .= 'borderWidth: \'2\', ';
|
$this->stringtoshow .= 'borderWidth: \'2\', ';
|
||||||
@ -1287,7 +1287,7 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
|
$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
|
||||||
$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
|
$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
|
||||||
if ($arrayofgroupslegend[$i]) $this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
|
if (!empty($arrayofgroupslegend) && !empty($arrayofgroupslegend[$i])) $this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
|
||||||
$this->stringtoshow .='data: [';
|
$this->stringtoshow .='data: [';
|
||||||
if ($isfunnel) {
|
if ($isfunnel) {
|
||||||
$this->stringtoshow .= '['.-$serie[$i].','.$serie[$i].']';
|
$this->stringtoshow .= '['.-$serie[$i].','.$serie[$i].']';
|
||||||
|
|||||||
@ -1097,7 +1097,12 @@ class ExtraFields
|
|||||||
foreach ($param['options'] as $key => $val)
|
foreach ($param['options'] as $key => $val)
|
||||||
{
|
{
|
||||||
if ((string) $key == '') continue;
|
if ((string) $key == '') continue;
|
||||||
list($val, $parent) = explode('|', $val);
|
$valarray = explode('|', $val);
|
||||||
|
$val = $valarray[0];
|
||||||
|
$parent = '';
|
||||||
|
if (!empty($valarray[1])) {
|
||||||
|
$parent = $valarray[1];
|
||||||
|
}
|
||||||
$out .= '<option value="'.$key.'"';
|
$out .= '<option value="'.$key.'"';
|
||||||
$out .= (((string) $value == (string) $key) ? ' selected' : '');
|
$out .= (((string) $value == (string) $key) ? ' selected' : '');
|
||||||
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
|
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
|
||||||
@ -2063,7 +2068,7 @@ class ExtraFields
|
|||||||
{
|
{
|
||||||
global $_POST;
|
global $_POST;
|
||||||
|
|
||||||
if (is_string($extrafieldsobjectkey) && is_array($this->attributes[$extrafieldsobjectkey]['label']))
|
if (is_string($extrafieldsobjectkey) && !empty($this->attributes[$extrafieldsobjectkey]['label']) && is_array($this->attributes[$extrafieldsobjectkey]['label']))
|
||||||
{
|
{
|
||||||
$extralabels = $this->attributes[$extrafieldsobjectkey]['label'];
|
$extralabels = $this->attributes[$extrafieldsobjectkey]['label'];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -202,7 +202,8 @@ class FormActions
|
|||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create))
|
if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create))
|
||||||
{
|
{
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog')).'&origin='.urlencode($typeelement).'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage));
|
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog')).'&origin='.urlencode($typeelement).'&originid='.$object->id.((!empty($object->socid) && $object->socid > 0) ? '&socid='.$object->socid : ((!empty($socid) && $socid > 0) ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage);
|
||||||
|
$newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -244,7 +245,7 @@ class FormActions
|
|||||||
print '<td class="nowraponall tdoverflowmax125">';
|
print '<td class="nowraponall tdoverflowmax125">';
|
||||||
if (!empty($actioncomm->userownerid))
|
if (!empty($actioncomm->userownerid))
|
||||||
{
|
{
|
||||||
if (is_object($cacheusers[$actioncomm->userownerid]))
|
if (isset($cacheusers[$actioncomm->userownerid]) && is_object($cacheusers[$actioncomm->userownerid]))
|
||||||
{
|
{
|
||||||
$tmpuser = $cacheusers[$actioncomm->userownerid];
|
$tmpuser = $cacheusers[$actioncomm->userownerid];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -135,15 +135,39 @@ class FormFile
|
|||||||
|
|
||||||
$max = $conf->global->MAIN_UPLOAD_DOC; // In Kb
|
$max = $conf->global->MAIN_UPLOAD_DOC; // In Kb
|
||||||
$maxphp = @ini_get('upload_max_filesize'); // In unknown
|
$maxphp = @ini_get('upload_max_filesize'); // In unknown
|
||||||
if (preg_match('/k$/i', $maxphp)) $maxphp = $maxphp * 1;
|
if (preg_match('/k$/i', $maxphp)) {
|
||||||
if (preg_match('/m$/i', $maxphp)) $maxphp = $maxphp * 1024;
|
$maxphp = preg_replace('/k$/i', '', $maxphp);
|
||||||
if (preg_match('/g$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024;
|
$maxphp = $maxphp * 1;
|
||||||
if (preg_match('/t$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024 * 1024;
|
}
|
||||||
|
if (preg_match('/m$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/m$/i', '', $maxphp);
|
||||||
|
$maxphp = $maxphp * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/g$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/g$/i', '', $maxphp);
|
||||||
|
$maxphp = $maxphp * 1024 * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/t$/i', $maxphp)) {
|
||||||
|
$maxphp = preg_replace('/t$/i', '', $maxphp);
|
||||||
|
$maxphp = $maxphp * 1024 * 1024 * 1024;
|
||||||
|
}
|
||||||
$maxphp2 = @ini_get('post_max_size'); // In unknown
|
$maxphp2 = @ini_get('post_max_size'); // In unknown
|
||||||
if (preg_match('/k$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1;
|
if (preg_match('/k$/i', $maxphp2)) {
|
||||||
if (preg_match('/m$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024;
|
$maxphp2 = preg_replace('/k$/i', '', $maxphp2);
|
||||||
if (preg_match('/g$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024;
|
$maxphp2 = $maxphp2 * 1;
|
||||||
if (preg_match('/t$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
|
}
|
||||||
|
if (preg_match('/m$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/m$/i', '', $maxphp2);
|
||||||
|
$maxphp2 = $maxphp2 * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/g$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/g$/i', '', $maxphp2);
|
||||||
|
$maxphp2 = $maxphp2 * 1024 * 1024;
|
||||||
|
}
|
||||||
|
if (preg_match('/t$/i', $maxphp2)) {
|
||||||
|
$maxphp2 = preg_replace('/t$/i', '', $maxphp2);
|
||||||
|
$maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
|
||||||
|
}
|
||||||
// Now $max and $maxphp and $maxphp2 are in Kb
|
// Now $max and $maxphp and $maxphp2 are in Kb
|
||||||
$maxmin = $max;
|
$maxmin = $max;
|
||||||
$maxphptoshow = $maxphptoshowparam = '';
|
$maxphptoshow = $maxphptoshowparam = '';
|
||||||
@ -1049,8 +1073,8 @@ class FormFile
|
|||||||
if (empty($relativepath))
|
if (empty($relativepath))
|
||||||
{
|
{
|
||||||
$relativepath = (!empty($object->ref) ?dol_sanitizeFileName($object->ref) : '').'/';
|
$relativepath = (!empty($object->ref) ?dol_sanitizeFileName($object->ref) : '').'/';
|
||||||
if ($object->element == 'invoice_supplier') $relativepath = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$relativepath; // TODO Call using a defined value for $relativepath
|
if (!empty($object->element) && $object->element == 'invoice_supplier') $relativepath = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$relativepath; // TODO Call using a defined value for $relativepath
|
||||||
if ($object->element == 'project_task') $relativepath = 'Call_not_supported_._Call_function_using_a_defined_relative_path_.';
|
if (!empty($object->element) && $object->element == 'project_task') $relativepath = 'Call_not_supported_._Call_function_using_a_defined_relative_path_.';
|
||||||
}
|
}
|
||||||
// For backward compatiblity, we detect file stored into an old path
|
// For backward compatiblity, we detect file stored into an old path
|
||||||
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO) && $filearray[0]['level1name'] == 'photos')
|
if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO) && $filearray[0]['level1name'] == 'photos')
|
||||||
|
|||||||
@ -106,7 +106,8 @@ class InfoBox
|
|||||||
if (is_object($user)) $sql .= " AND b.fk_user IN (0,".$user->id.")";
|
if (is_object($user)) $sql .= " AND b.fk_user IN (0,".$user->id.")";
|
||||||
else $sql .= " AND b.fk_user = 0";
|
else $sql .= " AND b.fk_user = 0";
|
||||||
$sql .= " ORDER BY b.box_order";
|
$sql .= " ORDER BY b.box_order";
|
||||||
} else // available
|
}
|
||||||
|
else // available
|
||||||
{
|
{
|
||||||
$sql = "SELECT d.rowid as box_id, d.file, d.note, d.tms";
|
$sql = "SELECT d.rowid as box_id, d.file, d.note, d.tms";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."boxes_def as d";
|
$sql .= " FROM ".MAIN_DB_PREFIX."boxes_def as d";
|
||||||
@ -150,7 +151,7 @@ class InfoBox
|
|||||||
// box properties
|
// box properties
|
||||||
$box->rowid = (empty($obj->rowid) ? '' : $obj->rowid);
|
$box->rowid = (empty($obj->rowid) ? '' : $obj->rowid);
|
||||||
$box->id = (empty($obj->box_id) ? '' : $obj->box_id);
|
$box->id = (empty($obj->box_id) ? '' : $obj->box_id);
|
||||||
$box->position = ($obj->position == '' ? '' : $obj->position); // '0' must stay '0'
|
$box->position = ((isset($obj->position) && $obj->position == '') ? '' : (isset($obj->position) ? $obj->position : '')); // '0' must stay '0'
|
||||||
$box->box_order = (empty($obj->box_order) ? '' : $obj->box_order);
|
$box->box_order = (empty($obj->box_order) ? '' : $obj->box_order);
|
||||||
$box->fk_user = (empty($obj->fk_user) ? 0 : $obj->fk_user);
|
$box->fk_user = (empty($obj->fk_user) ? 0 : $obj->fk_user);
|
||||||
$box->sourcefile = $relsourcefile;
|
$box->sourcefile = $relsourcefile;
|
||||||
|
|||||||
@ -731,7 +731,7 @@ class Translate
|
|||||||
*/
|
*/
|
||||||
public function transcountry($str, $countrycode)
|
public function transcountry($str, $countrycode)
|
||||||
{
|
{
|
||||||
if ($this->tab_translate["$str$countrycode"]) return $this->trans("$str$countrycode");
|
if (!empty($this->tab_translate["$str$countrycode"])) return $this->trans("$str$countrycode");
|
||||||
else return $this->trans($str);
|
else return $this->trans($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -302,7 +302,7 @@ function societe_prepare_head(Societe $object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
|
||||||
$head[$h][1] .= $langs->trans("Events");
|
$head[$h][1] = $langs->trans("Events");
|
||||||
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||||
$head[$h][1] .= '/';
|
$head[$h][1] .= '/';
|
||||||
$head[$h][1] .= $langs->trans("Agenda");
|
$head[$h][1] .= $langs->trans("Agenda");
|
||||||
@ -862,7 +862,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|||||||
|
|
||||||
// Definition of fields for list
|
// Definition of fields for list
|
||||||
$arrayfields = array(
|
$arrayfields = array(
|
||||||
't.rowid'=>array('label'=>"TechnicalID", 'checked'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'enabled'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'position'=>1),
|
't.rowid'=>array('label'=>"TechnicalID", 'checked'=>(!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) ? 1 : 0), 'enabled'=>(!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) ? 1 : 0), 'position'=>1),
|
||||||
't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10),
|
't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10),
|
||||||
't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20),
|
't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20),
|
||||||
't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30),
|
't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30),
|
||||||
@ -870,7 +870,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|||||||
't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'),
|
't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'),
|
||||||
);
|
);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label'])) {
|
if (!empty($extrafields->attributes[$contactstatic->table_element]['label']) && is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$contactstatic->table_element]['label'] as $key => $val) {
|
foreach ($extrafields->attributes[$contactstatic->table_element]['label'] as $key => $val) {
|
||||||
if (!empty($extrafields->attributes[$contactstatic->table_element]['list'][$key])) {
|
if (!empty($extrafields->attributes[$contactstatic->table_element]['list'][$key])) {
|
||||||
$arrayfields["ef.".$key] = array(
|
$arrayfields["ef.".$key] = array(
|
||||||
@ -989,7 +989,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
|||||||
} elseif (in_array($key, array('role'))) {
|
} elseif (in_array($key, array('role'))) {
|
||||||
print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles);
|
print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles);
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.(!empty($search[$key]) ? dol_escape_htmltag($search[$key]) : '').'">';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -1204,14 +1204,17 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
{
|
{
|
||||||
global $user, $conf;
|
global $user, $conf;
|
||||||
global $form;
|
global $form;
|
||||||
|
|
||||||
global $param, $massactionbutton;
|
global $param, $massactionbutton;
|
||||||
|
|
||||||
$start_year = GETPOST('dateevent_startyear');
|
$start_year = GETPOST('dateevent_startyear');
|
||||||
$start_month = GETPOST('dateevent_startmonth');
|
$start_month = GETPOST('dateevent_startmonth');
|
||||||
$start_day = GETPOST('dateevent_startday');
|
$start_day = GETPOST('dateevent_startday');
|
||||||
$end_year = GETPOST('dateevent_endyear');
|
$end_year = GETPOST('dateevent_endyear');
|
||||||
$end_month = GETPOST('dateevent_endmonth');
|
$end_month = GETPOST('dateevent_endmonth');
|
||||||
$end_day = GETPOST('dateevent_endday');
|
$end_day = GETPOST('dateevent_endday');
|
||||||
|
$tms_start = '';
|
||||||
|
$tms_end = '';
|
||||||
|
|
||||||
if (!empty($start_year) && !empty($start_month) && !empty($start_day)) {
|
if (!empty($start_year) && !empty($start_month) && !empty($start_day)) {
|
||||||
$search_start = $start_year.'-'.$start_month.'-'.$start_day;
|
$search_start = $start_year.'-'.$start_month.'-'.$start_day;
|
||||||
$tms_start = strtotime($search_start);
|
$tms_start = strtotime($search_start);
|
||||||
@ -1391,7 +1394,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||||
//elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
//elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||||
$tododone = '';
|
$tododone = '';
|
||||||
if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone = 'todo';
|
if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && (!empty($obj->datep) && $obj->datep > $now))) $tododone = 'todo';
|
||||||
|
|
||||||
$histo[$numaction] = array(
|
$histo[$numaction] = array(
|
||||||
'type'=>$obj->type,
|
'type'=>$obj->type,
|
||||||
|
|||||||
@ -163,7 +163,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
|||||||
|
|
||||||
print '<ul'.(empty($pere['rowid']) ? ' id="treeData"' : '').'>'; $ulprinted++;
|
print '<ul'.(empty($pere['rowid']) ? ' id="treeData"' : '').'>'; $ulprinted++;
|
||||||
}
|
}
|
||||||
print "\n".'<li '.($tab[$x]['statut'] ? ' class="liuseractive"' : 'class="liuserdisabled"').'>';
|
print "\n".'<li '.(!empty($tab[$x]['statut']) ? ' class="liuseractive"' : 'class="liuserdisabled"').'>';
|
||||||
if ($showfk)
|
if ($showfk)
|
||||||
{
|
{
|
||||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||||
@ -194,7 +194,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
|||||||
|
|
||||||
print '<ul'.(empty($pere['rowid']) ? ' id="treeData"' : '').'>'; $ulprinted++;
|
print '<ul'.(empty($pere['rowid']) ? ' id="treeData"' : '').'>'; $ulprinted++;
|
||||||
}
|
}
|
||||||
print "\n".'<li '.($tab[$x]['statut'] ? ' class="liuseractive"' : 'class="liuserdisabled"').'>';
|
print "\n".'<li '.(!empty($tab[$x]['statut']) ? ' class="liuseractive"' : 'class="liuserdisabled"').'>';
|
||||||
if ($showfk)
|
if ($showfk)
|
||||||
{
|
{
|
||||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||||
|
|||||||
@ -498,7 +498,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
//var_dump($conf->global->THEME_ELDY_BACKBODY);
|
//var_dump($conf->global->THEME_ELDY_BACKBODY);
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', '', 1, '', '', 'colorbackbody').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BACKBODY) ? $conf->global->THEME_ELDY_BACKBODY : ''), array()), ''), 'THEME_ELDY_BACKBODY', '', 1, '', '', 'colorbackbody').' ';
|
||||||
} else {
|
} else {
|
||||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), '');
|
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), '');
|
||||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
@ -539,7 +539,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', '', 1, '', '', 'colorbackhmenu1').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TOPMENU_BACK1) ? $conf->global->THEME_ELDY_TOPMENU_BACK1 : ''), array()), ''), 'THEME_ELDY_TOPMENU_BACK1', '', 1, '', '', 'colorbackhmenu1').' ';
|
||||||
} else {
|
} else {
|
||||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), '');
|
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), '');
|
||||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
@ -580,7 +580,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("LeftMenuBackgroundColor").'</td>';
|
print '<td>'.$langs->trans("LeftMenuBackgroundColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''), 'THEME_ELDY_VERMENU_BACK1', '', 1, '', '', 'colorbackvmenu1').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_VERMENU_BACK1) ? $conf->global->THEME_ELDY_VERMENU_BACK1 : ''), array()), ''), 'THEME_ELDY_VERMENU_BACK1', '', 1, '', '', 'colorbackvmenu1').' ';
|
||||||
} else {
|
} else {
|
||||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), '');
|
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), '');
|
||||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
@ -601,7 +601,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("TextTitleColor").'</td>';
|
print '<td>'.$langs->trans("TextTitleColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', '', 1, '', '', 'colortexttitlenotab').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $conf->global->THEME_ELDY_TEXTTITLENOTAB : ''), array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', '', 1, '', '', 'colortexttitlenotab').' ';
|
||||||
} else {
|
} else {
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
@ -621,7 +621,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableTitleColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', '', 1, '', '', 'colorbacktitle1').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_BACKTITLE1) ? $conf->global->THEME_ELDY_BACKTITLE1 : ''), array()), ''), 'THEME_ELDY_BACKTITLE1', '', 1, '', '', 'colorbacktitle1').' ';
|
||||||
} else {
|
} else {
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
@ -641,7 +641,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("BackgroundTableTitleTextColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableTitleTextColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLE, array()), ''), 'THEME_ELDY_TEXTTITLE', '', 1, '', '', 'colortexttitle').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLE) ? $conf->global->THEME_ELDY_TEXTTITLE : ''), array()), ''), 'THEME_ELDY_TEXTTITLE', '', 1, '', '', 'colortexttitle').' ';
|
||||||
} else {
|
} else {
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
@ -661,7 +661,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("BackgroundTableTitleTextlinkColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableTitleTextlinkColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', '', 1, '', '', 'colortexttitlelink').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $conf->global->THEME_ELDY_TEXTTITLELINK : ''), array()), ''), 'THEME_ELDY_TEXTTITLELINK', '', 1, '', '', 'colortexttitlelink').' ';
|
||||||
} else {
|
} else {
|
||||||
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default"));
|
print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default"));
|
||||||
}
|
}
|
||||||
@ -682,7 +682,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("BackgroundTableLineOddColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableLineOddColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''), 'THEME_ELDY_LINEIMPAIR1', '', 1, '', '', 'colorbacklinepair2').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_LINEIMPAIR1) ? $conf->global->THEME_ELDY_LINEIMPAIR1 : ''), array()), ''), 'THEME_ELDY_LINEIMPAIR1', '', 1, '', '', 'colorbacklinepair2').' ';
|
||||||
} else {
|
} else {
|
||||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), '');
|
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), '');
|
||||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
@ -703,7 +703,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("BackgroundTableLineEvenColor").'</td>';
|
print '<td>'.$langs->trans("BackgroundTableLineEvenColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''), 'THEME_ELDY_LINEPAIR1', '', 1, '', '', 'colorbacklineimpair2').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_LINEPAIR1) ? $conf->global->THEME_ELDY_LINEPAIR1 : ''), array()), ''), 'THEME_ELDY_LINEPAIR1', '', 1, '', '', 'colorbacklineimpair2').' ';
|
||||||
} else {
|
} else {
|
||||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), '');
|
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), '');
|
||||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
@ -744,7 +744,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
print '<td>'.$langs->trans("LinkColor").'</td>';
|
print '<td>'.$langs->trans("LinkColor").'</td>';
|
||||||
print '<td colspan="'.($colspan - 1).'">';
|
print '<td colspan="'.($colspan - 1).'">';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', '', 1, '', '', 'colortextlink').' ';
|
print $formother->selectColor(colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_TEXTLINK) ? $conf->global->THEME_ELDY_TEXTLINK : ''), array()), ''), 'THEME_ELDY_TEXTLINK', '', 1, '', '', 'colortextlink').' ';
|
||||||
} else {
|
} else {
|
||||||
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), '');
|
$color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), '');
|
||||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
@ -781,12 +781,12 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||||
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
if (!empty($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
||||||
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
|
else $color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_HOVER) ? $conf->global->THEME_ELDY_USE_HOVER : ''), array()), '');
|
||||||
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', '', 1, '', '', 'colorbacklinepairhover').' ';
|
print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', '', 1, '', '', 'colorbacklinepairhover').' ';
|
||||||
} else {
|
} else {
|
||||||
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover));
|
||||||
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), '');
|
else $color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_HOVER) ? $conf->global->THEME_ELDY_USE_HOVER : ''), array()), '');
|
||||||
if ($color) {
|
if ($color) {
|
||||||
if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
else print $langs->trans("Default");
|
else print $langs->trans("Default");
|
||||||
@ -818,12 +818,12 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
|
|||||||
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
//print '<input name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||||
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
//print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||||
if ($edit) {
|
if ($edit) {
|
||||||
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0';
|
if (!empty($conf->global->THEME_ELDY_USE_CHECKED) && $conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0';
|
||||||
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), '');
|
else $color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_CHECKED) ? $conf->global->THEME_ELDY_USE_CHECKED : ''), array()), '');
|
||||||
print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', '', 1, '', '', 'colorbacklinepairchecked').' ';
|
print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', '', 1, '', '', 'colorbacklinepairchecked').' ';
|
||||||
} else {
|
} else {
|
||||||
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0';
|
if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0';
|
||||||
else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), '');
|
else $color = colorArrayToHex(colorStringToArray((!empty($conf->global->THEME_ELDY_USE_CHECKED) ? $conf->global->THEME_ELDY_USE_CHECKED : ''), array()), '');
|
||||||
if ($color) {
|
if ($color) {
|
||||||
if ($color != 'e6edf0') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
if ($color != 'e6edf0') print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; background-color: #'.$color.'" value="'.$color.'">';
|
||||||
else print $langs->trans("Default");
|
else print $langs->trans("Default");
|
||||||
|
|||||||
@ -206,9 +206,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
|||||||
$menu_arr[] = array(
|
$menu_arr[] = array(
|
||||||
'name' => 'Projet',
|
'name' => 'Projet',
|
||||||
'link' => '/projet/index.php?mainmenu=project&leftmenu=',
|
'link' => '/projet/index.php?mainmenu=project&leftmenu=',
|
||||||
'title' => (empty($conf->global->PROJECT_USE_OPPORTUNITIES) || $conf->global->PROJECT_USE_OPPORTUNITIES == 2)
|
'title' => (! empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $conf->global->PROJECT_USE_OPPORTUNITIES == 2 ? "Leads" : "Projects"),
|
||||||
? (($conf->global->PROJECT_USE_OPPORTUNITIES == 2) ? "Leads" : "Projects")
|
|
||||||
: "Projects",
|
|
||||||
'level' => 0,
|
'level' => 0,
|
||||||
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
|
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
|
||||||
'target' => $atarget,
|
'target' => $atarget,
|
||||||
@ -743,11 +741,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1);
|
$newmenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1);
|
||||||
|
|
||||||
$warnpicto = '';
|
$warnpicto = '';
|
||||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
|
if (!empty($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$warnpicto = img_warning($langs->trans("WarningPHPMailD"));
|
$warnpicto = img_warning($langs->trans("WarningPHPMailD"));
|
||||||
}
|
}
|
||||||
if (in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmail')) && empty($conf->global->MAIN_MAIL_SMTP_SERVER)) {
|
if (!empty($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmail')) && empty($conf->global->MAIN_MAIL_SMTP_SERVER)) {
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$warnpicto = img_warning($langs->trans("ErrorSetupOfEmailsNotComplete"));
|
$warnpicto = img_warning($langs->trans("ErrorSetupOfEmailsNotComplete"));
|
||||||
}
|
}
|
||||||
@ -805,8 +803,8 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->rights->categorie->lire, '', $mainmenu, 'cat');
|
||||||
}
|
}
|
||||||
$newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
$newmenu->add("", $langs->trans("Groups"), 1, ($user->rights->user->user->lire || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||||
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->write : $user->rights->user->user->creer) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||||
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, (($conf->global->MAIN_USE_ADVANCED_PERMS ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->rights->user->group_advance->read : $user->rights->user->user->lire) || $user->admin) && !(!empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -622,6 +622,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||||
|
|
||||||
|
$content='';
|
||||||
$pathoffile = $this->getDescLongReadmeFound();
|
$pathoffile = $this->getDescLongReadmeFound();
|
||||||
|
|
||||||
if ($pathoffile) // Mostly for external modules
|
if ($pathoffile) // Mostly for external modules
|
||||||
|
|||||||
@ -254,7 +254,7 @@ class modStock extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')';
|
$this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')';
|
||||||
|
|
||||||
// Export stock including batch number
|
// Export stock including batch number
|
||||||
if ($conf->productbatch->enabled)
|
if (!empty($conf->productbatch->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("productbatch");
|
$langs->load("productbatch");
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ class modStock extends DolibarrModules
|
|||||||
'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product",
|
'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product",
|
||||||
'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", 'p.datec'=>'product', 'p.tms'=>'product'
|
'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", 'p.datec'=>'product', 'p.tms'=>'product'
|
||||||
); // We define here only fields that use another icon that the one defined into export_icon
|
); // We define here only fields that use another icon that the one defined into export_icon
|
||||||
if ($conf->productbatch->enabled)
|
if (!empty($conf->productbatch->enabled))
|
||||||
{
|
{
|
||||||
$this->export_fields_array[$r]['sm.batch'] = 'Batch';
|
$this->export_fields_array[$r]['sm.batch'] = 'Batch';
|
||||||
$this->export_TypeFields_array[$r]['sm.batch'] = 'Text';
|
$this->export_TypeFields_array[$r]['sm.batch'] = 'Text';
|
||||||
|
|||||||
@ -14,7 +14,7 @@ if (empty($extrafieldsobjectkey) && is_object($object)) $extrafieldsobjectkey =
|
|||||||
// Loop to show all columns of extrafields for the search title line
|
// Loop to show all columns of extrafields for the search title line
|
||||||
if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
||||||
{
|
{
|
||||||
if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']))
|
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']))
|
||||||
{
|
{
|
||||||
if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.';
|
if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.';
|
||||||
if (empty($search_options_pattern)) $search_options_pattern = 'search_options_';
|
if (empty($search_options_pattern)) $search_options_pattern = 'search_options_';
|
||||||
|
|||||||
@ -13,7 +13,7 @@ if (!isset($disablesortlink)) $disablesortlink = 0;
|
|||||||
// Loop to show all columns of extrafields for the title line
|
// Loop to show all columns of extrafields for the title line
|
||||||
if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
if (!empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
|
||||||
{
|
{
|
||||||
if (is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']))
|
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['label']) && is_array($extrafields->attributes[$extrafieldsobjectkey]['label']) && count($extrafields->attributes[$extrafieldsobjectkey]['label']))
|
||||||
{
|
{
|
||||||
if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.';
|
if (empty($extrafieldsobjectprefix)) $extrafieldsobjectprefix = 'ef.';
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||||||
{
|
{
|
||||||
$value = (GETPOSTISSET("options_".$tmpkeyextra) ? GETPOST("options_".$tmpkeyextra) : $object->array_options["options_".$tmpkeyextra]);
|
$value = (GETPOSTISSET("options_".$tmpkeyextra) ? GETPOST("options_".$tmpkeyextra) : $object->array_options["options_".$tmpkeyextra]);
|
||||||
} else {
|
} else {
|
||||||
$value = $object->array_options["options_".$tmpkeyextra];
|
$value = (!empty($object->array_options["options_".$tmpkeyextra]) ? $object->array_options["options_".$tmpkeyextra] : '');
|
||||||
//var_dump($tmpkeyextra.' - '.$value);
|
//var_dump($tmpkeyextra.' - '.$value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
|
|||||||
|
|
||||||
$html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : '';
|
$html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : '';
|
||||||
|
|
||||||
print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$tmpkeyextra.' wordbreak"'.($cols ? ' colspan="'.$cols.'"' : '').'>';
|
print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$tmpkeyextra.' wordbreak"'.(!empty($cols) ? ' colspan="'.$cols.'"' : '').'>';
|
||||||
|
|
||||||
// Convert date into timestamp format
|
// Convert date into timestamp format
|
||||||
if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date', 'datetime')))
|
if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date', 'datetime')))
|
||||||
|
|||||||
@ -81,9 +81,9 @@ $(document).ready(function () {
|
|||||||
<!-- Title with version -->
|
<!-- Title with version -->
|
||||||
<div class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
|
<div class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
|
||||||
<?php
|
<?php
|
||||||
if ($disablenofollow) echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank">';
|
if (!empty($disablenofollow)) echo '<a class="login_table_title" href="https://www.dolibarr.org" target="_blank">';
|
||||||
echo dol_escape_htmltag($title);
|
echo dol_escape_htmltag($title);
|
||||||
if ($disablenofollow) echo '</a>';
|
if (!empty($disablenofollow)) echo '</a>';
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ if ($disablenofollow) echo '</a>';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($captcha) {
|
if (!empty($captcha)) {
|
||||||
// Add a variable param to force not using cache (jmobile)
|
// Add a variable param to force not using cache (jmobile)
|
||||||
$php_self = preg_replace('/[&\?]time=(\d+)/', '', $php_self); // Remove param time
|
$php_self = preg_replace('/[&\?]time=(\d+)/', '', $php_self); // Remove param time
|
||||||
if (preg_match('/\?/', $php_self)) $php_self .= '&time='.dol_print_date(dol_now(), 'dayhourlog');
|
if (preg_match('/\?/', $php_self)) $php_self .= '&time='.dol_print_date(dol_now(), 'dayhourlog');
|
||||||
@ -200,7 +200,7 @@ if (!empty($morelogincontent)) {
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<?php if ($message) { ?>
|
<?php if (!empty($message)) { ?>
|
||||||
<div class="center login_main_message">
|
<div class="center login_main_message">
|
||||||
<?php echo dol_htmloutput_mesg($message, '', '', 1); ?>
|
<?php echo dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1182,7 +1182,7 @@ class Parsedown
|
|||||||
'src' => $Link['element']['attributes']['href'],
|
'src' => $Link['element']['attributes']['href'],
|
||||||
'alt' => $Link['element']['text'],
|
'alt' => $Link['element']['text'],
|
||||||
// @CHANGE LDR
|
// @CHANGE LDR
|
||||||
'class' => $Link['element']['attributes']['class']
|
'class' => (!empty($Link['element']['attributes']['class']) ? $Link['element']['attributes']['class'] : '')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -312,7 +312,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
|||||||
$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||||
$boxstatItem .= '<div class="boxstats">';
|
$boxstatItem .= '<div class="boxstats">';
|
||||||
$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
|
$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
|
||||||
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).'</span>';
|
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.(!empty($board->nb[$val]) ? $board->nb[$val] : 0).'</span>';
|
||||||
$boxstatItem .= '</div>';
|
$boxstatItem .= '</div>';
|
||||||
$boxstatItem .= '</a>';
|
$boxstatItem .= '</a>';
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
// get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links
|
// get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links
|
||||||
$keyIndex = array_search($globalStatsKey, $keys);
|
$keyIndex = array_search($globalStatsKey, $keys);
|
||||||
|
|
||||||
$classe = $classes[$keyIndex];
|
$classe = (!empty($classes[$keyIndex]) ? $classes[$keyIndex] : '');
|
||||||
if (isset($boardloaded[$classe]) && is_object($boardloaded[$classe]))
|
if (isset($boardloaded[$classe]) && is_object($boardloaded[$classe]))
|
||||||
{
|
{
|
||||||
$groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey] ? $boardloaded[$classe]->nb[$globalStatsKey] : 0;
|
$groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey] ? $boardloaded[$classe]->nb[$globalStatsKey] : 0;
|
||||||
@ -762,7 +762,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($showweather && !empty($isIntopOpenedDashBoard)) {
|
if ($showweather && !empty($isIntopOpenedDashBoard)) {
|
||||||
$appendClass = $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : '';
|
$appendClass = (!empty($conf->global->MAIN_DISABLE_METEO) && $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : '');
|
||||||
$weather = getWeatherStatus($totallate);
|
$weather = getWeatherStatus($totallate);
|
||||||
|
|
||||||
$text = '';
|
$text = '';
|
||||||
@ -889,7 +889,7 @@ print '<div class="fichecenter fichecenterbis">';
|
|||||||
* Show widgets (boxes)
|
* Show widgets (boxes)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$boxlist .= '<div class="twocolumns">';
|
$boxlist = '<div class="twocolumns">';
|
||||||
|
|
||||||
$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
|
$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
|
||||||
if (!empty($nbworkboardcount))
|
if (!empty($nbworkboardcount))
|
||||||
@ -914,7 +914,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($boxstatFromHook) || !empty($boxstatItems)) {
|
if (!empty($boxstatFromHook) || !empty($boxstatItems)) {
|
||||||
$boxstat .= '<!-- Database statistics -->'."\n";
|
$boxstat = '<!-- Database statistics -->'."\n";
|
||||||
$boxstat .= '<div class="box">';
|
$boxstat .= '<div class="box">';
|
||||||
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable boxtablenobottom nohover widgetstats" width="100%">';
|
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable boxtablenobottom nohover widgetstats" width="100%">';
|
||||||
$boxstat .= '<tr class="liste_titre box_titre">';
|
$boxstat .= '<tr class="liste_titre box_titre">';
|
||||||
|
|||||||
@ -148,7 +148,7 @@ if ($object->client)
|
|||||||
if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
|
if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract'] = $langs->transnoentitiesnoconv('Contracts');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions');
|
if (!empty($conf->ficheinter->enabled) && !empty($user->rights->ficheinter->lire)) $elementTypeArray['fichinter'] = $langs->transnoentitiesnoconv('Interventions');
|
||||||
|
|
||||||
if ($object->fournisseur)
|
if ($object->fournisseur)
|
||||||
{
|
{
|
||||||
@ -606,9 +606,10 @@ if ($sql_select)
|
|||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
} elseif (empty($type_element) || $type_element == -1)
|
}
|
||||||
|
elseif (empty($type_element) || $type_element == -1)
|
||||||
{
|
{
|
||||||
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', (!empty($num) ? $num : 0), '', '');
|
||||||
|
|
||||||
print '<table class="liste centpercent">'."\n";
|
print '<table class="liste centpercent">'."\n";
|
||||||
// Titles with sort buttons
|
// Titles with sort buttons
|
||||||
|
|||||||
@ -99,7 +99,7 @@ if ($cancel)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$parameters = array('id'=>$socid, 'objcanvas'=>$objcanvas);
|
$parameters = array('id'=>$socid);
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
@ -937,7 +937,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
$customerstripe = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
||||||
if ($customerstripe->id) {
|
if (!empty($customerstripe->id)) {
|
||||||
// When using the Charge API architecture
|
// When using the Charge API architecture
|
||||||
if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION))
|
if (empty($conf->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user