* Verifica se o usuario pressionou o bot<EFBFBD>o para inserir
* o registro
*/
if ($formAction == FORM_UPDATE) {
GetGpValues($dbcon);
} else {
GetGpValues(null);
if (trim($_POST["motivo"] == "")) {
//GetGpValues(null);
$msgUser = "alert('\"Motivo\" <EFBFBD> campo de preenchimento obrigat<EFBFBD>rio!');";
} else if (RegistroInc($dbcon, sprintf("select count(*) from pbx_motivos_pausas where upper(motivo) = %s and id <> '%s'", QuotedStr(strtoupper($_POST["motivo"])), $id))) {
$msgUser = sprintf("alert('O \"Motivo: %s\" j<EFBFBD> existe na base de dados!');", $_POST["motivo"]);
} else {
//string para inser<EFBFBD><EFBFBD>o do registro
$query = "update pbx_motivos_pausas set motivo = %s, flag = %s, produtiva = %s, tempo_alerta = %s where id = %d";
//GetGpValues(null);
//Prepara a query para inserir o registro no banco