Ramal/Bina
" onkeyup="ConsultaRamal('index.php?idProg=10047&pbxRequest=1&pesquisa=1', event);" size="20"> NOVO RAMAL KHOMP
0) { $tpParcial = 0; } else { $tpParcial = 2; } } if ((!empty($filtro)) && ($tpParcial == 0)) { $compl = " where (nome ilike '%$filtro%' or callerid ilike '%$filtro%')"; } else if ((!empty($filtro)) && ($tpParcial == 1)) { $params = explode(",", $filtro); $compl = ""; foreach ($params as $param) { //$param = trim(str_replace("'", "", $param)); $dado .= empty($dado) ? "'$param'" : ",'$param'"; } $compl = " where (nome in($dado) or callerid in($dado))"; } else if ((!empty($filtro)) && ($tpParcial == 2)) { $params = explode("-", $filtro); $compl = ""; $ini = $params[0]; $fim = $params[1]; $qtd1 = strlen($ini) - strlen(ltrim($ini, "0")); $qtd2 = strlen($fim) - strlen(ltrim($fim, "0")); if ($qtd1 >= 1) { $ini1 = '-' . $qtd1; } else { $ini1 = $ini; } if ($qtd2 >= 1) { $fim1 = '-' . $qtd2; } else { $fim1 = $fim; } $compl = " where nome between '$ini' and '$fim' and ramal between '$ini1' and '$fim1'"; } else { $compl = ""; } $query = "drop table if exists ramal_khomp; create temporary table ramal_khomp( id integer, nome character varying(100), context character varying(100), dispositivo character varying(250), saldo_prepago numeric(12,4), habilita_prepago integer, callerid character varying(100), ramal integer ); insert into ramal_khomp (id,nome, context,dispositivo, saldo_prepago, habilita_prepago,callerid,ramal) SELECT id,numero, contexto, dispositivo, saldo_prepago, habilita_prepago,identificador, cast(case when (length(numero) - length(ltrim(numero,'0'))) >= 1 then '-'||(length(numero) - length(ltrim(numero,'0')))::int--||nome else numero end as int) FROM pbx_khomp; select * from ramal_khomp $compl order by ramal asc,nome asc"; $params = "&pbxRequest=1&numRamal=$filtro"; $links = PaginaDados($idProg, $query, $params, $regPagina, $offSet, $pagMostra, true); $query .= " limit $regPagina offset $offSet"; $result = pg_query($dbcon, $query); $z = 0; while ($dados = pg_fetch_array($result)) { $totaldep = GetTotalDependencias('ramal', $dados['nome']); $opcao = 'ramal'; $acao = $dados['nome']; $recursoTipo = 'Ramal'; $nomeRecurso = $dados['nome']; $dep = GetLinkDependenciaRecurso($opcao, $acao, $recursoTipo, $nomeRecurso, $totaldep); ?>
Id Ramal Bina Contexto Dispositivo Dep Ações
EDITAR O RAMAL:<?php echo $dados['nome']; ?>
APAGAR O RAMAL:<?php echo $dados['numero']; ?>
Este registro não pode ser apagado!
Não foram encontrados registros