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.
215 lines
10 KiB
215 lines
10 KiB
2 years ago
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||
|
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="ISO-8859-1" />
|
||
|
<script type="text/javascript" src="js/jquery-1.4.js"></script>
|
||
|
<script type="text/javascript" src="js/jquery.blockUI.js?v2.29"></script>
|
||
|
<script src="js/jquery.min.js" type="text/javascript"></script>
|
||
|
<script src="js/jquery.validationEngine.js" type="text/javascript"></script>
|
||
|
<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
|
||
|
|
||
|
|
||
|
<script>
|
||
|
$(document).ready(function() {
|
||
|
$("#form1").validationEngine({
|
||
|
sucess : function(){ document.form1.submit();},
|
||
|
failure : function() {}
|
||
|
})
|
||
|
});
|
||
|
</script>
|
||
|
<link href="css/forms.css" rel="stylesheet" type="text/css">
|
||
|
<style type="text/css">
|
||
|
<!--
|
||
|
body {
|
||
|
background-color: #EAEAEA;
|
||
|
}
|
||
|
-->
|
||
|
</style></head>
|
||
|
<body>
|
||
|
|
||
|
<?
|
||
|
|
||
|
include('funcoes.php');
|
||
|
include('padroes.php');
|
||
|
|
||
|
$acao= $_GET["acao"];
|
||
|
|
||
|
|
||
|
if($acao=='salva'){
|
||
|
$parkext =trim($_POST["parkext"]);
|
||
|
$parkpos = trim($_POST["parkpos"]);
|
||
|
$parkingtime = trim($_POST["parkingtime"]);
|
||
|
$findslot =trim($_POST["findslot"]);
|
||
|
$courtesytone = trim($_POST["courtesytone"]);
|
||
|
$parkedplay = trim($_POST["parkedplay"]);
|
||
|
$adsipark = trim($_POST["adsipark"]);
|
||
|
$findslot = trim($_POST["findslot"]);
|
||
|
$parkedmusicclass= trim($_POST["parkedmusicclass"]);
|
||
|
$transferdigittimeout = trim($_POST["transferdigittimeout"]);
|
||
|
$xfersound = trim($_POST["xfersound"]);
|
||
|
$xferfailsound = trim($_POST["xferfailsound"]);
|
||
|
$pickupexten = trim($_POST["pickupexten"]);
|
||
|
$featuredigittimeout = trim($_POST["featuredigittimeout"]);
|
||
|
$atxfernoanswertimeout = trim($_POST["atxfernoanswertimeout"]);
|
||
|
$context = trim($_POST["context"]);
|
||
|
|
||
|
//REALIZA BACKUP BO BANCO
|
||
|
backup($dbcon,'pbx_features_general','U','','update','FEATURE_GENERAL');
|
||
|
|
||
|
$query = "UPDATE pbx_features_general
|
||
|
SET
|
||
|
parkext='$parkext',parkpos='$parkpos', parkingtime='$parkingtime',findslot='$findslot',
|
||
|
courtesytone='$courtesytone', parkedplay = '$parkedplay',adsipark = '$adsipark',parkedmusicclass='$parkedmusicclass' ,xfersound = '$xfersound',xferfailsound= '$xferfailsound', pickupexten='$pickupexten',featuredigittimeout='$featuredigittimeout',
|
||
|
atxfernoanswertimeout='$atxfernoanswertimeout',context='$context',transferdigittimeout=$transferdigittimeout";
|
||
|
// $result = pg_query($dbcon, $query);
|
||
|
|
||
|
pg_query($dbcon,$query);//gera arquivos e executa o reload dos dados no asterisk
|
||
|
gera_arquivos($dbcon,'FEATURE_GENERAL');
|
||
|
|
||
|
?>
|
||
|
<script>//fecha a janela presa no meio do sistema
|
||
|
fecha_popup();</script>
|
||
|
|
||
|
<?
|
||
|
}
|
||
|
$query = "SELECT * FROM pbx_features_general";
|
||
|
$result = pg_query($dbcon, $query);
|
||
|
while($dados = pg_fetch_array($result)){
|
||
|
?>
|
||
|
<form name="form1" method="post" action="Fgeneral.php?acao=salva" id="form1">
|
||
|
<table width="475" border="1" align="center" cellpadding="0" cellspacing="0" class="tabela">
|
||
|
<tr class="cabecalho">
|
||
|
<td background="img/button03.gif"><div align="center">CONFIGURAÇÃO GLOBAL DE ESTACIONAMENTO E TRANSFERENCIA</div></td>
|
||
|
</tr>
|
||
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels">
|
||
|
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
|
<tr>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels">Suporte a ADSI:</legend>
|
||
|
<input name="adsipark" type="radio" value="yes" <? if ($dados["adsipark"]=='yes'){ echo "checked";}?> />
|
||
|
SIM
|
||
|
<input name="adsipark" type="radio" value="no" <? if ($dados["adsipark"]=='no'){ echo "checked";}?> />
|
||
|
NÃO
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Estacionamento:</span></legend>
|
||
|
<input name="parkext" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="parkext" value="<? echo $dados['parkext']; ?>" size="20" maxlength="10" />
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Faixa de Estacionamento:</span></legend>
|
||
|
<input name="parkpos" type="text" class="validate[optional,length[0,100]] caixas" id="parkpos" value="<? echo $dados['parkpos']; ?>" size="20" maxlength="10" />
|
||
|
</fieldset></td>
|
||
|
</tr>
|
||
|
</table></td>
|
||
|
</tr>
|
||
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels">
|
||
|
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
|
<tr>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Timeout Estacionamento:</span></legend>
|
||
|
<input name="parkingtime" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="parkingtime" value="<? echo $dados['parkingtime']; ?>" size="20" maxlength="10" />
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Anuncia Estacionamento:</span></legend>
|
||
|
<input name="courtesytone" type="text" class="caixas" id="courtesytone" value="<? echo $dados['courtesytone']; ?>" size="20" maxlength="10" />
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Reproduzir Anuncio:</span></legend>
|
||
|
<select name="parkedplay" class="caixas">
|
||
|
<option value="parked" <? if ($dados['parkedplay']=='parked') { echo "selected";}?>>Parked</option>
|
||
|
<option value="caller" <? if ($dados['parkedplay']=='caller') { echo "selected";}?>>Caller</option>
|
||
|
<option value="both" <? if ($dados['parkedplay']=='both') { echo "selected";}?>>Both</option>
|
||
|
</select>
|
||
|
</fieldset></td>
|
||
|
</tr>
|
||
|
</table></td>
|
||
|
</tr>
|
||
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels">
|
||
|
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
|
<tr>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels">Avançar Faixa:</legend>
|
||
|
<input name="findslot" type="radio" value="next" <? if ($dados["findslot"]=='next'){ echo "checked";}?> />
|
||
|
Avançar
|
||
|
<input name="findslot" type="radio" value="first" <? if ($dados["findslot"]=='first'){ echo "checked";}?> />
|
||
|
Primeiro
|
||
|
Livre
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Musica em espera:</span></legend>
|
||
|
<select name="parkedmusicclass" class="caixas" id="parkedmusicclass">
|
||
|
<option value="">---------</option>
|
||
|
<?
|
||
|
$query2 = "SELECT * FROM pbx_musichold_grupos order by id asc";
|
||
|
$result2 = pg_query($dbcon, $query2);
|
||
|
while($dados2 = pg_fetch_array($result2)){
|
||
|
?>
|
||
|
<option value="<? echo $dados2['nome'];?>" <? if (trim($dados['parkedmusicclass'])==trim($dados2['nome'])){ echo "selected";} ?>><? echo $dados2['nome'];?></option>
|
||
|
<? }?>
|
||
|
</select>
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9"> Timeout Transferência:</span></legend>
|
||
|
<input name="atxfernoanswertimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="atxfernoanswertimeout2" value="<? echo $dados['atxfernoanswertimeout']; ?>" size="20" maxlength="10" />
|
||
|
|
||
|
</fieldset></td>
|
||
|
</tr>
|
||
|
</table></td>
|
||
|
</tr>
|
||
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels">
|
||
|
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
|
<tr>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Anuncia Transferencia:</span></legend>
|
||
|
<input name="xfersound" type="text" class="caixas" id="xfersound" value="<? echo $dados['xfersound']; ?>" size="20" maxlength="10" />
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels"><span class="style9">Anuncia Falha da Transferencia:</span></legend>
|
||
|
<input name="xferfailsound" type="text" class="caixas" id="xferfailsound" value="<? echo $dados['xferfailsound']; ?>" size="20" maxlength="10" />
|
||
|
</fieldset></td>
|
||
|
<td><fieldset>
|
||
|
<legend class="labels">Contexto:</legend>
|
||
|
<select name="context" class="caixas">
|
||
|
<option value="parkedcalls">estacionado</option>
|
||
|
<?
|
||
|
$query2 = "SELECT * FROM pbx_contextos order by id asc";
|
||
|
$result2 = pg_query($dbcon, $query2);
|
||
|
while($dados2 = pg_fetch_array($result2)){
|
||
|
?>
|
||
|
<option value="<? echo $dados2['nome'];?>" <? if (trim($dados['context'])==$dados2['nome']){ echo "selected";} ?>><? echo $dados2['nome'];?></option>
|
||
|
<? }?>
|
||
|
</select>
|
||
|
</fieldset></td>
|
||
|
</tr>
|
||
|
</table></td>
|
||
|
</tr>
|
||
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="labels">
|
||
|
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
|
<tr>
|
||
|
<td width="50%"><fieldset>
|
||
|
<legend class="labels"><span class="style9">Tempo para ativar a transferencia:</span></legend>
|
||
|
<input name="featuredigittimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="featuredigittimeout" value="<? echo $dados['featuredigittimeout']; ?>" size="20" maxlength="10" />
|
||
|
|
||
|
</fieldset></td>
|
||
|
<td width="50%"><fieldset>
|
||
|
<legend class="labels"><span class="style9">Tempo de discagem para transferencia:</span></legend>
|
||
|
<input name="transferdigittimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="transferdigittimeout" value="<? echo $dados['transferdigittimeout']; ?>" size="20" maxlength="10" />
|
||
|
|
||
|
</fieldset></td>
|
||
|
</tr>
|
||
|
</table></td>
|
||
|
</tr>
|
||
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
||
|
<td>
|
||
|
<div align="center"> <span class="style1">
|
||
|
<input name="Submit2" type="button" class="labels" onclick="fecha_popup();" value="Fechar">
|
||
|
</span>
|
||
|
<input name="Submit" type="submit" class="labels" value="Salvar">
|
||
|
</div></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</form>
|
||
|
<? }?>
|