|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<link rel="stylesheet" href="admin/css/validationEngine.jquery.css" type="text/css" media="screen" title="no title"/>
|
|
|
|
|
<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 () {}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
|
|
|
|
eval("deps.location='pop_departamento.php?id1=" + selObj.options[selObj.selectedIndex].value + "'");
|
|
|
|
|
if (restore)
|
|
|
|
|
selObj.selectedIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
//-->
|
|
|
|
|
</script>
|
|
|
|
|
<link href="admin/css/forms.css" rel="stylesheet" type="text/css">
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
|
|
|
|
|
<!--
|
|
|
|
|
body {
|
|
|
|
|
background-color: #EAEAEA;
|
|
|
|
|
margin-left: 0px;
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
margin-right: 0px;
|
|
|
|
|
margin-bottom: 0px;
|
|
|
|
|
}
|
|
|
|
|
-->
|
|
|
|
|
</style></head>
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if ($_GET["acao"] == "salva") {
|
|
|
|
|
$attach = trim($_POST["attach"]);
|
|
|
|
|
$format = trim($_POST["format"]);
|
|
|
|
|
$charset = trim($_POST["charset"]);
|
|
|
|
|
$delete = trim($_POST["delete"]);
|
|
|
|
|
$emailsubject = trim($_POST["emailsubject"]);
|
|
|
|
|
$emailbody = (trim($_POST["emailbody"]));
|
|
|
|
|
$serveremail = trim($_POST["serveremail"]);
|
|
|
|
|
$fromstring = trim($_POST["fromstring"]);
|
|
|
|
|
$mailcmd = trim($_POST["mailcmd"]);
|
|
|
|
|
$forcegreetings = trim($_POST["forcegreetings"]);
|
|
|
|
|
$forcename = trim($_POST["forcename"]);
|
|
|
|
|
$searchcontexts = trim($_POST["searchcontexts"]);
|
|
|
|
|
$maxmsg = trim($_POST["maxmsg"]);
|
|
|
|
|
$maxmessage = trim($_POST["maxmessage"]);
|
|
|
|
|
$minmessage = trim($_POST["minmessage"]);
|
|
|
|
|
$maxgreet = trim($_POST["maxgreet"]);
|
|
|
|
|
$maxsilence = trim($_POST["maxsilence"]);
|
|
|
|
|
$silencethreshold = trim($_POST["silencethreshold"]);
|
|
|
|
|
$maxlogins = trim($_POST["maxlogins"]);
|
|
|
|
|
$skipms = trim($_POST["skipms"]);
|
|
|
|
|
$usedirectory = trim($_POST["usedirectory"]);
|
|
|
|
|
$saycid = trim($_POST["saycid"]);
|
|
|
|
|
$emaildateformat = trim($_POST["emaildateformat"]);
|
|
|
|
|
$zonemessages = str_replace("'","''",trim($_POST["zonemessages"]));
|
|
|
|
|
|
|
|
|
|
//REALIZA BACKUP BO BANCO
|
|
|
|
|
//($dbcon,'pbx_voicemail_general','U','','update','VOICEMAIL_GENERAL');
|
|
|
|
|
|
|
|
|
|
$query = "UPDATE pbx_voicemail_general
|
|
|
|
|
SET
|
|
|
|
|
attach='$attach', format='$format', charset='$charset', delete='$delete', emailsubject='$emailsubject', emailbody=E'$emailbody', serveremail='$serveremail',
|
|
|
|
|
fromstring='$fromstring', mailcmd='$mailcmd', forcegreetings='$forcegreetings', forcename='$forcename', searchcontexts='$searchcontexts',
|
|
|
|
|
maxmsg='$maxmsg', maxmessage='$maxmessage', minmessage='$minmessage', maxgreet='$maxgreet', maxsilence='$maxsilence', silencethreshold='$silencethreshold',
|
|
|
|
|
maxlogins='$maxlogins', usedirectory='$usedirectory', saycid='$saycid', emaildateformat='$emaildateformat',zonemessages='$zonemessages'
|
|
|
|
|
";
|
|
|
|
|
$result = pg_query($dbcon, $query);
|
|
|
|
|
|
|
|
|
|
pg_query($dbcon, $query);
|
|
|
|
|
|
|
|
|
|
//grava o arquivo novo//gera arquivos e executa o reload dos dados no asterisk
|
|
|
|
|
gera_arquivos($dbcon, 'VOICEMAIL');
|
|
|
|
|
?>
|
|
|
|
|
<script>//fecha a janela presa no meio do sistema
|
|
|
|
|
fecha_popup();</script>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
$query = "SELECT * FROM pbx_voicemail_general";
|
|
|
|
|
$result = pg_query($dbcon, $query);
|
|
|
|
|
while ($dados = pg_fetch_array($result)) {
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<form name="form1" method="post" action="index.php?idProg=11132&pbxRequest=1&acao=salva" id="form1">
|
|
|
|
|
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0" class="tabela">
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA" class="cabecalho">
|
|
|
|
|
<td width="696" colspan="4" class="cabecalho"><div align="center">CONFIGURAÇÃO GLOBAL DE VOICEMAIL</div></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr class="labels">
|
|
|
|
|
<td width="25%"><fieldset>
|
|
|
|
|
<legend class="labels">Enviar Anexo:</legend>
|
|
|
|
|
<input name="attach" type="radio" value="yes" <?php
|
|
|
|
|
if ($dados["attach"] == 'yes') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Sim
|
|
|
|
|
<input name="attach" type="radio" value="no" <?php
|
|
|
|
|
if ($dados["attach"] == 'no') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Não
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="25%"><fieldset>
|
|
|
|
|
<legend class="labels">Deletar ap<EFBFBD>s Envio:</legend>
|
|
|
|
|
<input name="delete" type="radio" value="yes" <?php
|
|
|
|
|
if ($dados["delete"] == 'yes') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Sim
|
|
|
|
|
<input name="delete" type="radio" value="no" <?php
|
|
|
|
|
if ($dados["delete"] == 'no') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Não
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="25%"><fieldset>
|
|
|
|
|
<legend class="labels">Gravar Sauda<EFBFBD><EFBFBD>o no Primeiro Login:</legend>
|
|
|
|
|
<input name="forcegreetings" type="radio" value="yes" <?php
|
|
|
|
|
if ($dados["forcegreetings"] == 'yes') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Sim
|
|
|
|
|
<input name="forcegreetings" type="radio" value="no" <?php
|
|
|
|
|
if ($dados["forcegreetings"] == 'no') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Não
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr class="labels">
|
|
|
|
|
<td width="16%"><fieldset>
|
|
|
|
|
<legend class="labels">Reproduzir Identifica<EFBFBD><EFBFBD>o:</legend>
|
|
|
|
|
<input name="saycid" type="radio" value="yes" <?php
|
|
|
|
|
if ($dados["saycid"] == 'yes') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Sim
|
|
|
|
|
<input name="saycid" type="radio" value="no" <?php
|
|
|
|
|
if ($dados["saycid"] == 'no') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Não
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="17%"><fieldset>
|
|
|
|
|
<legend class="labels">Tentativas de Login Incorreto:</legend>
|
|
|
|
|
<input name="maxlogins" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["maxlogins"]; ?>" size="10" maxlength="10" id="maxlogins3">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td><fieldset>
|
|
|
|
|
<legend class="labels">Caracteres:</legend>
|
|
|
|
|
<input name="charset" type="text" class="validate[required] caixas" id="charset2" value="<?php echo $dados["charset"]; ?>" size="20">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td><fieldset>
|
|
|
|
|
<legend class="labels">Assunto:</legend><input name="emailsubject" type="text" class="validate[required] caixas" id="emailsubject" value="<?php echo $dados["emailsubject"]; ?>" size="80">
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td><fieldset>
|
|
|
|
|
<legend class="labels">Formato:</legend>
|
|
|
|
|
<select name="format" class="caixas" id="format">
|
|
|
|
|
<option value="">---------</option>
|
|
|
|
|
<option value="gsm" <?php
|
|
|
|
|
if (trim($dados["format"]) == "gsm") {
|
|
|
|
|
echo "selected";
|
|
|
|
|
}
|
|
|
|
|
?>>GSM</option>
|
|
|
|
|
<option value="wav" <?php
|
|
|
|
|
if (trim($dados["format"]) == "wav") {
|
|
|
|
|
echo "selected";
|
|
|
|
|
}
|
|
|
|
|
?>>WAV</option>
|
|
|
|
|
<option value="wav49" <?php
|
|
|
|
|
if (trim($dados["format"]) == "wav49") {
|
|
|
|
|
echo "selected";
|
|
|
|
|
}
|
|
|
|
|
?>>WAV 49</option>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td><fieldset>
|
|
|
|
|
<legend class="labels">Corpo:</legend>
|
|
|
|
|
<input name="emailbody" class="validate[required] caixas" id="emailbody2" value="<?php echo $dados["emailbody"]; ?>" size="90">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="33%"><fieldset>
|
|
|
|
|
<legend class="labels">Remetente:</legend>
|
|
|
|
|
<input name="serveremail" type="text" class="validate[required] caixas" value="<?php echo $dados["serveremail"]; ?>" id="serveremail">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="33%"><fieldset>
|
|
|
|
|
<legend class="labels">De:</legend>
|
|
|
|
|
<input name="fromstring" type="text" class="validate[required] caixas" value="<?php echo $dados["fromstring"]; ?>" id="fromstring2">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="33%"><fieldset>
|
|
|
|
|
<legend class="labels">Agente de Email:</legend>
|
|
|
|
|
<input name="mailcmd" type="text" class="validate[required] caixas" value="<?php echo $dados["mailcmd"]; ?>" id="mailcmd2">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="20%"><fieldset>
|
|
|
|
|
<legend class="labels">Maximo de mensagem na Caixa Postal:</legend>
|
|
|
|
|
<input name="maxmsg" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["maxmsg"]; ?>" size="3" maxlength="5" id="maxmsg">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="20%"><fieldset>
|
|
|
|
|
<legend class="labels">Dura<EFBFBD><EFBFBD>o minima da Mensagem:</legend>
|
|
|
|
|
<input name="minmessage" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["minmessage"]; ?>" size="3" maxlength="5" id="minmessage2">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="20%"><fieldset>
|
|
|
|
|
<legend class="labels">Dura<EFBFBD><EFBFBD>o Maxima da Sauda<EFBFBD><EFBFBD>o:</legend>
|
|
|
|
|
<input name="maxgreet" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["maxgreet"]; ?>" size="3" maxlength="5" id="maxgreet">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels"><div align="right"></div> <div align="right">
|
|
|
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td bordercolor="#FFFFFF" class="labels"><fieldset>
|
|
|
|
|
<legend class="labels">Duração Maxima das Mensagens:</legend>
|
|
|
|
|
<input name="maxmessage" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["maxmessage"]; ?>" size="3" maxlength="5" id="maxmessage2">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td bordercolor="#FFFFFF" class="labels"><fieldset>
|
|
|
|
|
<legend class="labels">Tempo em silencio para Hangup:</legend>
|
|
|
|
|
<input name="maxsilence" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["maxsilence"]; ?>" size="3" maxlength="5" id="maxsilence">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td bordercolor="#FFFFFF" class="labels"><fieldset>
|
|
|
|
|
<legend class="labels">Gravar Nome no Primeiro Login:</legend>
|
|
|
|
|
<input name="forcename" type="radio" value="yes" <?php
|
|
|
|
|
if ($dados["forcename"] == 'yes') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Sim
|
|
|
|
|
<input name="forcename" type="radio" value="no" <?php
|
|
|
|
|
if (!isset($dados["forcename"])) {
|
|
|
|
|
echo 'checked';
|
|
|
|
|
} else {
|
|
|
|
|
if ($dados["forcename"] == 'no') {
|
|
|
|
|
echo "checked";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>>
|
|
|
|
|
Não
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="33%" bordercolor="#FFFFFF" class="labels"><fieldset>
|
|
|
|
|
<legend class="labels">Nivel Sonoro para identificar Hangup:</legend>
|
|
|
|
|
<input name="silencethreshold" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?php echo $dados["silencethreshold"]; ?>" size="10" maxlength="10" id="silencethreshold2">
|
|
|
|
|
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="33%" bordercolor="#FFFFFF" class="labels"><fieldset>
|
|
|
|
|
<legend class="labels">Formato da Data:</legend>
|
|
|
|
|
<input name="emaildateformat" type="text" class="validate[required] caixas" value="<?php echo $dados["emaildateformat"]; ?>" id="emaildateformat">
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
<td width="33%" bordercolor="#FFFFFF" class="labels"><fieldset>
|
|
|
|
|
<legend class="labels">zonemessages:</legend>
|
|
|
|
|
<input name="zonemessages" type="text" class="validate[required] caixas" value="<?php echo $dados["zonemessages"]; ?>" size="30" maxlength="100" id="zonemessages">
|
|
|
|
|
</fieldset></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr bordercolor="#EAEAEA" bgcolor="#EAEAEA">
|
|
|
|
|
<td colspan="4" class="labels">
|
|
|
|
|
<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></td>
|
|
|
|
|
<td><?php } ?>
|
|
|
|
|
</td>
|