dolibarr 19.0.3
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
24require_once '../main.inc.php';
25require_once DOL_DOCUMENT_ROOT.'/exports/class/export.class.php';
26
27// Load translation files required by the page
28$langs->load("exports");
29
30$export = new Export($db);
31$export->load_arrays($user);
32
33// Security check
34$result = restrictedArea($user, 'export');
35
36
37/*
38 * View
39 */
40
41$form = new Form($db);
42
43
44$help_url = 'EN:Module_Exports_En|FR:Module_Exports|ES:M&oacute;dulo_Exportaciones|DE:Modul_DatenExporte';
45
46llxHeader('', $langs->trans("ExportsArea"), $help_url);
47
48print load_fiche_titre($langs->trans("ExportsArea"));
49
50print $langs->trans("FormatedExportDesc1").'<br>';
51print '<br>';
52
53
54print '<div class="center">';
55if (count($export->array_export_code)) {
56 print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->hasRight('export', 'creer'));
57}
58print '</div>';
59print '<br>';
60
61
62
63// List of available export formats
64
65print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
66print '<table class="noborder centpercent">';
67print '<tr class="liste_titre">';
68print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
69print '<td>'.$langs->trans("LibraryShort").'</td>';
70print '<td class="right">'.$langs->trans("LibraryVersion").'</td>';
71print '</tr>';
72
73include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
74$model = new ModeleExports($db);
75$liste = $model->listOfAvailableExportFormat($db); // This is not a static method for exports because method load non static properties
76
77foreach ($liste as $key => $val) {
78 if (preg_match('/__\‍(Disabled\‍)__/', $liste[$key])) {
79 $liste[$key] = preg_replace('/__\‍(Disabled\‍)__/', '('.$langs->transnoentitiesnoconv("Disabled").')', $liste[$key]);
80 }
81
82 print '<tr class="oddeven">';
83 print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>';
84 $text = $model->getDriverDescForKey($key);
85 $label = $liste[$key];
86 print '<td>'.$form->textwithpicto($label, $text).'</td>';
87 print '<td>'.$model->getLibLabelForKey($key).'</td>';
88 print '<td class="nowrap right">'.$model->getLibVersionForKey($key).'</td>';
89 print '</tr>';
90}
91
92print '</table>';
93print '</div>';
94
95// End of page
96llxFooter();
97$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage exports.
Class to manage generation of HTML components Only common components must be here.
Parent class for export modules.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.