[ 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/user/admin/ -> index.php (source)

   1  <?php
   2  /* Copyright (C) 2004      Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: index.php,v 1.3 2005/09/06 20:19:35 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/user/admin/index.php,v $
  21   */
  22  
  23  /**
  24          \file       htdocs/user/admin/index.php
  25          \ingroup    setup
  26          \brief      Page de configuration du module sécurité
  27          \version    $Revision: 1.3 $
  28  */
  29  
  30  require ("./pre.inc.php");
  31  
  32  $langs->load("users");
  33  $langs->load("admin");
  34  
  35  if (!$user->admin) accessforbidden();
  36  
  37  
  38  
  39  if ($_POST["action"] == 'update' || $_POST["action"] == 'add')
  40  {
  41    if (! dolibarr_set_const($db, $_POST["constname"],$_POST["constvalue"],$typeconst[$_POST["consttype"]],0,isset($_POST["constnote"])?$_POST["constnote"]:''))
  42      {
  43        dolibarr_print_error($db);
  44      }
  45    else
  46      {
  47        Header("Location: index.php");
  48        exit;
  49      }
  50  }
  51  
  52  
  53  llxHeader();
  54  
  55  $var=false;
  56  
  57  $form = new Form($db);
  58  $typeconst=array('yesno','texte','chaine');
  59  
  60  print_titre($langs->trans("UserSetup"));
  61  
  62  print "<br>";
  63  
  64  print '<table class="noborder" width=\"100%\">';
  65  print '<tr class="liste_titre">';
  66  print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td><td>'.$langs->trans("Description").'</td>';
  67  print '<td>&nbsp;</td>';
  68  print "</tr>\n";
  69  
  70  print '<form action="index.php" method="POST">';
  71  print '<input type="hidden" name="action" value="update">';
  72  print '<input type="hidden" name="constname" value="USER_PASSWORD_GENERATED">';
  73  print '<input type="hidden" name="consttype" value="yesno">';
  74  
  75  print '<tr '.$bc[$var]."><td>USER_PASSWORD_GENERATED</td>\n";
  76  
  77  print '<td>';
  78  $form->selectyesnonum('constvalue',USER_PASSWORD_GENERATED);
  79  print '</td><td>';
  80  
  81  print '<input type="text" size="40" name="constnote" value="'.stripslashes(nl2br($obj->note)).'">';
  82  print '</td><td>';
  83  print '<input type="submit" value="'.$langs->trans("Modify").'" name="button" class="button"> &nbsp; ';
  84  print "</td></tr>\n";
  85  
  86  print '</form>';
  87  
  88  
  89  print "</table>\n";
  90  
  91  
  92  
  93  
  94  llxFooter('$Date: 2005/09/06 20:19:35 $ - $Revision: 1.3 $');
  95  
  96  ?>


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