forked from Claudio/integracao
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.6 KiB
52 lines
1.6 KiB
<?php |
|
|
|
require_once 'CNTSistemas.php'; |
|
|
|
$registros = array( |
|
"id" => '', |
|
"reg_ura" => $ura, |
|
"reg_tronco" => $tronco, |
|
"reg_uniqueid" => $uid, |
|
"reg_id_metodo" => $idMetodo, |
|
"reg_uniqueid" => $uid, |
|
"reg_uniqueid_old" => $uidOld, |
|
"reg_fone" => $numero, |
|
"reg_status_exec" => '1', |
|
"reg_inicio" => date()); |
|
|
|
|
|
$cnt = new CNTSistemas( |
|
CONF_TOKEN_API, |
|
CONF_URL_API, |
|
true); |
|
|
|
$cnt->db()->setRegistros($registros); |
|
|
|
if (CONF_AUDIO_ERROR) { |
|
$cnt->db()->setIdAudioError(CONF_AUDIO_ERROR); |
|
} |
|
|
|
$itgcTela = array( |
|
"Nome" => utf8_decode($cnt->agi()->get_variable('Nome', true)), |
|
"Status" => utf8_decode($cnt->agi()->get_variable('Status', true)), |
|
"Plano" => utf8_decode($cnt->agi()->get_variable('Plano', true)), |
|
"Cidade" => utf8_decode($cnt->agi()->get_variable('Cidade', true)) |
|
); |
|
|
|
$cnt->integracaoAgente($itgcTela, array('Nome', 'Status', 'Plano', 'Cidade')); |
|
$opcaoUra = '2'; |
|
$opcaoUra = $cnt->db()->getFirstUraMovPorUniqueid($uid); |
|
switch($opcaoUra['umv_ura_opcao']){ |
|
case '1': |
|
$cnt->agi()->exec_goto($cnt->db()->getAnuncio('INT_DIRECIONA_COMERCIAL_CIANET')); |
|
break; |
|
case '2': |
|
$cnt->agi()->exec_goto($cnt->db()->getAnuncio('INT_DIRECIONA_SUPORTE_CIANET')); |
|
break; |
|
case '3': |
|
$cnt->agi()->exec_goto($cnt->db()->getAnuncio('INT_DIRECIONA_FINANCEIRO_CIANET')); |
|
break; |
|
} |
|
|
|
$cnt->db()->atualizaIntegracao(); |
|
?>
|