25 require
'../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
30 $langs->loadLangs(array(
"other",
"users",
"admin"));
34 $upload_dir = $conf->admin->dir_temp;
41 if (
GETPOST(
'action',
'aZ09') ==
'set_proxy')
43 if (
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT") && !is_numeric(
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT")))
48 if (
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT") && !is_numeric(
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT")))
57 $result +=
dolibarr_set_const($db,
'MAIN_USE_CONNECT_TIMEOUT',
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT"),
'chaine', 0,
'', $conf->entity);
58 $result +=
dolibarr_set_const($db,
'MAIN_USE_RESPONSE_TIMEOUT',
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT"),
'chaine', 0,
'', $conf->entity);
69 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(
"ProxyDesc").
"</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="set_proxy">';
100 if ($conf->use_javascript_ajax)
102 print "\n".
'<script type="text/javascript" language="javascript">';
103 print 'jQuery(document).ready(function () {
104 function initfields()
106 if (jQuery("#MAIN_PROXY_USE").val()==\'1\')
108 jQuery(".drag").show();
110 if (jQuery("#MAIN_PROXY_USE").val()==\'0\')
112 jQuery(".drag").hide();
116 jQuery("#MAIN_PROXY_USE").change(function() {
120 print '</script>'.
"\n";
126 print '<table width="100%" class="noborder">';
128 print '<tr class="liste_titre">';
129 print '<td colspan="2">'.$langs->trans(
"Parameters").
'</td>';
130 print '<td width="200">'.$langs->trans(
"Value").
'</td>';
134 print '<tr class="oddeven">';
135 print '<td>'.$langs->trans(
"ConnectionTimeout").
'</td><td class="right">';
137 print '<td class="nowrap">';
138 print '<input class="flat" name="MAIN_USE_CONNECT_TIMEOUT" type="text" size="4" value="'.(GETPOSTISSET(
"MAIN_USE_CONNECT_TIMEOUT") ?
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT") : $conf->global->MAIN_USE_CONNECT_TIMEOUT).
'">';
139 print ' '.strtolower($langs->trans(
"Seconds"));
144 print '<tr class="oddeven">';
145 print '<td>'.$langs->trans(
"ResponseTimeout").
'</td><td class="right">';
147 print '<td class="nowrap">';
148 print '<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="'.$conf->global->MAIN_USE_RESPONSE_TIMEOUT.
'">';
149 print ' '.strtolower($langs->trans(
"Seconds"));
154 print '<tr class="oddeven">';
155 print '<td>'.$langs->trans(
"MAIN_PROXY_USE").
'</td><td class="right">';
157 print '<td class="nowrap">';
158 print $form->selectyesno(
'MAIN_PROXY_USE', $conf->global->MAIN_PROXY_USE, 1);
163 print '<tr class="oddeven">';
164 print '<td>'.$langs->trans(
"MAIN_PROXY_HOST").
'</td><td class="right">';
166 print '<td class="nowrap">';
167 print '<input class="flat" name="MAIN_PROXY_HOST" type="text" size="16" value="'.$conf->global->MAIN_PROXY_HOST.
'">';
172 print '<tr class="oddeven">';
173 print '<td>'.$langs->trans(
"MAIN_PROXY_PORT").
'</td><td class="right">';
175 print '<td class="nowrap">';
176 print '<input class="flat" name="MAIN_PROXY_PORT" type="text" size="4" value="'.$conf->global->MAIN_PROXY_PORT.
'">';
181 print '<tr class="oddeven">';
182 print '<td>'.$langs->trans(
"MAIN_PROXY_USER").
'</td><td class="right">';
184 print '<td class="nowrap">';
185 print '<input class="flat" name="MAIN_PROXY_USER" type="text" size="16" value="'.$conf->global->MAIN_PROXY_USER.
'">';
190 print '<tr class="oddeven">';
191 print '<td>'.$langs->trans(
"MAIN_PROXY_PASS").
'</td><td class="right">';
193 print '<td class="nowrap">';
194 print '<input class="flat" name="MAIN_PROXY_PASS" type="text" size="16" value="'.$conf->global->MAIN_PROXY_PASS.
'">';
202 print '<div class="center">';
203 print '<input type="submit" class="button" name="button" value="'.$langs->trans(
"Modify").
'">';
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.
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.
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...
dol_get_fiche_end($notab=0)
Return tab footer of a card.