26require
'../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
31$langs->loadLangs(array(
"other",
"users",
"admin"));
37$upload_dir = $conf->admin->dir_temp;
44if (
GETPOST(
'action',
'aZ09') ==
'set_proxy') {
45 if (
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT") && !is_numeric(
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT"))) {
49 if (
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT") && !is_numeric(
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT"))) {
56 $result +=
dolibarr_set_const($db,
'MAIN_USE_CONNECT_TIMEOUT',
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT"),
'chaine', 0,
'', $conf->entity);
57 $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');
80$wikihelp =
'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
81llxHeader(
'', $langs->trans(
"Proxy"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-proxy');
85print
'<span class="opacitymedium">'.$langs->trans(
"ProxyDesc").
"</span><br>\n";
90print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
91print
'<input type="hidden" name="token" value="'.newToken().
'">';
92print
'<input type="hidden" name="action" value="set_proxy">';
101if ($conf->use_javascript_ajax) {
102 print
"\n".
'<script type="text/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";
126print
'<table class="centpercent noborder">';
128print
'<tr class="liste_titre">';
129print
'<td colspan="2">'.$langs->trans(
"Parameters").
'</td>';
130print
'<td width="200"></td>';
134print
'<tr class="oddeven">';
135print
'<td>'.$langs->trans(
"ConnectionTimeout").
'</td><td class="right">';
137print
'<td class="nowrap">';
138print
'<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).
'">';
139print
' '.strtolower($langs->trans(
"Seconds"));
144print
'<tr class="oddeven">';
145print
'<td>'.$langs->trans(
"ResponseTimeout").
'</td><td class="right">';
147print
'<td class="nowrap">';
148print
'<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="' .
getDolGlobalString(
'MAIN_USE_RESPONSE_TIMEOUT').
'">';
149print
' '.strtolower($langs->trans(
"Seconds"));
154print
'<tr class="oddeven">';
155print
'<td>'.$langs->trans(
"MAIN_PROXY_USE").
'</td><td class="right">';
157print
'<td class="nowrap">';
158print $form->selectyesno(
'MAIN_PROXY_USE', (
getDolGlobalString(
'MAIN_PROXY_USE') ? $conf->global->MAIN_PROXY_USE : 0), 1);
163print
'<tr class="oddeven">';
164print
'<td>'.$langs->trans(
"MAIN_PROXY_HOST").
'</td><td class="right">';
166print
'<td class="nowrap">';
167print
'<input class="flat" name="MAIN_PROXY_HOST" type="text" size="16" value="'.(getDolGlobalString(
'MAIN_PROXY_HOST') ? $conf->global->MAIN_PROXY_HOST :
'').
'">';
172print
'<tr class="oddeven">';
173print
'<td>'.$langs->trans(
"MAIN_PROXY_PORT").
'</td><td class="right">';
175print
'<td class="nowrap">';
176print
'<input class="flat" name="MAIN_PROXY_PORT" type="text" size="4" value="'.(getDolGlobalString(
'MAIN_PROXY_PORT') ? $conf->global->MAIN_PROXY_PORT :
'').
'">';
181print
'<tr class="oddeven">';
182print
'<td>'.$langs->trans(
"MAIN_PROXY_USER").
'</td><td class="right">';
184print
'<td class="nowrap">';
185print
'<input class="flat" name="MAIN_PROXY_USER" type="text" size="16" value="'.(getDolGlobalString(
'MAIN_PROXY_USER') ? $conf->global->MAIN_PROXY_USER :
'').
'">';
190print
'<tr class="oddeven">';
191print
'<td>'.$langs->trans(
"MAIN_PROXY_PASS").
'</td><td class="right">';
193print
'<td class="nowrap">';
194print
'<input class="flat" name="MAIN_PROXY_PASS" type="text" size="16" value="'.(getDolGlobalString(
'MAIN_PROXY_PASS') ? $conf->global->MAIN_PROXY_PASS :
'').
'">';
200print $form->buttonsSaveCancel(
"Modify",
'');
security_prepare_head()
Prepare array with list of tabs.
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(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.