[ 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/telephonie/ -> telephonie.client.class.php (source)

   1  <?PHP
   2  /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   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: telephonie.client.class.php,v 1.2 2005/11/22 16:50:37 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/telephonie.client.class.php,v $
  20   *
  21   */
  22  
  23  class TelephonieClient extends Societe {
  24    var $db;
  25    var $id;
  26  
  27    /**
  28     * Créateur
  29     *
  30     */
  31    function TelephonieClient($DB, $id=0)
  32    {
  33      $this->db = $DB;
  34      $this->id = $id;
  35  
  36      return 0;
  37    }
  38    /**
  39     *
  40     *
  41     *
  42     */
  43    function log_consult($user,$mode)
  44    {
  45      $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_consult (fk_soc,fk_user,action)";
  46      $sql .= " VALUES (".$this->id.",".$user->id.",'".$mode."');";
  47      $this->db->query($sql);
  48    }
  49  
  50    function count_comment()
  51    {
  52      $num_comments = 0;
  53  
  54      $sql = "SELECT count(rowid)";
  55      $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_commentaire";
  56      $sql .= " WHERE fk_soc = ".$this->id;
  57      $resql = $this->db->query($sql);
  58      
  59      if ($resql)
  60        {
  61      $row = $this->db->fetch_row($resql);
  62      $num_comments = $row[0];
  63      $this->db->free($resql);
  64        }
  65  
  66      return $num_comments;
  67    }
  68  }
  69  ?>


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