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.
 
 
 
 
 
 

220 lines
14 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Simples IP</title></head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="admin/css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="ISO-8859-1" />
<script type="text/javascript" src="admin/js/jquery-1.4.js"></script>
<script type="text/javascript" src="admin/js/jquery.blockUI.js?v2.29"></script>
<script src="admin/js/jquery.min.js" type="text/javascript"></script>
<script src="admin/js/jquery.validationEngine.js" type="text/javascript"></script>
<script src="admin/js/jquery.validationEngine-en.js" type="text/javascript"></script>
<script src="admin/js/pbxAjax.js" type="text/javascript"></script>
<script>
$(document).ready(function () {
$("#form1").validationEngine({
sucess: function () {
document.form1.submit();
},
failure: function () {}
})
});
</script>
<link href="admin/css/forms.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #EAEAEA;
}
-->
</style>
<body>
<?php
$tpLayout = 1;
$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 = 'yes'; //trim($_POST["adsipark"]);
$findslot = trim($_POST["findslot"]);
$parkedmusicclass = trim($_POST["parkedmusicclass"]);
$transferdigittimeout = trim($_POST["transferdigittimeout"]);
$xfersound = 'beep'; //trim($_POST["xfersound"]);
$xferfailsound = 'beeperr'; //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', featuredigittimeout='$featuredigittimeout',
atxfernoanswertimeout='$atxfernoanswertimeout',context='$context',transferdigittimeout=$transferdigittimeout";
pg_query($dbcon, $query);
gera_arquivos($dbcon, 'FEATURE_GENERAL');
echo "<script>fecha_popup(1);</script>";
}
$query = "SELECT * FROM pbx_features_general";
$result = pg_query($dbcon, $query);
$dados = pg_fetch_array($result);
?>
<form name="form1" method="post" action="index.php?idProg=10037&pbxRequest=1&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&Ccedil;&Atilde;O GLOBAL DE ESTACIONAMENTO E TRANSFER&Ecirc;NCIA</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"><span class="style9">N<EFBFBD>mero:</span></legend>
<input name="parkext" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="parkext" value="<?php echo $dados['parkext']; ?>" size="20" maxlength="10" />
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9">Faixa:</span></legend>
<input name="parkpos" type="text" class="validate[optional,length[0,100]] caixas" id="parkpos" value="<?php echo $dados['parkpos']; ?>" size="20" maxlength="10" />
</fieldset></td>
<td>&nbsp;</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:</span></legend>
<input name="parkingtime" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="parkingtime" value="<?php echo $dados['parkingtime']; ?>" size="20" maxlength="10" />
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9">Anuncio:</span></legend>
<input name="courtesytone" type="text" class="caixas" id="courtesytone" value="<?php echo $dados['courtesytone']; ?>" size="20" maxlength="10" />
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9">Reproduzir An<EFBFBD>ncio:</span></legend>
<select name="parkedplay" class="caixas">
<option value="parked" <?php
if ($dados['parkedplay'] == 'parked') {
echo "selected";
}
?>>Parked</option>
<option value="caller" <?php
if ($dados['parkedplay'] == 'caller') {
echo "selected";
}
?>>Caller</option>
<option value="both" <?php
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&ccedil;ar Faixa:</legend>
<input name="findslot" type="radio" value="next" <?php
if ($dados["findslot"] == 'next') {
echo "checked";
}
?> />
Avan&ccedil;ar
<input name="findslot" type="radio" value="first" <?php
if ($dados["findslot"] == 'first') {
echo "checked";
}
?> />
Primeiro
Livre
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9">M<EFBFBD>sica em espera:</span></legend>
<select name="parkedmusicclass" class="caixas" id="parkedmusicclass">
<option value="">---------</option>
<?php
$query2 = "SELECT * FROM pbx_musichold_grupos order by id asc";
$result2 = pg_query($dbcon, $query2);
while ($dados2 = pg_fetch_array($result2)) {
?>
<option value="<?php echo $dados2['nome']; ?>" <?php
if (trim($dados['parkedmusicclass']) == trim($dados2['nome'])) {
echo "selected";
}
?>><?php echo $dados2['nome']; ?></option>
<?php } ?>
</select>
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9"> Timeout Transfer&ecirc;ncia:</span></legend>
<input name="atxfernoanswertimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="atxfernoanswertimeout2" value="<?php 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">Contexto:</legend>
<select name="context" class="caixas">
<option value="parkedcalls">estacionado</option>
<?php
$query2 = "SELECT * FROM pbx_contextos order by id asc";
$result2 = pg_query($dbcon, $query2);
while ($dados2 = pg_fetch_array($result2)) {
?>
<option value="<?php echo $dados2['nome']; ?>" <?php
if (trim($dados['context']) == $dados2['nome']) {
echo "selected";
}
?>><?php echo $dados2['nome']; ?></option>
<?php } ?>
</select>
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9">Tempo para ativar a transfer<EFBFBD>ncia:</span></legend>
<input name="featuredigittimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="featuredigittimeout" value="<?php echo $dados['featuredigittimeout']; ?>" size="20" maxlength="10" />
</fieldset></td>
<td><fieldset>
<legend class="labels"><span class="style9">Tempo de discagem para transfer<EFBFBD>ncia:</span></legend>
<input name="transferdigittimeout" type="text" class="validate[optional,custom[onlyNumber],length[0,100]] caixas" id="transferdigittimeout" value="<?php 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(1);" value="Fechar">
</span>
<input name="Submit" type="submit" class="labels" value="Salvar">
</div></td>
</tr>
</table>
</form>