Joywork/cron/beeline_subscription.php

16 lines
703 B
PHP
Raw Permalink Normal View History

2026-05-22 20:21:54 +02:00
<?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'");