1<?php 2/* Copyright (C) 2003-2008 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> 5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 6 * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> 7 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> 8 * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es> 9 * Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com> 10 * Copyright (C) 2020 Floriazn Henry <florian.henry@atm-consulting.fr> 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; either version 3 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program. If not, see <https://www.gnu.org/licenses/>. 24 */ 25 26/** 27 * \file htdocs/admin/import.php 28 * \ingroup import 29 * \brief config page module import 30 */ 31 32require '../main.inc.php'; 33require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; 34 35// Load translation files required by the page 36$langs->loadLangs(array('admin', 'exports', 'other')); 37 38if (!$user->admin) 39 accessforbidden(); 40 41$action = GETPOST('action', 'aZ09'); 42$value = GETPOST('value', 'alpha'); 43 44/* 45 * Actions 46 */ 47 48include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; 49 50 51/* 52 * View 53 */ 54 55$form = new Form($db); 56 57$page_name = "ImportSetup"; 58llxHeader('', $langs->trans($page_name)); 59 60// Subheader 61$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>'; 62 63print load_fiche_titre($langs->trans($page_name), $linkback); 64 65//$head = export_admin_prepare_head(); 66$h = 0; 67$head = array(); 68$head[$h][0] = DOL_URL_ROOT.'/admin/import.php'; 69$head[$h][1] = $langs->trans("Setup"); 70$head[$h][2] = 'setup'; 71$h++; 72 73print dol_get_fiche_head($head, 'setup', $langs->trans("ImportArea"), -1, "technic"); 74 75print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; 76print '<input type="hidden" name="token" value="'.newToken().'">'; 77print '<input type="hidden" name="action" value="setModuleOptions">'; 78print '<input type="hidden" name="param" value="IMPORT_CSV_SEPARATOR_TO_USE">'; 79 80print '<table class="noborder centpercent">'; 81print '<tr class="liste_titre">'; 82print '<td>'.$langs->trans("Parameters").'</td>'."\n"; 83print '<td class="center" width="20"> </td>'; 84print '<td class="center" width="100"></td>'."\n"; 85 86print '<tr class="oddeven">'; 87print '<td>'.$langs->trans("ImportCsvSeparator").' ('.$langs->trans("ByDefault").')</td>'; 88print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".(empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE) ? ',' : $conf->global->IMPORT_CSV_SEPARATOR_TO_USE)."\"></td>"; 89print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; 90print '</td></tr>'; 91 92print '</table>'; 93 94print '</form>'; 95 96print dol_get_fiche_end(); 97 98// End of page 99llxFooter(); 100$db->close(); 101