dolibarr 21.0.0-beta
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
25require_once '../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.'/imports/class/import.class.php';
27
36// Load translation files required by the page
37$langs->load("exports");
38
39if (!$user->socid == 0) {
41}
42
43$import = new Import($db);
44$import->load_arrays($user);
45
46
47/*
48 * View
49 */
50
51$form = new Form($db);
52
53llxHeader('', $langs->trans("ImportArea"), 'EN:Module_Imports_En|FR:Module_Imports|ES:M&oacute;dulo_Importaciones');
54
55print load_fiche_titre($langs->trans("ImportArea"));
56
57print $langs->trans("FormatedImportDesc1").'<br>';
58print '<br>';
59
60
61print '<div class="center">';
62if (count($import->array_import_code)) {
63 print dolGetButtonTitle($langs->trans('NewImport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/imports/import.php?leftmenu=import');
64}
65print '</div>';
66print '<br>';
67
68
69// List of available import format
70print '<div class="div-table-responsive-no-min">';
71print '<table class="noborder centpercent">';
72print '<tr class="liste_titre">';
73print '<td colspan="2">'.$langs->trans("AvailableFormats").'</td>';
74print '<td>'.$langs->trans("LibraryShort").'</td>';
75print '<td class="right">'.$langs->trans("LibraryVersion").'</td>';
76print '</tr>';
77
78include_once DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php';
79$model = new ModeleImports();
80$list = $model->listOfAvailableImportFormat($db);
81
82foreach ($list as $key) {
83 print '<tr class="oddeven">';
84 print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>';
85 $text = $model->getDriverDescForKey($key);
86 // @phan-suppress-next-line PhanPluginSuspiciousParamPosition
87 print '<td>'.$form->textwithpicto($model->getDriverLabelForKey($key), $text).'</td>';
88 print '<td>'.$model->getLibLabelForKey($key).'</td>';
89 print '<td class="nowrap right">'.$model->getLibVersionForKey($key).'</td>';
90 print '</tr>';
91}
92
93print '</table>';
94print '</div>';
95
96
97// End of page
98llxFooter();
99$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage generation of HTML components Only common components must be here.
Class to manage imports.
Parent class for import file readers.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.