26 require
'../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
32 $langs->loadLangs(array(
"users",
"admin",
"other"));
37 $action =
GETPOST(
'action',
'aZ09');
45 if (preg_match(
'/set_([a-z0-9_\-]+)/i', $action, $reg))
51 Header(
"Location: ".
$_SERVER[
"PHP_SELF"]);
56 } elseif (preg_match(
'/del_([a-z0-9_\-]+)/i', $action, $reg)) {
60 Header(
"Location: ".
$_SERVER[
"PHP_SELF"]);
65 } elseif ($action ==
'updateform')
67 $res1 =
dolibarr_set_const($db,
"MAIN_APPLICATION_TITLE",
GETPOST(
"MAIN_APPLICATION_TITLE",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
68 $res2 =
dolibarr_set_const($db,
"MAIN_SESSION_TIMEOUT",
GETPOST(
"MAIN_SESSION_TIMEOUT",
'alphanohtml'),
'chaine', 0,
'', $conf->entity);
69 if ($res1 && $res2)
setEventMessages($langs->trans(
"RecordModifiedSuccessfully"), null,
'mesgs');
78 $form =
new Form($db);
80 $wikihelp =
'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
85 print '<span class="opacitymedium">'.$langs->trans(
"MiscellaneousDesc").
"</span><br>\n";
90 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
91 print '<input type="hidden" name="token" value="'.newToken().
'">';
92 print '<input type="hidden" name="action" value="updateform">';
100 print '<table class="noborder centpercent">';
101 print '<tr class="liste_titre">';
102 print '<td colspan="3">'.$langs->trans(
"Parameters").
'</td>';
103 print '<td class="right" width="100">'.$langs->trans(
"Status").
'</td>';
107 print '<tr class="oddeven">';
108 print '<td colspan="3">'.$langs->trans(
"UseCaptchaCode").
'</td>';
109 print '<td class="right">';
110 if (function_exists(
"imagecreatefrompng"))
112 if (!empty($conf->use_javascript_ajax))
116 if (empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
118 print '<a href="'.$_SERVER[
'PHP_SELF'].
'?action=set_MAIN_SECURITY_ENABLECAPTCHA&token='.
newToken().
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
120 print '<a href="'.$_SERVER[
'PHP_SELF'].
'?action=del_MAIN_SECURITY_ENABLECAPTCHA&token='.
newToken().
'">'.
img_picto($langs->trans(
"Enabled"),
'on').
'</a>';
124 $desc = $form->textwithpicto(
'', $langs->transnoentities(
"EnableGDLibraryDesc"), 1,
'warning');
130 print '<tr class="oddeven">';
131 print '<td colspan="3">'.$langs->trans(
"UseAdvancedPerms").
'</td>';
132 print '<td class="right">';
133 if (!empty($conf->use_javascript_ajax))
137 if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
139 print '<a href="'.$_SERVER[
'PHP_SELF'].
'?action=set_MAIN_USE_ADVANCED_PERMS&token='.
newToken().
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
141 print '<a href="'.$_SERVER[
'PHP_SELF'].
'?action=del_MAIN_USE_ADVANCED_PERMS&token='.
newToken().
'">'.
img_picto($langs->trans(
"Enabled"),
'on').
'</a>';
153 print '<table width="100%" class="noborder">';
154 print '<tr class="liste_titre">';
155 print '<td colspan="2">'.$langs->trans(
"Parameters").
'</td>';
156 print '<td>'.$langs->trans(
"Value").
'</td>';
160 $sessiontimeout = ini_get(
"session.gc_maxlifetime");
161 if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT = $sessiontimeout;
162 print '<tr class="oddeven">';
163 print '<td>'.$langs->trans(
"SessionTimeOut").
'</td><td class="right">';
164 if (ini_get(
"session.gc_probability") == 0) {
165 print $form->textwithpicto(
'', $langs->trans(
"SessionsPurgedByExternalSystem", ini_get(
"session.gc_maxlifetime")));
167 print $form->textwithpicto(
'', $langs->trans(
"SessionExplanation", ini_get(
"session.gc_probability"), ini_get(
"session.gc_divisor"), ini_get(
"session.gc_maxlifetime")));
170 print '<td class="nowrap">';
171 print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).
'"> '.strtolower($langs->trans(
"Seconds"));
176 if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE =
"";
177 print
'<tr class="oddeven">';
178 print
'<td>'.$langs->trans(
"MAIN_APPLICATION_TITLE").
'</td><td class="right">';
180 print
'<td class="nowrap">';
181 print
'<input class="flat" name="MAIN_APPLICATION_TITLE" type="text" size="20" value="'.htmlentities($conf->global->MAIN_APPLICATION_TITLE).
'"> ';
189 print
'<div class="center"><input type="submit" class="button" name="button" value="'.$langs->trans(
"Modify").
'"></div>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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).
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save"&&empty($cancel)) $wikihelp
View.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0)
On/off button for constant.
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 ...
security_prepare_head()
Prepare array with list of tabs.
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.