dolibarr  16.0.5
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.'/imports/class/import.class.php';
26 
27 // Load translation files required by the page
28 $langs->load("exports");
29 
30 if (!$user->socid == 0) {
32 }
33 
34 $import = new Import($db);
35 $import->load_arrays($user);
36 
37 
38 /*
39  * View
40  */
41 
42 $form = new Form($db);
43 
44 llxHeader('', $langs->trans("ImportArea"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones');
45 
46 print load_fiche_titre($langs->trans("ImportArea"));
47 
48 print $langs->trans("FormatedImportDesc1").'<br>';
49 print '<br>';
50 
51 
52 print '<div class="center">';
53 if (count($import->array_import_code)) {
54  print dolGetButtonTitle($langs->trans('NewImport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/imports/import.php?leftmenu=import');
55 }
56 print '</div>';
57 print '<br>';
58 
59 
60 // List of available import format
61 print '<div class="div-table-responsive-no-min">';
62 print '<table class="noborder centpercent">';
63 print '<tr class="liste_titre">';
64 print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
65 print '<td>'.$langs->trans("LibraryShort").'</td>';
66 print '<td class="right">'.$langs->trans("LibraryVersion").'</td>';
67 print '</tr>';
68 
69 include_once DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php';
70 $model = new ModeleImports();
71 $list = $model->liste_modeles($db);
72 
73 foreach ($list as $key) {
74  print '<tr class="oddeven">';
75  print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>';
76  $text = $model->getDriverDescForKey($key);
77  print '<td>'.$form->textwithpicto($model->getDriverLabelForKey($key), $text).'</td>';
78  print '<td>'.$model->getLibLabelForKey($key).'</td>';
79  print '<td class="nowrap right">'.$model->getLibVersionForKey($key).'</td>';
80  print '</tr>';
81 }
82 
83 print '</table>';
84 print '</div>';
85 
86 
87 // End of page
88 llxFooter();
89 $db->close();
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
Import
Class to manage imports.
Definition: import.class.php:30
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
llxFooter
llxFooter()
Footer empty.
Definition: index.php:71
dolGetButtonTitle
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.
Definition: functions.lib.php:10605
ModeleImports
Parent class for import file readers.
Definition: modules_import.php:31
llxHeader
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
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