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.
 
 
 
 
 
 

30 lines
1.0 KiB

<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$acaoForm = FORM_SAVE;
$erro = IsPostBack() ? ValidaSite($fields, $fieldsName) : "";
if (IsPostBack() && empty($erro)) {
$query = "update pbx_sites
set host = %s,
usuario = %s,
senha = %s,
basedados = %s,
porta = %s,
descricao = %s,
status = %s
where id = %s ";
$query = sprintf($query, QuotedStr($host), QuotedStr($usuario), QuotedStr($senha), QuotedStr($basedados), QuotedStr($porta), QuotedStr($descricao), $status, $id);
$result = pg_query($dbcon, $query);
if ($result) {
$erro = "Registro alterado com sucesso!";
$jsStartup[] = "window.opener.ResetForm();";
} else
$erro = "A operação não pode ser realizada! " . (IsAdmin() ? ("Erro: " . pg_last_error($dbcon)) : "");
}
?>