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.
 
 
 
 
 
 

114 lines
6.4 KiB

<?php
$acao = $_GET['acao'];
$id = $_GET['id'];
if ($acao == "deleta") {
$id = $_GET["id"] ?? "0";
//REALIZA BACKUP BO BANCO
backup($dbcon, 'pbx_sip_notify', 'D', $id, 'delete', 'SIP_NOTIFY');
$query = "delete from pbx_sip_notify where id='$id'";
pg_query($dbcon, $query); //gera arquivos e executa o reload dos dados no asterisk
gera_arquivos($dbcon, 'SIP_NOTIFY');
?>
<script>MM_goToURL('sip_notify.php');</script>
<?php } ?>
<html>
<head>
<script>
function pergunta_apaga(id, nome) {
if (confirm('DESEJA REALMENTE APAGAR A NOTIFICAÇÃO:' + nome + '?')) {
MM_goToURL('sip_notify.php?acao=deleta&id=' + id + '&id2=' + nome);
}
}
</script>
<title>Administra&ccedil;&atilde;o Asterisk</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--Fireworks MX 2004 Dreamweaver MX 2004 target. Created Thu Nov 26 17:34:28 GMT-0300 (Hora oficial do Brasil) 2009-->
<style type="text/css">
<!--
.style11 {
font-size: 12px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
}
.style13 {color: #FFFFFF; font-size: 12px; font-style: italic; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
-->
</style>
</head>
<body bgcolor="#dddddd">
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="Untitled-1.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "2027375799" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="95" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="117" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="117" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="451" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="4" rowspan="2"><?php include ('menu.php'); ?></td>
<td><img src="images/spacer.gif" width="1" height="77" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="58" border="0" alt=""></td>
</tr>
<tr>
<td colspan="4" align="center" valign="top" bordercolor="#FFFFFF"><br>
<table width="100%" border="1" cellpadding="0" cellspacing="1" bordercolor="#990000">
<tr class="cabecalho">
<td colspan="4"><div align="center">CADASTRO DE notifica&Ccedil;&Atilde;O SIP </div></td>
</tr>
<tr bordercolor="#990000" bgcolor="#990000" class="cabecalho2">
<td width="8%"> <div align="center">Id</span></div></td>
<td width="39%"> nome </td>
<td width="42%"> evento </td>
<td width="11%"><div align="center"><span class="style11">A&Ccedil;&Atilde;O</span></div></td>
</tr>
<?php
$janW = '500';
$janH = '400';
$query = "SELECT * FROM pbx_sip_notify order by id asc";
$result = pg_query($dbcon, $query);
$z == 0;
while ($dados = pg_fetch_array($result)) {
?>
<tr bordercolor="#FFFFB6" class="dados">
<td><div align="center"><?php echo $dados['id']; ?></div></td>
<td><?php echo $dados['nome']; ?></td>
<td><?php echo $dados['event']; ?></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><a href="cadSipNotify.php?acao=edita&id=<?php echo $dados['id']; ?>"><img src="images/edit.gif" alt="EDITAR A NOTIFICAÇÃO:<?php echo $dados['nome']; ?>" width="22" height="22" border="0"></a></div></td>
<td><div align="center"><a href="#"><img src="images/delete.gif" alt="APAGAR A NOTIFICAÇÃO:<?php echo $dados['nome']; ?>" width="22" height="22" border="0" onClick="pergunta_apaga('<?php echo $dados['id']; ?>', '<?php echo $dados['nome']; ?>');"></a></div></td>
</tr>
</table></td>
</tr>
<?php
$z++;
} if ($z == 0) {
?>
<tr align="center" valign="middle" bordercolor="#999999" class="labels">
<td colspan="4"><div align="center"><img src="images/n_reg.gif" width="30" height="30" align="absmiddle"> N&atilde;o foram encontrados registros </div></td>
</tr>
<?php } ?>
<tr bordercolor="#DDDDDD">
<td colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" bgcolor="#FFFFFF" class="botoes"><div align="center"><a href="ramais.php"><img src="images/novo.gif" width="20" height="20" border="0" align="absmiddle">VOLTAR PARA RAMAIS SIP </a></div></td>
<td width="25%" bgcolor="#FFFFFF" class="botoes"><div align="center"><a href="cadSipNotify.php?acao=inseri"><img src="images/novo.gif" width="20" height="20" border="0" align="absmiddle">NOVA NOTIFICA&Ccedil;&Atilde;O </a></div></td>
</tr>
</table></td>
</tr>
</table></td>
<td><img src="images/spacer.gif" width="1" height="292" border="0" alt=""></td>
</tr>
</table>
</body>
</html>