dolibarr  13.0.2
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 // Security check
31 $result = restrictedArea($user, 'export');
32 
33 $export = new Export($db);
34 $export->load_arrays($user);
35 
36 /*
37  * View
38  */
39 
40 $form = new Form($db);
41 
42 llxHeader('', $langs->trans("ExportsArea"), 'EN:Module_Exports_En|FR:Module_Exports|ES:M&oacute;dulo_Exportaciones');
43 
44 print load_fiche_titre($langs->trans("ExportsArea"));
45 
46 print $langs->trans("FormatedExportDesc1").'<br>';
47 print '<br>';
48 
49 
50 print '<div class="center">';
51 if (count($export->array_export_code))
52 {
53  print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->rights->export->creer);
54 }
55 print '</div>';
56 print '<br>';
57 
58 
59 
60 // List of available export formats
61 
62 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
63 print '<table class="noborder centpercent">';
64 print '<tr class="liste_titre">';
65 print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
66 print '<td>'.$langs->trans("LibraryShort").'</td>';
67 print '<td class="right">'.$langs->trans("LibraryVersion").'</td>';
68 print '</tr>';
69 
70 include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
71 $model = new ModeleExports($db);
72 $liste = $model->liste_modeles($db); // This is not a static method for exports because method load non static properties
73 
74 foreach ($liste as $key => $val)
75 {
76  if (preg_match('/__\(Disabled\)__/', $liste[$key]))
77  {
78  $liste[$key] = preg_replace('/__\(Disabled\)__/', '('.$langs->transnoentitiesnoconv("Disabled").')', $liste[$key]);
79  }
80 
81  print '<tr class="oddeven">';
82  print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>';
83  $text = $model->getDriverDescForKey($key);
84  $label = $liste[$key];
85  print '<td>'.$form->textwithpicto($label, $text).'</td>';
86  print '<td>'.$model->getLibLabelForKey($key).'</td>';
87  print '<td class="nowrap right">'.$model->getLibVersionForKey($key).'</td>';
88  print '</tr>';
89 }
90 
91 print '</table>';
92 print '</div>';
93 
94 // End of page
95 llxFooter();
96 $db->close();
Parent class for export modules.
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.
Class to manage exports.
llxHeader()
Empty header.
Definition: wrapper.php:45
Class to manage generation of HTML components Only common components must be here.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
print
Draft customers invoices.
Definition: index.php:89
llxFooter()
Empty footer.
Definition: wrapper.php:59