forked from SimplesIP/pabx-app
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.
18 lines
485 B
18 lines
485 B
2 years ago
|
<?php
|
||
|
|
||
|
include('bd.php');
|
||
|
$tipo = $_GET['tipo'];
|
||
|
$valor = trim($_POST['validateValue']);
|
||
|
|
||
|
if ($tipo == 'fila') {
|
||
|
$result = pg_query($dbcon, "SELECT 1 FROM pbx_queues_grupos WHERE trim(nome) = '$valor'");
|
||
|
$quantreg = pg_num_rows($result);
|
||
|
if ($quantreg >= 1) {
|
||
|
$response = false;
|
||
|
} else {
|
||
|
$response = true;
|
||
|
}
|
||
|
echo json_encode(array('jsonValidateReturn' => array($_POST['validateId'], $_POST['validateError'], $response)));
|
||
|
}
|
||
|
?>
|