PABX da Simples IP
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.

178 lines
11 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
<title>Simples IP</title>
<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.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></head>
<body>
<?php
$acao = $_GET["acao"];
$acao2 = $_GET["acao2"];
if ($acao2 == "salva") {
$default_callprogress = $_POST['default_callprogress'];
$detectiontype = $_POST['detectiontype'];
$dialtype = $_POST['dialtype'];
$afterdialpause = $_POST['afterdialpause'];
$ringbacktone1 = $_POST['ringbacktone1'];
$ringbacktone2 = $_POST['ringbacktone2'];
$ringbacktimes = $_POST['ringbacktimes'];
$busytone1 = $_POST['busytone1'];
$busytone2 = $_POST['busytone2'];
$busytimes = $_POST['busytimes'];
$subchannelringtone1 = $_POST['subchannelringtone1'];
$subchannelringtone2 = $_POST['subchannelringtone2'];
$subchannelringtone2 = $_POST['subchannelringtone2'];
$subchannelringtimes = $_POST['subchannelringtimes'];
//REALIZA BACKUP BO BANCO
//backup($dbcon,'pbx_digivoice_allportsconfig','U','','update','DIGIVOICE PORT CONFIG');
$query = "UPDATE pbx_digivoice_allportsconfig
SET default_callprogress='$default_callprogress', detectiontype='$detectiontype', dialtype='$dialtype', afterdialpause='$afterdialpause',
ringbacktone1='$ringbacktone1', ringbacktone2='$ringbacktone2', ringbacktimes='$ringbacktimes', busytone1='$busytone1',
busytone2='$busytone2', busytimes='$busytimes', subchannelringtone1='$subchannelringtone1', subchannelringtone2='$subchannelringtone2',
subchannelringtimes='$subchannelringtimes'";
pg_query($dbcon, $query); //gera arquivos e executa o reload dos dados no asterisk
gera_arquivos($dbcon, 'DIGIVOICE');
?>
<script>//fecha a janela presa no meio do sistema
fecha_popup();</script>
<?php
}
$query = "SELECT * FROM pbx_digivoice_allportsconfig";
$result = pg_query($dbcon, $query);
if ($dados = pg_fetch_array($result)) {
?>
<form name="form1" method="post" action="index.php?idProg=11241&pbxRequest=1&acao2=salva">
<table width="364" border="1" align="center" cellpadding="0" cellspacing="0" class="tabela">
<tr bordercolor="#EAEAEA">
<td width="988" colspan="4" class="cabecalho"><div align="center">CONFIGURA&Ccedil;&Atilde;O DE PORTAS </div></td>
</tr>
<tr bordercolor="#EAEAEA">
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><fieldset>
<legend class="labels">Default CallProgress:</legend>
<input name="default_callprogress" type="text" class="caixas" id="default_callprogress" value="<?php echo $dados["default_callprogress"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">detectiontype:</legend>
<input name="detectiontype" type="text" class="caixas" id="detectiontype" value="<?php echo $dados["detectiontype"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">dialtype:</legend>
<input name="dialtype" type="text" class="caixas" id="dialtype2" value="<?php echo $dados["dialtype"]; ?>" size="20" maxlength="20" />
</fieldset></td>
</tr>
</table></td>
</tr>
<tr bordercolor="#EAEAEA">
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><fieldset>
<legend class="labels">afterdialpause:</legend>
<input name="afterdialpause" type="text" class="caixas" id="afterdialpause" value="<?php echo $dados["afterdialpause"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">ringbacktone1:</legend>
<input name="ringbacktone1" type="text" class="caixas" id="ringbacktone1" value="<?php echo $dados["ringbacktone1"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">ringbacktone2:</legend>
<input name="ringbacktone2" type="text" class="caixas" id="ringbacktone2" value="<?php echo $dados["ringbacktone2"]; ?>" size="20" maxlength="20" />
</fieldset></td>
</tr>
</table></td>
</tr>
<tr bordercolor="#EAEAEA">
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><fieldset>
<legend class="labels">ringbacktimes:</legend>
<input name="ringbacktimes" type="text" class="caixas" id="ringbacktimes" value="<?php echo $dados["ringbacktimes"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">busytone1:</legend>
<input name="busytone1" type="text" class="caixas" id="busytone1" value="<?php echo $dados["busytone1"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">busytone2:</legend>
<input name="busytone2" type="text" class="caixas" id="busytone2" value="<?php echo $dados["busytone2"]; ?>" size="20" maxlength="20" />
</fieldset></td>
</tr>
</table></td>
</tr>
<tr bordercolor="#EAEAEA">
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><fieldset>
<legend class="labels">busytimes:</legend>
<input name="busytimes" type="text" class="caixas" id="busytimes" value="<?php echo $dados["busytimes"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">subchannelringtone1:</legend>
<input name="subchannelringtone1" type="text" class="caixas" id="subchannelringtone1" value="<?php echo $dados["subchannelringtone1"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td><fieldset>
<legend class="labels">subchannelringtone2:</legend>
<input name="subchannelringtone2" type="text" class="caixas" id="subchannelringtone22" value="<?php echo $dados["subchannelringtone2"]; ?>" size="20" maxlength="20" />
</fieldset></td>
</tr>
</table></td>
</tr>
<tr bordercolor="#EAEAEA">
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="33%"><fieldset>
<legend class="labels">subchannelringtimes:</legend>
<input name="subchannelringtimes" type="text" class="caixas" id="subchannelringtimes2" value="<?php echo $dados["subchannelringtimes"]; ?>" size="20" maxlength="20" />
</fieldset></td>
<td width="33%">&nbsp;</td>
<td width="34%"></td>
</tr>
</table></td>
</tr>
<tr bordercolor="#EAEAEA">
<td colspan="4"><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">
<br>
</div></td>
</tr>
</table>
</form>
<?php } ?>