From c1b537ddb15370c076c7a5569cd3df012d8fce18 Mon Sep 17 00:00:00 2001 From: Matheo Bonucia Date: Thu, 25 Jan 2024 18:14:35 +0000 Subject: [PATCH] Finalizado todos inputs tipo texto, select e toggle dos ramais sip para a nova versao --- admin/cadQgrupos.php | 377 ++++++++++---------- admin/cadRamais.php | 773 ++++++++++++++++++++++------------------- admin/css/cadRamal.css | 395 +++++++++++++-------- 3 files changed, 847 insertions(+), 698 deletions(-) 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

-
- + + '$idFila' order by nome"; + $result = pg_query($dbcon, $query); - while ($row = pg_fetch_array($result)) { - $idDac = $row["id"]; - $nomeDac = $row["nome"]; - if ($acao == 'edita') { - if ($idTransbordo == $idDac) { - $sel = "selected"; - } else { - $sel = ""; - } + while ($row = pg_fetch_array($result)) { + $idDac = $row["id"]; + $nomeDac = $row["nome"]; + if ($acao == 'edita') { + if ($idTransbordo == $idDac) { + $sel = "selected"; + } else { + $sel = ""; } - echo ""; } - ?> - -
+ echo ""; + } + ?> + +
@@ -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
-
- + + + + + + + + + + -

-
-
-

>

-
-
-

<

+

+
+
+

>

+
+
+

+ <

+
-
- +
-
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

-
-
-
- Quantidade +
+
+

Ramal

+
+
- + +
-
+
-
-
- Gera Voicemail +
+
+

Bina

+
+
- +
-
+
-
-
- Habilita Pré-pago +
+
+

Bina externa

+
+
- />Sim +
-
- />Não +
+
+
+
+
+
+

Gerar Voicemail

+
+
+
+
-
+
-
-
- Saldo Pré-pago -
- +
+
+

Habilitar pré-pago

+
+
+
+
-
+
+ +
+
+

Saldo pré-pago

+
+
+ +
-
-
- Ramal +
+
+

Senha SIP

+
+
- - -
-
-
-
-
- Senha SIP -
-
-
-
+
-
-
- Senha Facilidades +
+
+

Senha Facilidades

+
+
-
+
-
-
- Tipo -
- /> -

Faz ligações

-
-
- /> -

Recebe ligações

-
+
+
+

Quantidade

+
+
- /> -

Ambos

+
-
+
-
-
- Monitorar +
+
+
+
+

+ Tipo de ligação +

+
+
- />Sim +
-
- />Não +
+
+
+
+

Monitorar

+
+
+
+
- +
-
-
- Tronco PBX +
+
+

Tronco PBX

+
+
-
+
- +
-
-
- Codecs Habilitados -
- ', ++$numCodec, $codec, $check); - echo ucfirst($codec); - } - ?> - All - -
-
+
+
+

Codecs habilitados

+
+
+ ', ++$numCodec, $codec, $check); + echo ucfirst($codec) . '
'; + } + ?> + All + +
-
-
- Porta +
+
+

Porta

+
+
" size="7" maxlength="10" /> +
-
- -
-
-
- Nat -
- /> - Sim -
-
- /> - Não -
- -
-
-
-
- Fax -
- /> - Sim -
-
- /> - Não -
-
-
-
-
- Suporte a Vídeo -
- /> - Sim -
-
- /> - Não -
-
+
-
-
- Tempo de Ring +
+
+

Tempo de Ring

+
+
" size="10" />
-
+
-
-
-
-
- Música de Espera +
+
+

Música de Espera

+
+
-
+
+
+ +
+
+
+

Nat

+
+
+
+ +
+
+
+
+
+

Fax

+
+
+
+ +
+
-
-
- Tratar conexões dos Peers +
+
+

Suporte a Vídeo

+
+
+
+ +
+
+
+
+
+
+
+

Tratar conexões do Peers

+
+
- +
-
-
- Servidor +
+
+

Servidor

+
+
" />
-
+
-
-
- Modo DTMF +
+
+

Modo DTMF

+
+
-
+
-
-
- Limite de Ligação +
+
+
+
+

Limite de ligações

