16 lines
703 B
PHP
16 lines
703 B
PHP
<?php
|
|
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
|
|
|
|
$sql = "SELECT * FROM agency_mango WHERE `type` = 'beeline'";
|
|
|
|
$result = mysql_query($sql);
|
|
while($row = mysql_fetch_assoc($result)){
|
|
$api_key = $row['api_key'];
|
|
$beeline = new BeelineApiClass($api_key);
|
|
$beeline->subscription_url = 'http://subscribe.joywork.ru/incall.php';
|
|
$beeline->checkSubscription($row['id']);
|
|
}
|
|
mysql_query("update `call_events` set status=0 where status=1 and operator = 'BEELINE' or operator = 'MEGAFON'");
|
|
$pdopg = new MysqlPdo(hstpg, ndbpg, userpg, passpg, false, '5432', true);
|
|
$pdopg->query("update `call_events` set status=0 where status=1 and operator = 'BEELINE' or operator = 'MEGAFON'");
|