27require
'../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
39$langs->loadLangs(array(
"other",
"users",
"admin"));
45$upload_dir =
$conf->admin->dir_temp;
53if (
GETPOST(
'action',
'aZ09') ==
'set_proxy') {
54 if (
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT") && !is_numeric(
GETPOST(
"MAIN_USE_CONNECT_TIMEOUT"))) {
58 if (
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT") && !is_numeric(
GETPOST(
"MAIN_USE_RESPONSE_TIMEOUT"))) {
78 setEventMessages($langs->trans(
"RecordModifiedSuccessfully"),
null,
'mesgs');
89$wikihelp =
'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
90llxHeader(
'', $langs->trans(
"Proxy"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-proxy');
94print
'<div class="info">'.$langs->trans(
"ProxyDesc").
"</div>\n";
97print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST" spellcheck="false">';
98print
'<input type="hidden" name="token" value="'.newToken().
'">';
99print
'<input type="hidden" name="action" value="set_proxy">';
108if (
$conf->use_javascript_ajax) {
109 print
"\n".
'<script type="text/javascript">';
110 print
'jQuery(document).ready(function () {
111 function initfields()
113 if (jQuery("#MAIN_PROXY_USE").val()==\'1\')
115 jQuery(".drag").show();
117 if (jQuery("#MAIN_PROXY_USE").val()==\'0\')
119 jQuery(".drag").hide();
123 jQuery("#MAIN_PROXY_USE").change(function() {
127 print
'</script>'.
"\n";
133print
'<table class="centpercent noborder">';
135print
'<tr class="liste_titre">';
136print
'<td colspan="2">'.$langs->trans(
"Parameters").
'</td>';
137print
'<td width="200"></td>';
141print
'<tr class="oddeven">';
142print
'<td>'.$langs->trans(
"ConnectionTimeout").
'</td><td class="right">';
144print
'<td class="nowrap">';
145print
'<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).
'">';
146print
' '.strtolower($langs->trans(
"Seconds"));
151print
'<tr class="oddeven">';
152print
'<td>'.$langs->trans(
"ResponseTimeout").
'</td><td class="right">';
154print
'<td class="nowrap">';
155print
'<input class="flat" name="MAIN_USE_RESPONSE_TIMEOUT" type="text" size="4" value="' .
getDolGlobalString(
'MAIN_USE_RESPONSE_TIMEOUT').
'">';
156print
' '.strtolower($langs->trans(
"Seconds"));
161print
'<tr class="oddeven">';
162print
'<td>'.$langs->trans(
"MAIN_PROXY_USE").
'</td><td class="right">';
164print
'<td class="nowrap">';
165print $form->selectyesno(
'MAIN_PROXY_USE',
getDolGlobalInt(
'MAIN_PROXY_USE'), 1);
170print
'<tr class="oddeven">';
171print
'<td>'.$langs->trans(
"MAIN_PROXY_HOST").
'</td><td class="right">';
173print
'<td class="nowrap">';
174print
'<input class="flat" name="MAIN_PROXY_HOST" type="text" size="16" value="'.getDolGlobalString(
'MAIN_PROXY_HOST').
'">';
179print
'<tr class="oddeven">';
180print
'<td>'.$langs->trans(
"MAIN_PROXY_PORT").
'</td><td class="right">';
182print
'<td class="nowrap">';
183print
'<input class="flat" name="MAIN_PROXY_PORT" type="text" size="4" value="'.getDolGlobalInt(
'MAIN_PROXY_PORT').
'">';
188print
'<tr class="oddeven">';
189print
'<td>'.$langs->trans(
"MAIN_PROXY_USER").
'</td><td class="right">';
191print
'<td class="nowrap">';
192print
'<input class="flat" name="MAIN_PROXY_USER" type="text" size="16" value="'.getDolGlobalString(
'MAIN_PROXY_USER').
'">';
197print
'<tr class="oddeven">';
198print
'<td>'.$langs->trans(
"MAIN_PROXY_PASS").
'</td><td class="right">';
200print
'<td class="nowrap">';
201print
'<input class="flat" name="MAIN_PROXY_PASS" type="password" size="16" value="'.getDolGlobalString(
'MAIN_PROXY_PASS').
'">';
207print $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).
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
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.