dolibarr 21.0.0-beta
import.php
Go to the documentation of this file.
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 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <https://www.gnu.org/licenses/>.
25 */
26
33// Load Dolibarr environment
34require '../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
36
45// Load translation files required by the page
46$langs->loadLangs(array('admin', 'exports', 'other'));
47
48if (!$user->admin) {
50}
51
52$action = GETPOST('action', 'aZ09');
53$value = GETPOST('value', 'alpha');
54$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
55
56
57/*
58 * Actions
59 */
60
61include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
62
63
64/*
65 * View
66 */
67
68$form = new Form($db);
69
70$page_name = "ImportSetup";
71llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-import');
72
73// Subheader
74$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
75
76print load_fiche_titre($langs->trans($page_name), $linkback);
77
78//$head = export_admin_prepare_head();
79$h = 0;
80$head = array();
81$head[$h][0] = DOL_URL_ROOT.'/admin/import.php';
82$head[$h][1] = $langs->trans("Setup");
83$head[$h][2] = 'setup';
84$h++;
85
86print dol_get_fiche_head($head, 'setup', $langs->trans("ImportArea"), -1, "technic");
87
88print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
89print '<input type="hidden" name="token" value="'.newToken().'">';
90print '<input type="hidden" name="page_y" value="">';
91print '<input type="hidden" name="action" value="setModuleOptions">';
92print '<input type="hidden" name="param" value="IMPORT_CSV_SEPARATOR_TO_USE">';
93
94print '<table class="noborder centpercent">';
95print '<tr class="liste_titre">';
96print '<td>'.$langs->trans("Parameters").'</td>'."\n";
97print '<td class="center" width="20">&nbsp;</td>';
98print '<td class="center" width="100"></td>'."\n";
99
100print '<tr class="oddeven">';
101print '<td>'.$langs->trans("ImportCsvSeparator").' ('.$langs->trans("ByDefault").')</td>';
102print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".(!getDolGlobalString('IMPORT_CSV_SEPARATOR_TO_USE') ? ',' : $conf->global->IMPORT_CSV_SEPARATOR_TO_USE)."\"></td>";
103print '<td class="right"><input type="submit" class="button button-edit reposition" value="'.$langs->trans("Modify").'"></td>';
104print '</td></tr>';
105
106print '</table>';
107
108print '</form>';
109
110print dol_get_fiche_end();
111
112// End of page
113llxFooter();
114$db->close();
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.
Definition wrapper.php:71
Class to manage generation of HTML components Only common components must be here.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.