+
+
" size="10" />
- +
-
-
-
-
- - Contexto: - +
+
+

Contexto

+
+
-
-
-
-
- Bina -
- -
-
-
-
-
- Bina Externa -
- -
-
+
-
-
- Dispositivo +
+
+

Dispositivo

+
+
-
+
-
-
- Siga-me Interno +
+
+

Siga-me interno

+
+
-
+
-
-
- Siga-me Externo +
+
+

Siga-me externo

+
+
-
+
-
-
- Siga-me Não Atende +
+
+
+
+

Siga-me não atende

+
+
- +
-
-
- Siga-me Ocupado +
+
+

Siga-me ocupado

+
+
-
+
-
-
- Chamada em Espera -
- /> - Sim -
-
- /> - Não +
+
+

Chamada em espera

+
+
+
+
-
+
-
-
- Cadeado -
- /> - Sim -
-
- /> - Não +
+
+

Cadeado

+
+
+
+
-
+
-
-
- Não Pertube -
- /> - Sim -
-
- /> - Não +
+
+

Não pertube

+
+
+
+
-
+
-
-
- Gravação de Entrada -
- /> - Sim -
-
- /> - Não +
+
+
+
+

Gravação de entrada

+
+
+
+
-
+
-
-
- Gravação de Saída -
- /> - Sim -
-
- /> - Não +
+
+

Gravação de saída

+
+
+
+
-
+
-
-
- Tempo de Ligação -
- -
- -
+
+
+

Tempo de ligação

+
+
+ +
-
-
- Redes Permitidas para Autenticação de Ramais -
- -
-
+
+
+

Redes Permitidas para Autenticação de Ramais

