diff --git a/admin/cadQgrupos.php b/admin/cadQgrupos.php
index e0e344a1..87e1b24a 100644
--- a/admin/cadQgrupos.php
+++ b/admin/cadQgrupos.php
@@ -156,7 +156,7 @@ if ($renderizar) { ?>
* Parametros necessarios para manter a paginação.
*/
$param = sprintf('&numRamal=%s&pgn=%s&bloco=%s&pg=%s&status=%s', $_REQUEST['numRamal'], $_REQUEST['pgn'], isset($_REQUEST['bloco']) ? $_REQUEST['bloco'] : '', isset($_REQUEST['pg']) ? $_REQUEST['pg'] : '', isset($_REQUEST["status"]) ? $_REQUEST["status"] : '');
-
+
if ($acao2 == "salva") {
$id = trim($_POST["id"]);
$exige_classificacao = isset($_POST["exige_classificacao"]) ? 1 : 0;
@@ -444,20 +444,20 @@ if ($renderizar) { ?>
+
@@ -466,17 +466,17 @@ if ($renderizar) { ?>
@@ -488,8 +488,8 @@ if ($renderizar) { ?>
@@ -499,10 +499,10 @@ if ($renderizar) { ?>
Disponível Fila
-
@@ -514,8 +514,8 @@ if ($renderizar) { ?>
@@ -531,19 +531,19 @@ if ($renderizar) { ?>
+
+
+
+
+
@@ -587,20 +587,20 @@ if ($renderizar) { ?>
Ligações sem o agente
@@ -656,16 +656,16 @@ if ($renderizar) { ?>
Ring Use
@@ -682,7 +682,7 @@ if ($renderizar) { ?>
echo "0";
}
?>" size="20" />
-
+
@@ -739,37 +739,37 @@ if ($renderizar) { ?>
-
-
-
-
-
Anúncio Tempo de Espera
-
-
+
+
+
+
+
Anúncio Tempo de Espera
+
+
@@ -796,9 +796,9 @@ if ($renderizar) { ?>
}
sort($files); // Classifica o array em ordem alfabética
-
+
foreach ($files as $file) {
- ?>
+ ?>
-
-
-
-
-
-
Info. posição da fila
-
-
-
+
+
Info. posição da fila
+
+
+ " />
-
+
@@ -838,7 +838,7 @@ if ($renderizar) { ?>
echo "60";
}
?>" size="15" />
-
+
@@ -869,29 +869,29 @@ if ($renderizar) { ?>
Transbordo Assistido
-
-
+
@@ -905,7 +905,7 @@ if ($renderizar) { ?>
echo "45";
}
?>" size="15" maxlength="3" />
-
+
@@ -918,90 +918,91 @@ if ($renderizar) { ?>
Dispositivos Disponíveis
-
-
+
-
-
-
+ $result2 = pg_query($dbcon, $query2);
+ while ($dados2 = pg_fetch_array($result2)) {
+ ?>
+
+
+
-
Prioridade
-
-
-
-
-
-
-
-
-
-
-
-
+ Prioridade
+
+
+
+
+
+
+
+
+
+
+
+
-
-
Dispositivos Selecionados
-
- Dispositivos Selecionados
+
+
-
-
-
+ while ($dados3 = pg_fetch_array($result3)) {
+ $disp = sprintf("%s:%s", $dados3['dispositivo'], $dados3['prioridade']);
+ $nome = sprintf("%s:%s", $dados3['nome'], $dados3['prioridade']);
+ ?>
+
+
+
-
diff --git a/admin/cadRamais.php b/admin/cadRamais.php
index 45d5be78..d5ab7041 100644
--- a/admin/cadRamais.php
+++ b/admin/cadRamais.php
@@ -164,11 +164,11 @@ if ($renderizar) { ?>
$id = $_POST["id"];
$nome = GravaNumeroOrganizacao(trim($_POST["nome"]));
$type = trim($_POST["type"]);
- $qualify = trim($_POST["qualify"]);
+ $qualify = isset($_POST["qualify"]) ? "yes" : "no";
$port = trim($_POST["port"]);
$pickupgroup = trim($_POST["pickupgroup"]);
$permit = trim($_POST["permit"]);
- $nat = trim($_POST["nat"]);
+ $nat = isset($_POST["nat"]) ? "yes" : "no";
$mailbox = trim($_POST["mailbox"]);
$host = trim($_POST["host"]);
$dtmfmode = trim($_POST["dtmfmode"]);
@@ -184,35 +184,35 @@ if ($renderizar) { ?>
$fromuser = $_POST["fromuser"];
$fromdomain = $_POST["fromdomain"];
$insecure = $_POST["insecure"];
- $t38pt_udptl = $_POST["t38pt_udptl"];
- $videosupport = $_POST["videosupport"];
- $espera = $_POST["espera"];
+ $t38pt_udptl = isset($_POST["t38pt_udptl"]) ? "yes" : "no";
+ $videosupport = isset($_POST["videosupport"]) ? "yes" : "no";
+ $espera = isset($_POST["espera"]) ? "V" : "F";
$sigame_interno = trim($_POST["sigame_interno"]);
$sigame_externo = trim($_POST["sigame_externo"]);
$sigame_nao_atende = trim($_POST["sigame_nao_atende"]);
$sigame_ocupado = trim($_POST["sigame_ocupado"]);
- $gravacao = $_POST["gravacao"];
+ $gravacao = isset($_POST["gravacao"]) ? "V" : "F";
$musica = $_POST["musica"];
$pertube = $_POST["pertube"];
- $cadeado = $_POST["cadeado"];
+ $cadeado = isset($_POST["cadeado"]) ? "V" : "F";
$disp = explode('/', trim($_POST["dispositivo"]));
$dispositivo = $disp[0] . '/' . $nome;
- $gravacao_saida = trim($_POST["gravacao_saida"]);
+ $gravacao_saida = isset($_POST["gravacao_saida"]) ? "V" : "F";
$timeout = trim($_POST["timeout"]);
$musicclass = trim($_POST["musicclass"]);
$v_nome = $_POST["v_nome"];
$v_email = $_POST["v_email"];
$v_senha = $_POST["v_senha"];
- $attach = trim($_POST["attach"]);
- $delete = trim($_POST["delete"]);
- $saycid = trim($_POST["saycid"]);
- $envelope = trim($_POST["envelope"]);
+ $attach = isset($_POST["attach"]) ? "yes" : "no";
+ $delete = isset($_POST["delete"]) ? "yes" : "no";
+ $saycid = isset($_POST["saycid"]) ? "yes" : "no";
+ $envelope = isset($_POST["envelope"]) ? "yes" : "no";
$v_numero = trim($_POST["v_numero"]);
$inseri_voice = $_POST['inseri_voice'];
$ramalSecretaria = $_POST['ramalSecretaria'];
- $habilita_prepago = !HabilitaPrepago() ? '0' : $_POST['habilita_prepago'];
+ $habilita_prepago = !HabilitaPrepago() ? 0 : 1;
$ringTime = trim($_POST["ring_time"]);
$extranet = trim($_POST["extranet"]);
$ispbx_tronco = trim($_POST['ispbx_tronco']);
@@ -653,106 +653,145 @@ if ($renderizar) { ?>
Cadastro de Ramais SIP
-
-
-