18 |
* $Id$ |
* $Id$ |
19 |
* $Source$ |
* $Source$ |
20 |
* |
* |
|
* |
|
21 |
* Visualisation de l'etat des lignes preselectionnées |
* Visualisation de l'etat des lignes preselectionnées |
22 |
* |
* |
23 |
*/ |
*/ |
24 |
require ("../../master.inc.php"); |
require ("../../master.inc.php"); |
25 |
require_once DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"; |
require_once DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php"; |
26 |
|
|
|
set_time_limit(0); |
|
|
|
|
27 |
$host = CMD_PRESEL_WEB_HOST; |
$host = CMD_PRESEL_WEB_HOST; |
28 |
$user_login = CMD_PRESEL_WEB_USER; |
$user_login = CMD_PRESEL_WEB_USER; |
29 |
$user_passwd = CMD_PRESEL_WEB_PASS; |
$user_passwd = CMD_PRESEL_WEB_PASS; |
32 |
|
|
33 |
if ($argv[1]) |
if ($argv[1]) |
34 |
{ |
{ |
35 |
$debug = 1; |
$debug = 0; |
36 |
array_push($ids, $argv[1]); |
array_push($ids, $argv[1]); |
37 |
} |
} |
38 |
else |
else |
61 |
} |
} |
62 |
} |
} |
63 |
|
|
|
|
|
64 |
GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids, $debug); |
GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids, $debug); |
65 |
|
|
66 |
/* |
/* |
72 |
{ |
{ |
73 |
$numcli = sizeof($ids); |
$numcli = sizeof($ids); |
74 |
$i = 0; |
$i = 0; |
75 |
print "$numcli"; |
print "Nombre de lignes $numcli\n"; |
76 |
foreach($ids as $cli) |
foreach($ids as $cli) |
77 |
{ |
{ |
78 |
$i++; |
$i++; |
117 |
$ligne_numero = $array[1]; |
$ligne_numero = $array[1]; |
118 |
|
|
119 |
$array = array(); |
$array = array(); |
120 |
|
preg_match('/ServiceActive="([\S]*)"/i', $line, $array); |
121 |
|
$service_active = $array[1]; |
122 |
|
|
123 |
|
$array = array(); |
124 |
|
preg_match('/PreSelectionActive="([\S]*)"/i', $line, $array); |
125 |
|
$presel_active = $array[1]; |
126 |
|
|
127 |
|
$array = array(); |
128 |
preg_match('/Service_Statut="([\S]*)"/i', $line, $array); |
preg_match('/Service_Statut="([\S]*)"/i', $line, $array); |
129 |
$ligne_service = $array[1]; |
$ligne_service = $array[1]; |
130 |
|
|
134 |
|
|
135 |
print "$i/$numcli "; |
print "$i/$numcli "; |
136 |
print $ligne_numero." "; |
print $ligne_numero." "; |
137 |
|
print "$service_active/$presel_active "; |
138 |
print substr($ligne_service.str_repeat(" ",20),0,20); |
print substr($ligne_service.str_repeat(" ",20),0,20); |
139 |
print substr($ligne_presel.str_repeat(" ",20),0,20); |
print substr($ligne_presel.str_repeat(" ",20),0,20); |
140 |
print "\n"; |
print "\n"; |