[ 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/ -> index.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: index.php,v 1.6 2005/12/03 04:25:10 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/exports/index.php,v $
  20   */
  21  
  22  /**
  23          \file       htdocs/exports/index.php
  24          \ingroup    core
  25          \brief      Page accueil de la zone export
  26          \version    $Revision: 1.6 $
  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);
  43  
  44   
  45  llxHeader('',$langs->trans("ExportsArea"));
  46  
  47  print_fiche_titre($langs->trans("ExportsArea"));
  48  
  49  print '<table class="notopnoleftnoright" width="100%">';
  50  
  51  print '<tr><td valign="top" width="30%" class="notopnoleft">';
  52  
  53  
  54  // Liste des formats d'exports disponibles
  55  $var=true;
  56  print '<table class="noborder" width="100%">';
  57  print '<tr class="liste_titre">';
  58  print '<td>'.$langs->trans("AvailableFormats").'</td>';
  59  print '<td>'.$langs->trans("LibraryUsed").'</td>';
  60  print '<td>'.$langs->trans("LibraryVersion").'</td>';
  61  print '</tr>';
  62  $var=!$var;
  63  print '<tr '.$bc[$var].'><td>Excel</td><td>Php_WriteExcel</td>';
  64  print '<td>&nbsp;</td>';
  65  print '</tr>';
  66  $var=!$var;
  67  print '<tr '.$bc[$var].'><td>Csv</td><td>Dolibarr</td>';
  68  print '<td>&nbsp;</td>';
  69  print '</tr>';
  70  print '</table>';
  71  
  72  
  73  print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
  74  
  75  
  76  // Affiche les modules d'exports
  77  print '<table class="noborder" width="100%">';
  78  print '<tr class="liste_titre">';
  79  print '<td width="120">'.$langs->trans("Module").'</td>';
  80  print '<td>'.$langs->trans("ExportableDatas").'</td>';
  81  print '<td>&nbsp;</td>';
  82  print '</tr>';
  83  $val=true;
  84  if (sizeof($export->array_export_code))
  85  {
  86      foreach ($export->array_export_code as $key => $value)
  87      {
  88          $val=!$val;
  89          print '<tr '.$bc[$val].'><td>';
  90          print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' ';
  91          print $export->array_export_module[$key]->getName();
  92          print '</td><td>';
  93          print $export->array_export_label[$key];
  94          print '</td><td width="24">';
  95          print '<a href="'.DOL_URL_ROOT.'/exports/export.php?datatoexport='.$export->array_export_code[$key].'">'.img_picto($langs->trans("NewExport"),'filenew').'</a>';
  96          print '</td></tr>';
  97      }
  98  }
  99  else
 100  {
 101      print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
 102  }
 103  print '</table>';    
 104  
 105  
 106  // Affiche les profils d'exports
 107  $sql  = "SELECT rowid, label, public, fk_user, ".$db->pdate("datec");
 108  $sql .= " FROM ".MAIN_DB_PREFIX."export as e";
 109  $result=$db->query($sql);
 110  if ($result) 
 111  {
 112      print '<br>';
 113      print '<table class="noborder" width="100%">';
 114      print '<tr class="liste_titre">';
 115      print '<td colspan="2">'.$langs->trans("ExportProfiles").'</td>';
 116      print '<td align="right">'.$langs->trans("Public").'</td></tr>';
 117  
 118      $num = $db->num_rows($result);
 119      if ($num > 0)
 120      {
 121          $var = true;
 122          $i = 0;
 123  
 124          while ($i < $num )
 125          {
 126              $obj = $db->fetch_object($result);
 127              $var=!$var;
 128  
 129              print "<tr $bc[$var]>";
 130              print '<td>'.$obj->label.'</td>';
 131              print '<td align="center">'.$yn($obj->public).'</td>';
 132              print '</tr>';
 133              $i++;
 134          }
 135      }
 136  
 137      print "</table>";
 138  }
 139  
 140  
 141  print '</td></tr>';
 142  print '</table>';
 143  
 144  $db->close();
 145  
 146  
 147  llxFooter('$Date: 2005/12/03 04:25:10 $ - $Revision: 1.6 $');
 148  
 149  ?>


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