dolibarr 21.0.0-beta
export.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) 2024 Frédéric France <frederic.france@free.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
32// Load Dolibarr environment
33require '../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
35
44// Load translation files required by the page
45$langs->loadLangs(array('admin', 'exports', 'other'));
46
47if (!$user->admin) {
49}
50
51$action = GETPOST('action', 'aZ09');
52
53
54/*
55 * Actions
56 */
57
58if ($action == 'save') {
59 dolibarr_set_const($db, 'EXPORT_CSV_SEPARATOR_TO_USE', GETPOST('EXPORT_CSV_SEPARATOR_TO_USE', 'alphanohtml'), 'chaine', 0, '', $conf->entity);
60}
61
62
63/*
64 * View
65 */
66
67$form = new Form($db);
68
69$page_name = "ExportSetup";
70llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-export');
71
72// Subheader
73$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
74
75print load_fiche_titre($langs->trans($page_name), $linkback);
76
77//$head = export_admin_prepare_head();
78$h = 0;
79$head = array();
80$head[$h][0] = DOL_URL_ROOT.'/admin/export.php';
81$head[$h][1] = $langs->trans("Setup");
82$head[$h][2] = 'setup';
83$h++;
84
85print dol_get_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "technic");
86
87print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
88print '<input type="hidden" name="token" value="'.newToken().'">';
89print '<input type="hidden" name="action" value="save">';
90
91print '<table class="noborder centpercent">';
92
93print '<tr class="liste_titre">';
94print '<td>'.$langs->trans("Parameters").'</td>'."\n";
95print '<td class="center" width="20">&nbsp;</td>';
96print '<td class="center" width="100"></td>'."\n";
97print '</tr>';
98
99/* No more need for this, you can set that a profile is public when saving it.
100print '<tr class="oddeven">';
101print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
102print '<td class="center" width="20">&nbsp;</td>';
103print '<td class="center" width="100">';
104print ajax_constantonoff('EXPORTS_SHARE_MODELS');
105print '</td></tr>';
106*/
107
108print '<tr class="oddeven">';
109print '<td>'.$langs->trans("ExportCsvSeparator").'</td>';
110print '<td width="60" align="center"><input class="flat width50" maxlength="3" type="text" name="EXPORT_CSV_SEPARATOR_TO_USE" value="'.(!getDolGlobalString('EXPORT_CSV_SEPARATOR_TO_USE') ? ',' : $conf->global->EXPORT_CSV_SEPARATOR_TO_USE).'"></td>';
111print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
112print '</tr>';
113
114print '</table>';
115
116print '</form>';
117
118print dol_get_fiche_end();
119
120// End of page
121llxFooter();
122$db->close();
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.
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.