|
|
<!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="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"> |
|
|
</head> |
|
|
|
|
|
<body> |
|
|
<?php |
|
|
$tpLayout = 1; |
|
|
$acao = $_GET["acao"]; |
|
|
$org_id = GetOrganizacao(); |
|
|
|
|
|
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"]); |
|
|
|
|
|
$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 |
|
|
WHERE id = $id;"; |
|
|
|
|
|
pg_query($dbcon, $query); |
|
|
gera_arquivos($dbcon, 'FEATURE_GENERAL'); |
|
|
|
|
|
echo "<script>fecha_popup(1);</script>"; |
|
|
} |
|
|
$query = "SELECT * FROM pbx_features_general WHERE org_id = $org_id;"; |
|
|
$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ÇÃO GLOBAL DE ESTACIONAMENTO E TRANSFERÊNCIA</div> |
|
|
<input name="id" type="hidden" id="id2" value="<?= ($acao == 'edita') ? $id : null; ?>" /> |
|
|
</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> </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" <?= ($dados['parkedplay'] == 'parked') ? "selected" : null; ?>>Parked</option> |
|
|
<option value="caller" <?= ($dados['parkedplay'] == 'caller') ? "selected" : null; ?>>Caller</option> |
|
|
<option value="both" <?= ($dados['parkedplay'] == 'both') ? "selected" : null; ?>>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" <?= ($dados["findslot"] == 'next') ? "checked" : null; ?> /> |
|
|
Avançar |
|
|
<input name="findslot" type="radio" value="first" <?= ($dados["findslot"] == 'first') ? "checked" : null; ?> /> |
|
|
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 WHERE org_id = $org_id ORDER BY id asc"; |
|
|
$result2 = pg_query($dbcon, $query2); |
|
|
$opt = ""; |
|
|
while ($dados2 = pg_fetch_array($result2)) { |
|
|
$select = ""; |
|
|
if (trim($dados['parkedmusicclass']) == trim($dados2['nome'])) { |
|
|
$select = "selected"; |
|
|
} |
|
|
$opt .= "<option value='{$dados2['nome']}' $select>{$dados2['nome']}</option>"; |
|
|
echo $opt; |
|
|
} |
|
|
?> |
|
|
</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="<?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 WHERE org_id = $org_id order by id asc"; |
|
|
$result2 = pg_query($dbcon, $query2); |
|
|
$opt = ""; |
|
|
while ($dados2 = pg_fetch_array($result2)) { |
|
|
$select = ""; |
|
|
if (trim($dados['context']) == $dados2['nome']) { |
|
|
$select = "selected"; |
|
|
} |
|
|
$opt .= "<option value='{$dados2['nome']}' $select>{$dados2['nome']}</option>"; |
|
|
echo $opt; |
|
|
} |
|
|
?> |
|
|
</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>
|