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.
 
 
 
 
 
 

306 lines
19 KiB

<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">
</head>
<body>
<?php
$org_id = GetOrganizacao();
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"]));
$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);
gera_arquivos($dbcon, 'VOICEMAIL');
echo '<script>fecha_popup();</script>';
}
$query = "SELECT * FROM pbx_voicemail_general WHERE org_id = $org_id;";
$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&Ccedil;&Atilde;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" <?= ($dados["attach"] == 'yes') ? "checked" : null; ?>>
Sim
<input name="attach" type="radio" value="no" <?= ($dados["attach"] == 'no') ? "checked" : null; ?>>
N&atilde;o
</fieldset>
</td>
<td width="25%">
<fieldset>
<legend class="labels">Deletar ap<EFBFBD>s Envio:</legend>
<input name="delete" type="radio" value="yes" <?= ($dados["delete"] == 'yes') ? "checked" : null; ?>>
Sim
<input name="delete" type="radio" value="no" <?= ($dados["delete"] == 'no') ? "checked" : null; ?>>
N&atilde;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" <?= ($dados["forcegreetings"] == 'yes') ? "checked" : null; ?>>
Sim
<input name="forcegreetings" type="radio" value="no" <?= ($dados["forcegreetings"] == 'no') ? "checked" : null; ?>>
N&atilde;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" <?= ($dados["saycid"] == 'yes') ? "checked" : null; ?>>
Sim
<input name="saycid" type="radio" value="no" <?= ($dados["saycid"] == 'no') ? "checked" : null; ?>>
N&atilde;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="<?= $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="<?= $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="<?= $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" <?= (trim($dados["format"]) == "gsm") ? "selected" : null; ?>>GSM</option>
<option value="wav" <?= (trim($dados["format"]) == "wav") ? "selected" : null; ?>>WAV</option>
<option value="wav49" <?= (trim($dados["format"]) == "wav49") ? "selected" : null; ?>>WAV 49</option>
</select>
</fieldset>
</td>
<td>
<fieldset>
<legend class="labels">Corpo:</legend>
<input name="emailbody" class="validate[required] caixas" id="emailbody2" value="<?= $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="<?= $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="<?= $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="<?= $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="<?= $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="<?= $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="<?= $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&ccedil;&atilde;o Maxima das Mensagens:</legend>
<input name="maxmessage" type="text" class="validate[required,custom[onlyNumber],length[0,100]] caixas" value="<?= $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="<?= $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" <?= ($dados["forcename"] == 'yes') ? "checked" : null; ?>>
Sim
<input name="forcename" type="radio" value="no" <?= (!isset($dados["forcename"])) ? 'checked' : (($dados["forcename"] == 'no') ? "checked" : null); ?> />
N&atilde;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="<?= $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="<?= $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="<?= $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>
<?php } ?>
</body>
</html>