[ 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/ -> clicktodial.php (source)

   1  <?php
   2  /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.org>
   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: clicktodial.php,v 1.2 2005/01/14 21:13:43 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/clicktodial.php,v $
  21   */
  22   
  23  /**        \file       htdocs/admin/clicktodial.php
  24          \ingroup    clicktodial
  25          \brief      Page d'administration/configuration du module clicktodial
  26          \version    $Revision: 1.2 $
  27  */
  28  
  29  require ("./pre.inc.php");
  30  
  31  $langs->load("admin");
  32  
  33  if (!$user->admin)
  34    accessforbidden();
  35  
  36  
  37  if ($_POST["action"] == 'setvalue' && $user->admin)
  38  {
  39    $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'CLICKTODIAL_URL'";
  40  
  41    $db->query($sql);
  42  
  43    $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible)";
  44    $sql .= " VALUES ('CLICKTODIAL_URL','".$_POST["url"]."',0)";
  45      
  46    if ($db->query($sql))
  47      {
  48        Header("Location: clicktodial.php");
  49      }
  50    else
  51      {
  52        dolibarr_print_error($db);
  53      }
  54  }
  55  
  56  llxHeader();
  57  
  58  /*
  59   *
  60   *
  61   */
  62  
  63  print_titre($langs->trans("ClickToDialSetup"));
  64  
  65  print '<br>';
  66  print '<form method="post" action="clicktodial.php">';
  67  print '<input type="hidden" name="action" value="setvalue">';
  68  print '<table class="border">';
  69  print '<tr class="liste_titre">';
  70  print '<td>'.$langs->trans("Name").'</td>';
  71  print '<td>'.$langs->trans("NewValue").'</td><td>'.$langs->trans("CurrentValue").'</td>';
  72  print "</tr>\n";
  73  print '<tr><td>';
  74  print $langs->trans("URL").'</td><td>';
  75  print '<input size="25" type="text" name="url" value="'.CLICKTODIAL_URL.'">';
  76  print '</td><td>';
  77  print CLICKTODIAL_URL;
  78  print '</td></tr>';
  79  
  80  print '<tr><td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Modify").'"></td></tr>';
  81  print '</table></form>';
  82  
  83  /*
  84   *
  85   *
  86   */
  87  
  88  $db->close();
  89  
  90  llxFooter();
  91  ?>


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