[ 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/script/ -> verif-import-cdr.php (source)

   1  <?PHP
   2  /* Copyright (C) 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: verif-import-cdr.php,v 1.1 2005/11/24 09:41:43 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/script/verif-import-cdr.php,v $
  20   *
  21   * Script de verfication des données dans l'import des CDR
  22   */
  23  require  ("../../master.inc.php");
  24  require(DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php");
  25  /*
  26   * Vérification des lignes présentes
  27   *
  28   */
  29  
  30  $sql = "SELECT distinct(ligne), fk_fournisseur";
  31  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_import_cdr";
  32  $resql = $db->query($sql);
  33  if ($resql)
  34  {  
  35    $num = $db->num_rows();
  36  
  37    while ($row = $db->fetch_row($resql))
  38      {
  39        $ligne = new LigneTel($db);
  40        if ($ligne->fetch($row[0]) >= 0)
  41      {
  42        if ($ligne->fournisseur_id <> $row[1])
  43          {
  44            print "Ligne $row[0] fournisseur incohérent\n";
  45          }
  46  
  47        if ($ligne->statut <> 3)
  48          {
  49            print "Ligne $row[0] non activée, comms présentes\n";
  50          }
  51      }
  52        else
  53      {
  54        print "Ligne $row[0] inconnue\n";
  55      }  
  56      }
  57  }
  58  else
  59  {
  60    dolibarr_syslog("Erreur recherche fournisseur");
  61    exit ;
  62  }
  63  
  64  
  65  
  66  
  67  return $error;


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