+
+
+ +
@@ -1179,94 +1230,96 @@ if ($renderizar) { ?>
- +
-
-
- Número da Caixa - - - -
-
-
-
- Nome - - - -
+
+
+

Número da caixa

+
+
+ +
-
-
- Senha - - - -
+
+
+

Nome

+
+
+ +
-
-
- E-mail - - - -
+
+
+

Senha

+
+
+ +
-
-
- Reproduzir Data e Hora -
- /> - Sim -
-
- /> - Não -
-
+
+
+

E-mail

+
+
+ +
-
-
- Enviar Anexo -
- /> - Sim -
-
- /> - Não +
+
+

Reproduzir data e hora

+
+
+
+
-
+
-
-
- Reproduzir Identificação -
- /> - Sim -
-
- /> - Não +
+
+

Enviar anexo

+
+
+
+
-
+
-
-
- Deletar após o envio -
- /> - Sim +
+
+
+
+

Reproduzir identificação

+
+
+
+
-
- /> - Não +
+
+
+
+

Deletar após o envio

+
+
+
+
-
+
diff --git a/admin/css/cadRamal.css b/admin/css/cadRamal.css index 8a444692..e806a471 100755 --- a/admin/css/cadRamal.css +++ b/admin/css/cadRamal.css @@ -9,6 +9,7 @@ html { p { margin: 0; padding: 0; + font-size: small; } body { @@ -21,44 +22,28 @@ input { outline: none; } -input[type="radio"] { - width: 16px; - height: 16px; -} - -input[type="checkbox"] { - width: 16px; - height: 16px; +.row-2 .coluna-titulo, +.row .coluna-toggle .coluna-titulo { + display: flex; + justify-content: center; } -input[type="text"], -input[type="password"], -input[type="number"] { - width: 80%; - height: 16px; - padding: 4px; - border: 0; - border-radius: 5px; +.row-2 .coluna-content input, +.row-2 .coluna-content select, +.row .coluna-content-toggle input { + border: none; + text-align: center; vertical-align: middle; - background-color: #eaeaea6a; - padding-left: 15px; - text-align: start; } -fieldset { - border: 1px solid #3333333b; - font-size: small; +.coluna-titulo h1 { + font-size: 13px; font-weight: 500; + white-space: nowrap; + overflow: hidden; + margin: 2px 10px 2px 0; text-align: left; -} - -select { - border: 0 solid #3333333b; - background-color: #eaeaea6a; - color: #333333; - font-weight: 600; - border-radius: 5px; - padding: 4px; + color: #333333c9; } select[multiple] { @@ -66,63 +51,94 @@ select[multiple] { text-align: center; background-color: rgba(255, 255, 255, 0.463); border: 0.5px solid #6e26fa; - border-radius: 2px; -} - -td { - vertical-align: middle; + border-radius: 4px; } -.field { - border-radius: 6px; - flex: 1; +.container { + width: 100%; display: flex; - flex-direction: row; justify-content: center; align-items: center; - margin: 0 2px; - font-size: small; + flex-direction: column; } -.container { +.container-content { + width: 74%; + flex: 1; +} + +.row { + display: flex; width: 100%; + align-items: stretch; + box-sizing: border-box; + flex-wrap: wrap; + padding: 8px; + border-radius: 4px; + justify-content: space-evenly; +} + +.row .coluna-toggle { display: flex; + flex: 1; + flex-direction: row; +} + +.row .coluna, +.row .coluna-toggle { + flex: 1; + margin: 5px; + box-sizing: border-box; justify-content: center; align-items: center; - flex-direction: column; + width: 100%; } -.container-content { - width: 70%; +.row-2 { display: flex; - flex-direction: column; + align-items: stretch; + padding: 8px; + border-radius: 4px; + box-sizing: border-box; + flex-wrap: wrap; +} + +.row-2 div { + flex: 1; + margin: 5px; + box-sizing: border-box; justify-content: center; - align-items: start; } -.row { - width: 100%; - height: 100%; +.coluna .coluna-content, +.coluna-toggle .coluna-content-toggle { display: flex; align-items: center; - justify-content: start; - margin: 4px 0; + justify-content: space-evenly; } -.row div { - width: 100%; - text-align: center; +.coluna-content div, +.coluna-content-toggle div { display: flex; align-items: center; - justify-content: center; + justify-content: start; + flex: 1; +} + +.coluna-content input, +.coluna-content select { + flex: 1; + height: 100%; + padding: 8px; + margin: 1px; } .row-bn { width: 100%; display: flex; - justify-content: space-evenly; + justify-content: center; align-items: center; - margin: 5px; + margin: 10px 0px 50px 5px; } .titulo { @@ -133,58 +149,50 @@ td { color: white; padding: 8px; border-radius: 0 0 60px 60px; - font-weight: 600; margin-bottom: 20px; - width: 70%; - height: 30px; + width: 100%; + height: 35px; } .titulo h1 { font-size: 20px; + font-weight: 500; } .collapse-config-advanced { width: 100%; display: flex; - align-items: start; + align-items: center; justify-content: center; flex-direction: column; - margin-left: 3px; } .collapse-config-advanced-content { display: none; width: 100%; - width: 100%; text-align: center; - margin-inline-start: 30px; -} - -.collapse-config-advanced-content>.row>div { - margin: 5px; - color: #333333; - font-weight: 600; - font-size: 14px; } .collapse-btn { - width: 40%; - font-size: 12px; + width: 100%; + font-size: 14px; font-weight: 600; - background-color: #6e26fa; - color: #fff; + color: #333333b8; padding: 10px; - border: none; - border-radius: 4px; + border-radius: 2px; + border-bottom: 0.15rem solid #6e26fa; + background-color: transparent; cursor: pointer; margin: 10px 0px 10px 0px; display: flex; align-items: center; - justify-content: start; + border-left: none; + border-top: none; + border-right: none; } .collapse-btn:hover { - background-color: #2C4FF2; + background-color: #6d26fa0b; } .button-close { @@ -242,10 +250,6 @@ td { text-align: center; } -#cabRota { - justify-content: start; -} - .column-sec { width: 33%; text-align: center; @@ -288,116 +292,207 @@ td { background-color: #919dd1; } -.head-rota { - background-color: #6e26fa; - color: white; +#labelRotas, +#labelCfs { + color: #6e26fa; + font-size: 14px; font-weight: 600; - font-size: 12px; - border-radius: 10px; + text-decoration: none; +} + +#ramalSecretaria, +#ramalSecretariaExcessao { vertical-align: middle; - height: 24px; + text-align: left; + background-color: rgba(255, 255, 255, 0.463); + border: 0.5px solid #6e26fa; + border-radius: 2px; } -.head-rota td { +#estaticos #prioridadeRamal { + width: 50px; + height: 32px; + padding: 8px; + vertical-align: middle; text-align: center; - font-size: 14px; - min-width: 125px; } -.head-rota img { - margin: 2px; +#bn-prioridade-ramal { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; } -.head-rota>.title-rota { - width: 50%; +#estaticos select { + width: 180px; + height: 160px; + margin-bottom: 20px; + padding: 10px; } -.head-rota>.sim-rota, -.head-rota>.nao-rota, -.head-rota>.agente-rota { - width: 10%; +.titles-select { + display: flex; + align-items: center; + justify-content: center; + margin: 4px 4px 12px 4px; + color: #333333ab; + font-weight: 501; } -#fieldText { +.select-modelo-bn { display: flex; - flex-direction: row; + flex-direction: column; + justify-content: center; align-items: center; - justify-content: start; - border-radius: 6px; - width: 100%; } -#fieldText>span { - margin: 5px; - color: white; +.select-modelo-bn>* { + width: 35px; + height: 30px; + border: 0; + border-radius: 10px; + color: #6e26fa; + font-weight: 600; + font-size: large; vertical-align: middle; + padding: 1px; } -#labelRotas, -#labelCfs { - color: #6e26fa; - font-size: 14px; - font-weight: 600; - text-decoration: none; +.select-modelo-bn div { + width: 35px; + height: 30px; + display: flex; + justify-content: center; + align-items: center; } -#ramalSecretaria, -#ramalSecretariaExcessao { - vertical-align: middle; - text-align: left; - background-color: rgba(255, 255, 255, 0.463); - border: 0.5px solid #6e26fa; - border-radius: 2px; +.select-modelo-bn div:hover { + background-color: #919dd1; +} + +.bn-submit { + margin: 10px 100px; +} + +.bn-close { + margin: 10px 100px; } .codecs-content { - flex-direction: row; + box-sizing: border-box; + border: 1px solid #6e26fa; + border-radius: 4px; + padding: 10px; + outline: none; + display: flex; flex-wrap: wrap; + align-items: center; + justify-content: start; +} + +.codecs-check { + padding: 1px; +} + +input[type="text"], +input[type="number"], +input[type="password"], +textarea, +select { + background-color: transparent; + outline: none; + padding: 8px; + border: 1px solid #6e26fa; + border-radius: 4px; } -.row .quantidade, -.row .gera_voice { - width: 40%; +input[type="radio"], +input[type="checkbox"] { + max-width: 14px; + height: 14px; + margin: 0 4px; } -.row .habilita_prepago { - width: 40%; +.switch { + position: relative; + display: inline-block; + width: 40px; + height: 20px; } -.row .ramal, -.row .tipo { - width: 100%; +.switch input { + opacity: 0; + width: 0; + height: 0; } -.row .monitorar { - width: 50%; +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #cdcdcd; + -webkit-transition: .4s; + transition: .4s; } -.row .senha_sip .input_senha { - width: 400%; +.slider:before { + position: absolute; + content: ""; + height: 20px; + width: 20px; + left: 0px; + bottom: 0px; + background-color: #f0f0f0e5; + -webkit-transition: .4s; + transition: .4s; } +input:checked+.slider { + background-color: #53e764; +} -@media screen and (max-width:1180px) { - .titulo { - width: 88%; - } +input:focus+.slider { + box-shadow: 0 0 1px #cecece; +} - .container-content { - width: 88%; - } +input:checked+.slider:before { + -webkit-transform: translateX(21px); + -ms-transform: translateX(21px); + transform: translateX(21px); +} - .collapse-config-advanced { - width: 90%; - } +.slider.round { + border-radius: 50px; +} + +.slider.round:before { + border-radius: 50%; } -@media screen and (max-width: 690px) { - .row { +@media screen and (max-width: 845px) { + .container-content>* { + flex-direction: column; + display: flex; + justify-content: center; + align-content: center; + + } + + .collapse-config-advanced-content>* { flex-direction: column; + display: flex; + justify-content: center; + align-content: center; } - .collapse-btn { - width: 100%; + .container-content { + width: 78%; + flex: 1; } } \ No newline at end of file