<?php
require_once './Control/ControlSistema.php';
require_once './Util/formAjax/FormAjax.php';
extract($_POST);
$pk =1;
$controlSistema = new ControlSistema();
$config = $controlSistema->pegarUmConfiguracao(1);
$config->setHost(stripslashes($txtHost));
$config->setEmail(stripslashes($txtEmail));
$config->setSenha(stripslashes($txtSenha));
$config->setEmailContato(stripslashes($txtEmailContato));
$config->setConfig1(stripslashes($txtConfig1));
/* 
$config->setConfig2(stripslashes($txtConfig2));
$config->setConfig3(stripslashes($txtConfig3));
$config->setConfig4(stripslashes($txtConfig4));
$config->setConfig5(stripslashes($txtConfig5));
$config->setConfig6(stripslashes($txtConfig6));
$config->setConfig7(stripslashes($txtConfig7));
$config->setConfig8(stripslashes($txtConfig8));
$config->setConfig9(stripslashes($txtConfig9));
$config->setConfig10(stripslashes($txtConfig10));
*/
$retorno = $controlSistema->SalvarUmConfiguracao($config);
    if ($retorno == 0)
    {
        echo '<h1>Ops!</h1><p>Ocorreu algum erro!</p>';
    } else
    {   
        echo 'Registro foi salvo com sucesso!';
        $codJava = 'mostrarArquivoDados(\'' . $arqFrm .'\',\'#divConfig\',\'acao=alterar&pk=' . $pk . '&lang=ptbr\');';
        echo '<script>' . $codJava . '</script>';
    }
?>