Go to the documentation of this file.
25 require
'../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29 if (!empty($conf->accounting->enabled)) {
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
34 $langs->loadLangs(array(
'admin',
'loan'));
41 $action =
GETPOST(
'action',
'aZ09');
45 'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
46 'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
47 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
54 if ($action ==
'update') {
57 foreach ($list as $constname) {
58 $constvalue =
GETPOST($constname,
'alpha');
60 if (!
dolibarr_set_const($db, $constname, $constvalue,
'chaine', 0,
'', $conf->entity)) {
79 if (!empty($conf->accounting->enabled)) {
83 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
84 print
load_fiche_titre($langs->trans(
'ConfigLoan'), $linkback,
'title_setup');
86 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
87 print
'<input type="hidden" name="token" value="'.newToken().
'">';
88 print
'<input type="hidden" name="action" value="update">';
93 print
'<table class="noborder centpercent">';
94 print
'<tr class="liste_titre">';
95 print
'<td colspan="3">'.$langs->trans(
'Options').
'</td>';
98 foreach ($list as $key) {
99 print
'<tr class="oddeven value">';
102 $label = $langs->trans($key);
103 print
'<td><label for="'.$key.
'">'.$label.
'</label></td>';
107 if (!empty($conf->accounting->enabled)) {
110 print
'<input type="text" size="20" id="'.$key.
'" name="'.$key.
'" value="'.
getDolGlobalString($key).
'">';
120 print
'<br><div style="text-align:center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans(
'Modify').
'"></div>';
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.