dolibarr  19.0.0-dev
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 
24 require_once '../main.inc.php';
25 require_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 
46 llxHeader('', $langs->trans("ExportsArea"), $help_url);
47 
48 print load_fiche_titre($langs->trans("ExportsArea"));
49 
50 print $langs->trans("FormatedExportDesc1").'<br>';
51 print '<br>';
52 
53 
54 print '<div class="center">';
55 if (count($export->array_export_code)) {
56  print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->rights->export->creer);
57 }
58 print '</div>';
59 print '<br>';
60 
61 
62 
63 // List of available export formats
64 
65 print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
66 print '<table class="noborder centpercent">';
67 print '<tr class="liste_titre">';
68 print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
69 print '<td>'.$langs->trans("LibraryShort").'</td>';
70 print '<td class="right">'.$langs->trans("LibraryVersion").'</td>';
71 print '</tr>';
72 
73 include_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 
77 foreach ($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 
92 print '</table>';
93 print '</div>';
94 
95 // End of page
96 llxFooter();
97 $db->close();
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:118
Class to manage exports.
Class to manage generation of HTML components Only common components must be here.
Parent class for export modules.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
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.
llxFooter()
Footer empty.
Definition: index.php:71
if(!defined('NOTOKENRENEWAL')) if(!defined('NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined('NOIPCHECK')) if(!defined('NOBROWSERNOTIF')) llxHeader()
Header empty.
Definition: index.php:63
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.