[ Index ] |
|
Code source de Dolibarr 2.0.1 |
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: bascule.php,v 1.1 2005/10/26 11:53:28 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/script/bascule.php,v $ 20 * 21 */ 22 23 require ("../../master.inc.php"); 24 require_once (DOL_DOCUMENT_ROOT."/telephonie/distributeurtel.class.php"); 25 require_once (DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"); 26 27 $error = 0; 28 $nbcommit = 0; 29 $datetime = time(); 30 31 $user = new User($db, 1); 32 $user->login = "Rodo"; 33 34 $sql = "SELECT rowid "; 35 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat"; 36 $sql .= " WHERE fk_client_comm = 52"; 37 38 $resql = $db->query($sql); 39 40 if ( $resql ) 41 { 42 $num = $db->num_rows($resql); 43 $i = 0; 44 45 while ($i < $num) 46 { 47 $row = $db->fetch_row($resql); 48 49 print $row[0]; 50 51 $sqll = "SELECT rowid "; 52 $sqll .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne"; 53 $sqll .= " WHERE fk_contrat = ".$row[0]; 54 $sqll .= " AND statut = 3"; 55 56 $resqll = $db->query($sqll); 57 58 if ( $resqll ) 59 { 60 $numl = $db->num_rows($resqll); 61 $j = 0; 62 63 while ($j < $numl) 64 { 65 $row_l = $db->fetch_row($resqll); 66 67 print " ".$row_l[0]; 68 $lignes++; 69 70 $ligne = new LigneTel($db); 71 $ligne->fetch_by_id($row_l[0]); 72 73 if ( $ligne->transfer($user,4) == 0) 74 { 75 76 } 77 else 78 { 79 Print "Error ligne $row_l[0]\n"; 80 } 81 82 $j++; 83 } 84 } 85 86 print "\n"; 87 88 $i++; 89 } 90 $db->free($resql); 91 } 92 else 93 { 94 $error = 1; 95 dolibarr_syslog("Verification Erreur ".$error); 96 } 97 98 print "lignes : $lignes\n"; 99 100 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |