|
|
|
@ -25,11 +25,41 @@ if (isset($_GET['GetUser'])) {
|
|
|
|
|
|
|
|
|
|
if (isset($_GET['org_id'])) { |
|
|
|
|
$organizacao = GetAllOrganizacao(); |
|
|
|
|
|
|
|
|
|
foreach ($organizacao as $v) { |
|
|
|
|
if ($v['id'] == $_GET['org_id']) { |
|
|
|
|
$_SESSION['SSEmpresaPadrao'] = $v['id']; |
|
|
|
|
$_SESSION['SSEmpresaPadrao'] = $v['id']; /* defini nova empresa Session da nova empresa*/ |
|
|
|
|
clearInfoOrganization(); |
|
|
|
|
GetParametros($dbcon); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* \brief Limpar valores $SESSION e cookie quando troca de empresa. |
|
|
|
|
* |
|
|
|
|
* Apenas o administrador e o Admin(simplesip) poderá trocar de empresa |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
function clearInfoOrganization(){ |
|
|
|
|
|
|
|
|
|
/* informação do agente */ |
|
|
|
|
SetCookieApl(RAMAL_MONITOR_AUDIO, ""); |
|
|
|
|
SetCookieApl(CANAL_MONITOR_AUDIO, ""); |
|
|
|
|
SetCookieApl(RAMAL_MONITOR_SUPERVISOR, ""); |
|
|
|
|
SetCookieApl(CANAL_MONITOR_SUPERVISOR, ""); |
|
|
|
|
SetCookieApl(RAMAL_MONITOR_AGENTE, ""); |
|
|
|
|
SetCookieApl(CANAL_MONITOR_AGENTE, "") ; |
|
|
|
|
|
|
|
|
|
$_SESSION[RAMAL_MONITOR_AGENTE] = ""; |
|
|
|
|
$_SESSION[CANAL_MONITOR_AGENTE] = ""; |
|
|
|
|
$_SESSION[SS_DAC_CODIGO] = 0; |
|
|
|
|
$_SESSION[RAMAL_DESTINO] = 0; |
|
|
|
|
$_SESSION[SS_STATUS_AGENTE] = 'OFF'; |
|
|
|
|
$_SESSION[SS_PAUSA_AGENTE] = 0; |
|
|
|
|
$_SESSION[AGT_NUM_DISC] = ""; |
|
|
|
|
$_SESSION[AGT_CHANNEL_TRANSF] = NULL; |
|
|
|
|
$_SESSION[SS_AGT_CHANNEL_AGENTE] = NULL; |
|
|
|
|
$_SESSION[SS_PAUSA_AGENTE_MOTIVO] = NULL; |
|
|
|
|
$_SESSION[AGT_CHANNEL_TRCONSULTA] = NULL; |
|
|
|
|
} |