* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * \file htdocs/admin/proxy.php * \ingroup core * \brief Page setup proxy to use for external web access * \version $Id: proxy.php,v 1.6 2011/07/29 21:04:27 eldy Exp $ */ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); $langs->load("users"); $langs->load("admin"); $langs->load("other"); if (!$user->admin) accessforbidden(); $upload_dir=$conf->admin->dir_temp; /* * Actions */ if (GETPOST("action") == 'set_proxy') { $result=0; $result+=dolibarr_set_const($db, 'MAIN_USE_CONNECT_TIMEOUT', $_POST["MAIN_USE_CONNECT_TIMEOUT"], 'chaine',0,'',$conf->entity); $result+=dolibarr_set_const($db, 'MAIN_USE_RESPONSE_TIMEOUT', $_POST["MAIN_USE_RESPONSE_TIMEOUT"], 'chaine',0,'',$conf->entity); $result+=dolibarr_set_const($db, 'MAIN_PROXY_USE', $_POST["MAIN_PROXY_USE"], 'chaine',0,'',$conf->entity); $result+=dolibarr_set_const($db, 'MAIN_PROXY_HOST',$_POST["MAIN_PROXY_HOST"],'chaine',0,'',$conf->entity); $result+=dolibarr_set_const($db, 'MAIN_PROXY_PORT',$_POST["MAIN_PROXY_PORT"],'chaine',0,'',$conf->entity); $result+=dolibarr_set_const($db, 'MAIN_PROXY_USER',$_POST["MAIN_PROXY_USER"],'chaine',0,'',$conf->entity); $result+=dolibarr_set_const($db, 'MAIN_PROXY_PASS',$_POST["MAIN_PROXY_PASS"],'chaine',0,'',$conf->entity); if ($result < 5) { dol_print_error($db); } else { $mesg='