dolibarr  16.0.5
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  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <https://www.gnu.org/licenses/>.
23  */
24 
31 require '../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
33 
34 // Load translation files required by the page
35 $langs->loadLangs(array('admin', 'exports', 'other'));
36 
37 if (!$user->admin) {
39 }
40 
41 $action = GETPOST('action', 'aZ09');
42 
43 
44 /*
45  * Actions
46  */
47 
48 if ($action == 'save') {
49  dolibarr_set_const($db, 'EXPORT_CSV_SEPARATOR_TO_USE', GETPOST('EXPORT_CSV_SEPARATOR_TO_USE', 'alphanohtml'));
50 }
51 
52 
53 /*
54  * View
55  */
56 
57 $form = new Form($db);
58 
59 $page_name = "ExportSetup";
60 llxHeader('', $langs->trans($page_name));
61 
62 // Subheader
63 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
64 
65 print load_fiche_titre($langs->trans($page_name), $linkback);
66 
67 //$head = export_admin_prepare_head();
68 $h = 0;
69 $head = array();
70 $head[$h][0] = DOL_URL_ROOT.'/admin/export.php';
71 $head[$h][1] = $langs->trans("Setup");
72 $head[$h][2] = 'setup';
73 $h++;
74 
75 print dol_get_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "technic");
76 
77 print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
78 print '<input type="hidden" name="token" value="'.newToken().'">';
79 print '<input type="hidden" name="action" value="save">';
80 
81 print '<table class="noborder centpercent">';
82 
83 print '<tr class="liste_titre">';
84 print '<td>'.$langs->trans("Parameters").'</td>'."\n";
85 print '<td class="center" width="20">&nbsp;</td>';
86 print '<td class="center" width="100"></td>'."\n";
87 print '</tr>';
88 
89 /* No more need for this, you can set that a profile is public when saving it.
90 print '<tr class="oddeven">';
91 print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
92 print '<td class="center" width="20">&nbsp;</td>';
93 print '<td class="center" width="100">';
94 print ajax_constantonoff('EXPORTS_SHARE_MODELS');
95 print '</td></tr>';
96 */
97 
98 print '<tr class="oddeven">';
99 print '<td>'.$langs->trans("ExportCsvSeparator").'</td>';
100 print '<td width="60" align="center"><input class="flat width50" maxlength="3" type="text" name="EXPORT_CSV_SEPARATOR_TO_USE" value="'.(empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE) ? ',' : $conf->global->EXPORT_CSV_SEPARATOR_TO_USE).'"></td>';
101 print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
102 print '</tr>';
103 
104 print '</table>';
105 
106 print '</form>';
107 
108 print dol_get_fiche_end();
109 
110 // End of page
111 llxFooter();
112 $db->close();
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
dolibarr_set_const
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).
Definition: admin.lib.php:627
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59