[ 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/admin/ -> dons.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: dons.php,v 1.3 2005/12/07 01:14:28 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/dons.php,v $
  20   */
  21  
  22  /**    
  23          \file       htdocs/admin/dons.php
  24          \ingroup    dons
  25          \brief      Page d'administration/configuration du module Dons
  26          \version    $Revision: 1.3 $
  27  */
  28  
  29  require ("./pre.inc.php");
  30  
  31  $langs->load("admin");
  32  $langs->load("donations");
  33  
  34  if (!$user->admin)
  35    accessforbidden();
  36  
  37  
  38  $dons_addon_var      = DON_ADDON;
  39  
  40  
  41  $typeconst=array('yesno','texte','chaine');
  42  
  43  
  44  if ($_GET["action"] == 'setmodelbon')
  45  {
  46    if (dolibarr_set_const($db, "DON_ADDON",$_GET["value"]))
  47      $don_addon_var = $_GET["value"];
  48  }
  49  
  50  
  51  /*
  52   * Affiche page
  53   */
  54  
  55  $dir = "../includes/modules/dons/";
  56  
  57  
  58  llxHeader('',$langs->trans("DonationsSetup"),'DonConfiguration');
  59  
  60  print_titre($langs->trans("DonationsSetup"));
  61  
  62  
  63  /*
  64   *  PDF
  65   */
  66  print '<br>';
  67  print_titre("Modèles de bon de dons");
  68  
  69  print '<table class="noborder" width=\"100%\">';
  70  print '<tr class="liste_titre">';
  71  print '<td>'.$langs->trans("Name").'</td>';
  72  print '<td>'.$langs->trans("Description").'</td>';
  73  print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
  74  print '<td width="80">&nbsp;</td>';
  75  print "</tr>\n";
  76  
  77  clearstatcache();
  78  
  79  $handle=opendir($dir);
  80  
  81  $var=True;
  82  while (($file = readdir($handle))!==false)
  83  {
  84      if (eregi('\.modules\.php$',$file))
  85      {
  86          $var = !$var;
  87          $name = substr($file, 0, strlen($file) -12);
  88          $classname = substr($file, 0, strlen($file) -12);
  89  
  90          print '<tr '.$bc[$var].'><td width=\"100\">';
  91          echo "$file";
  92          print '</td><td>&nbsp;</td><td align="center">';
  93  
  94          if ($dons_addon_var == "$name")
  95          {
  96              print img_tick();
  97              print '</td><td align="center">';
  98              print '&nbsp;';
  99          }
 100          else
 101          {
 102              print '&nbsp;';
 103              print '</td><td align="center">';
 104              print '<a href="dons.php?action=setmodelbon&value='.$name.'">'.$langs->trans("Activate").'</a>';
 105          }
 106          print "</td></tr>\n";
 107  
 108      }
 109  }
 110  closedir($handle);
 111  
 112  print '</table>';
 113  
 114  
 115  print "<br>";
 116  
 117  
 118  $db->close();
 119  
 120  llxFooter('$Date: 2005/12/07 01:14:28 $ - $Revision: 1.3 $');
 121  ?>


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