<?php
ini_set('display_errors', 0);
require_once './Control/ControlSistema.php';
require_once './Util/formAjax/FormAjax.php';
$lang = 'pt';
$controlSistema = new ControlSistema();
$config = $controlSistema->pegarUmConfiguracao(1);
?>
<form name="frmConfig" id="frmConfig" action="adm_configCMD.php" method="post">
    <input id="hacao" name="acao" type="hidden" value="alterar">
    <input id="lang" name="lang" type="hidden" value="<?php echo $lang?>">
    <input id="arqFrm" name="arqFrm" type="hidden" value="adm_configForm.php">
	<fieldset>
		<label>Configurações Gerais</label>
                <section><label for="txtHost">Endereço do SMTP</label>
                    <div><input type="text" id="txtHost" name="txtHost" required value="<?php echo $config->getHost(); ?>"></div>
		</section>
                <section><label for="txtEmail">Usuário</label>
                    <div><input type="text" id="txtEmail" name="txtEmail" value="<?php echo $config->getEmail(); ?>"></div>
		</section>
                <section><label for="txtSenha">Senha</label>
                    <div><input type="password" id="txtSenha" name="txtSenha" value="<?php echo $config->getSenha(); ?>"></div>
		</section>
                <section><label for="txtEmailContato">E-mail</label>
                    <div><input type="text" id="txtEmailContato" name="txtEmailContato" value="<?php echo $config->getEmailcontato(); ?>"></div>
		</section>
                
                <section><label for="txtConfig1">Url para Reserva On-line</label>
                    <div><input type="text" id="txtConfig1" name="txtConfig1" value="<?php echo $config->getConfig1(); ?>"></div>
		</section>
                <!--
                <section><label for="txtConfig2">Config2</label>
                    <div><input type="text" id="txtConfig2" name="txtConfig2" value="<?php echo $config->getConfig2(); ?>"></div>
		</section>
                <section><label for="txtConfig3">Config3</label>
                    <div><input type="text" id="txtConfig3" name="txtConfig3" value="<?php echo $config->getConfig3(); ?>"></div>
		</section>
                <section><label for="txtConfig4">Config4</label>
                    <div><input type="text" id="txtConfig4" name="txtConfig4" value="<?php echo $config->getConfig4(); ?>"></div>
		</section>
                <section><label for="txtConfig5">Config5</label>
                    <div><input type="text" id="txtConfig5" name="txtConfig5" value="<?php echo $config->getConfig5(); ?>"></div>
		</section>
                <section><label for="txtConfig6">Config6</label>
                    <div><input type="text" id="txtConfig6" name="txtConfig6" value="<?php echo $config->getConfig6(); ?>"></div>
		</section>
                <section><label for="txtConfig7">Config7</label>
                    <div><input type="text" id="txtConfig7" name="txtConfig7" value="<?php echo $config->getConfig7(); ?>"></div>
		</section>
                <section><label for="txtConfig1">Config8</label>
                    <div><input type="text" id="txtConfig8" name="txtConfig8" value="<?php echo $config->getConfig8(); ?>"></div>
		</section>
                <section><label for="txtConfig1">Config9</label>
                    <div><input type="text" id="txtConfig9" name="txtConfig9" value="<?php echo $config->getConfig9(); ?>"></div>
		</section>
                <section><label for="txtConfig1">Config10</label>
                    <div><input type="text" id="txtConfig10" name="txtConfig10" value="<?php echo $config->getConfig10(); ?>"></div>
		</section>-->
                <section>
                    <div><button onclick="FecharConfig();" >Fechar</button><button id="salvar" class="submit" name="submitbuttonname" value="submitbuttonvalue">Salvar</button></div>
		</section>
	</fieldset>
</form>
<?php
      FormAjax::PrepararFormAjax('#frmConfig');
?>
<script>
    $('#txtSenha').wl_Password();
    function FecharConfig()
    {
        var $pageoptions = $('#pageoptions');
        $pageoptions.animate({'height':20});
	$(this).removeClass('active');
    }
    </script>