*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
/**
* \file htdocs/imports/index.php
* \ingroup import
* \brief Page accueil de la zone import
* \version $Id: index.php,v 1.13 2011/07/31 23:46:39 eldy Exp $
*/
require_once("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/imports/class/import.class.php");
$langs->load("exports");
if (! $user->societe_id == 0)
accessforbidden();
$import=new Import($db);
$import->load_arrays($user);
/*
* View
*/
$html=new Form($db);
llxHeader('',$langs->trans("ImportArea"),'EN:Module_Imports_En|FR:Module_Imports|ES:Módulo_Importaciones');
print_fiche_titre($langs->trans("ImportArea"));
print $langs->trans("FormatedImportDesc1").'
';
print $langs->trans("FormatedImportDesc2").'
';
print '
';
print '
';
print '';
// Liste des formats d'imports disponibles
$var=true;
print '';
print '';
print '| '.$langs->trans("AvailableFormats").' | ';
print ''.$langs->trans("LibraryShort").' | ';
print ''.$langs->trans("LibraryVersion").' | ';
print ' ';
include_once(DOL_DOCUMENT_ROOT.'/includes/modules/import/modules_import.php');
$model=new ModeleImports();
$liste=$model->liste_modeles($db);
foreach($liste as $key)
{
$var=!$var;
print '';
print '| '.img_picto_common($model->getDriverLabel($key),$model->getPicto($key)).' | ';
$text=$model->getDriverDesc($key);
print ''.$html->textwithpicto($model->getDriverLabel($key),$text).' | ';
print ''.$model->getLibLabel($key).' | ';
print ''.$model->getLibVersion($key).' | ';
print ' ';
}
print ' ';
print ' | ';
// Affiche les modules d'imports
print '';
print '';
print '| '.$langs->trans("Module").' | ';
print ''.$langs->trans("ImportableDatas").' | ';
//print ' | ';
print ' ';
$val=true;
if (sizeof($import->array_import_code))
{
foreach ($import->array_import_code as $key => $value)
{
$val=!$val;
print '| ';
print img_object($import->array_import_module[$key]->getName(),$import->array_import_module[$key]->picto).' ';
print $import->array_import_module[$key]->getName();
print ' | ';
$string=$langs->trans($import->array_import_label[$key]);
print ($string!=$import->array_import_label[$key]?$string:$import->array_import_label[$key]);
print ' | ';
// print '';
// print ''.img_picto($langs->trans("NewImport"),'filenew').'';
// print ' | ';
print ' ';
}
}
else
{
print '| '.$langs->trans("NoImportableData").' | ';
}
print ' ';
print ' ';
print '';
if (sizeof($import->array_import_code))
{
//if ($user->rights->import->run)
//{
print ''.$langs->trans("NewImport").'';
//}
//else
//{
// print ''.$langs->trans("NewImport").'';
//}
}
print '';
print ' |
';
print '
';
$db->close();
llxFooter('$Date: 2011/07/31 23:46:39 $ - $Revision: 1.13 $');
?>