*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
\file htdocs/exports/export.php
\ingroup core
\brief Page d'edition d'un export
\version $Revision$
*/
require_once("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/exports/export.class.php");
$langs->load("exports");
$user->getrights();
if (! $user->societe_id == 0)
accessforbidden();
$export=new Export($db);
$export->load_arrays($user,isset($datatoexport)?$datatoexport:'');
if (! isset($datatoexport))
{
llxHeader('',$langs->trans("NewExport"));
print_fiche_titre($langs->trans("NewExport"));
print '
';
print $langs->trans("SelectExportDataSet").'
';
print '
';
// Affiche les modules d'exports
print '';
print '';
print '| '.$langs->trans("Module").' | ';
print ''.$langs->trans("ExportableDatas").' | ';
print ' | ';
print '
';
$val=true;
if (sizeof($export->array_export_code))
{
foreach ($export->array_export_code as $key => $value)
{
$val=!$val;
print '| ';
print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' ';
print $export->array_export_module[$key]->getName();
print ' | ';
print $export->array_export_label[$key];
print ' | ';
print ''.img_picto($langs->trans("NewExport"),'filenew').'';
print ' |
';
}
}
else
{
print '| '.$langs->trans("NoExportableData").' |
';
}
print '
';
print '
';
}
if (isset($datatoexport))
{
llxHeader('',$langs->trans("NewExport"));
print_fiche_titre($langs->trans("NewExport")." - ".$export->array_export_label[0]);
print '';
print $langs->trans("SelectExportFields").'
';
print '
';
print '';
print '| '.$langs->trans("ExportableFields").' | ';
print ' | ';
print ''.$langs->trans("ExportedFields").' | ';
print '
';
print '| ';
// Champs exportables
$fieldscode=split(',',$export->array_export_fields_code);
$fieldslib=split(',',$export->array_export_fields_lib);
foreach($fieldscode as $i=>$code)
{
}
print ' |
';
print '
';
}
$db->close();
llxFooter('$Date$ - $Revision$');
?>