[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/exports/ -> export.php (source)

   1  <?php
   2  /* Copyright (C) 2005 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 2 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, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: export.php,v 1.2 2005/11/19 22:09:12 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/exports/export.php,v $
  20   */
  21  
  22  /**
  23          \file       htdocs/exports/export.php
  24          \ingroup    core
  25          \brief      Page d'edition d'un export
  26          \version    $Revision: 1.2 $
  27  */
  28   
  29  require_once ("./pre.inc.php");
  30  require_once(DOL_DOCUMENT_ROOT."/exports/export.class.php");
  31  
  32  $langs->load("exports");
  33  
  34  $user->getrights();
  35  
  36  if (! $user->societe_id == 0)
  37    accessforbidden();
  38  
  39  
  40  
  41  $export=new Export($db);
  42  $export->load_arrays($user,isset($datatoexport)?$datatoexport:'');
  43  
  44  
  45  if (! isset($datatoexport))
  46  {
  47      llxHeader('',$langs->trans("NewExport"));
  48      
  49      print_fiche_titre($langs->trans("NewExport"));
  50      
  51      print '<table class="notopnoleftnoright" width="100%">';
  52  
  53      print $langs->trans("SelectExportDataSet").'<br>';
  54      print '<br>';
  55      
  56      // Affiche les modules d'exports
  57      print '<table class="noborder" width="100%">';
  58      print '<tr class="liste_titre">';
  59      print '<td width="120">'.$langs->trans("Module").'</td>';
  60      print '<td>'.$langs->trans("ExportableDatas").'</td>';
  61      print '<td>&nbsp;</td>';
  62      print '</tr>';
  63      $val=true;
  64      if (sizeof($export->array_export_code))
  65      {
  66          foreach ($export->array_export_code as $key => $value)
  67          {
  68              $val=!$val;
  69              print '<tr '.$bc[$val].'><td>';
  70              print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' ';
  71              print $export->array_export_module[$key]->getName();
  72              print '</td><td>';
  73              print $export->array_export_label[$key];
  74              print '</td><td>';
  75              print '<a href="'.DOL_URL_ROOT.'/exports/export.php?datatoexport='.$export->array_export_code[$key].'">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
  76              print '</td></tr>';
  77          }
  78      }
  79      else
  80      {
  81          print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
  82      }
  83      print '</table>';    
  84  
  85      print '</table>';
  86  }
  87  
  88  if (isset($datatoexport))
  89  {
  90      llxHeader('',$langs->trans("NewExport"));
  91      
  92      print_fiche_titre($langs->trans("NewExport")." - ".$export->array_export_label[0]);
  93      
  94      print '<table class="notopnoleftnoright" width="100%">';
  95  
  96      print $langs->trans("SelectExportFields").'<br>';
  97      print '<br>';
  98      
  99      print '<table>';
 100      print '<tr><td>'.$langs->trans("ExportableFields").'</td>';
 101      print '<td>&nbsp;</td>';
 102      print '<td>'.$langs->trans("ExportedFields").'</td>';
 103      print '</tr>';
 104  
 105      print '<tr><td>';
 106      
 107      // Champs exportables
 108      $fieldscode=split(',',$export->array_export_fields_code);
 109      $fieldslib=split(',',$export->array_export_fields_lib);
 110      foreach($fieldscode as $i=>$code)
 111      {
 112                  
 113          
 114      }
 115      
 116      print '</td></tr>';
 117  
 118      print '</table>';
 119  }
 120  
 121  
 122  $db->close();
 123  
 124  llxFooter('$Date: 2005/11/19 22:09:12 $ - $Revision: 1.2 $');
 125  
 126  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics