<?php 
echo form_open_multipart($MyMod . "/atualizando-cadastro/" . $id, array ('class' => 'form validate', 'id' => 'form_principal')); 
?>

<div class="wrapper wrapper-content animated fadeInUp">
	<?php echo view('view_header'); ?>

	<?php if(isset($conf_gerais->data_cadastro) AND !empty($conf_gerais->data_cadastro)) { ?>
		<div class="row">
			<div class="col-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<i class="fa-light fa-calendar mr-1"></i> Este conteúdo foi criado em <b><?php echo date("d-m-Y H:i:s", strtotime($conf_gerais->data_cadastro)); ?> </b>
						
						<?php if(isset($conf_gerais->data_alteracao) AND !empty($conf_gerais->data_alteracao)) { ?>
							e alterado em <b><?php echo date("d-m-Y H:i:s", strtotime($conf_gerais->data_alteracao)); ?></b>
						<?php } ?>
					</div>
				</div>
			</div>
		</div>
	<?php } ?>

	<div class="row">
		<div class="col-12">
			<div class="ibox float-e-margins border-danger">
				<div class="ibox-title">
					<h5>
						Google reCAPTCHA
					</h5>
				</div>

				<div class="ibox-content">
					<div class="row">
						<div class="col-12">
							<label for="form_login" class="form-label">
								Formulário de login:
							</label>

							<div class="input-group mb-3">
								<label class="input-group-text" for="form_login">
									<i class="fa-light fa-gear"></i>
								</label>

								<select class="form-select" data-rule-required="true" data-msg-required="Campo obrigatório." id="form_login" name="form_login">
									<option value="" disabled selected hidden></option>
									<option <?php if(isset($conf_gerais->form_login) AND $conf_gerais->form_login == '1') { echo 'selected'; } ?> value="1">Usar no formulário de login</option>
									<option <?php if(isset($conf_gerais->form_login) AND $conf_gerais->form_login == '0') { echo 'selected'; } ?> value="0">Não usar no formulário de login</option>
								</select>
							</div>
						</div>

						<div class="col-12">
							<label for="form_contato" class="form-label">
								Formulário de contato:
							</label>

							<div class="input-group mb-0">
								<label class="input-group-text" for="form_contato">
									<i class="fa-light fa-gear"></i>
								</label>

								<select class="form-select" data-rule-required="true" data-msg-required="Campo obrigatório." id="form_contato" name="form_contato">
									<option value="" disabled selected hidden></option>
									<option <?php if(isset($conf_gerais->form_contato) AND $conf_gerais->form_contato == '1') { echo 'selected'; } ?> value="1">Usar nos formulários de contatos</option>
									<option <?php if(isset($conf_gerais->form_contato) AND $conf_gerais->form_contato == '0') { echo 'selected'; } ?> value="0">Não usar nos formulários de contato</option>
								</select>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-12">
			<div class="ibox float-e-margins border-danger">
				<div class="ibox-title">
					<h5>
						2FA
					</h5>
				</div>

				<div class="ibox-content">
					<div class="row">
						<div class="col-12">
							<label for="form_twofa" class="form-label">
								Autenticação de 2 fatores
							</label>

							<div class="input-group mb-0">
								<label class="input-group-text" for="form_twofa">
									<i class="fa-light fa-2"></i>
								</label>

								<select class="form-select" data-rule-required="true" data-msg-required="Campo obrigatório." id="form_twofa" name="form_twofa">
									<option value="" disabled selected hidden></option>
									<option <?php if(isset($conf_gerais->form_twofa) AND $conf_gerais->form_twofa == '1') { echo 'selected'; } ?> value="1">Usar autenticação de 2 fatores</option>
									<option <?php if(isset($conf_gerais->form_twofa) AND $conf_gerais->form_twofa == '0') { echo 'selected'; } ?> value="0">Não usar autenticação de 2 fatores</option>
								</select>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-12">
			<div class="ibox float-e-margins border-danger">
				<div class="ibox-title">
					<h5>
						URLLIST, SITEMAPS, ROBOTS
					</h5>
				</div>

				<div class="ibox-content">
					<div class="row">
						<div class="col-6">
							<label for="form_urllist" class="form-label">
								Gerar URL list
							</label>

							<div class="input-group mb-3">
								<label class="input-group-text" for="form_urllist">
									<i class="fa-light fa-list-ul"></i>
								</label>

								<select class="form-select" data-rule-required="false" data-msg-required="Campo obrigatório." id="form_urllist" name="form_urllist">
									<option value="" disabled selected hidden></option>
									<option <?php if(isset($conf_gerais->form_urllist) AND $conf_gerais->form_urllist == '1') { echo 'selected'; } ?> value="1">Sim</option>
									<option <?php if(isset($conf_gerais->form_urllist) AND $conf_gerais->form_urllist == '0') { echo 'selected'; } ?> value="0">Não</option>
								</select>
							</div>
						</div>

						<div class="col-6">
							<label for="form_sitemap" class="form-label">
								Gerar sitemap
							</label>

							<div class="input-group mb-3">
								<label class="input-group-text" for="form_sitemap">
									<i class="fa-light fa-sitemap"></i>
								</label>

								<select class="form-select" data-rule-required="false" data-msg-required="Campo obrigatório." id="form_sitemap" name="form_sitemap">
									<option value="" disabled selected hidden></option>
									<option <?php if(isset($conf_gerais->form_sitemap) AND $conf_gerais->form_sitemap == '1') { echo 'selected'; } ?> value="1">Sim</option>
									<option <?php if(isset($conf_gerais->form_sitemap) AND $conf_gerais->form_sitemap == '0') { echo 'selected'; } ?> value="0">Não</option>
								</select>
							</div>
						</div>

						<div class="col-6">
							<label for="form_robots" class="form-label">
								Gerar robots
							</label>

							<div class="input-group mb-0">
								<label class="input-group-text" for="form_robots">
									<i class="fa-light fa-robot"></i>
								</label>

								<select class="form-select" data-rule-required="false" data-msg-required="Campo obrigatório." id="form_robots" name="form_robots">
									<option value="" disabled selected hidden></option>
									<option <?php if(isset($conf_gerais->form_robots) AND $conf_gerais->form_robots == '1') { echo 'selected'; } ?> value="1">Sim</option>
									<option <?php if(isset($conf_gerais->form_robots) AND $conf_gerais->form_robots == '0') { echo 'selected'; } ?> value="0">Não</option>
								</select>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<?php echo view('Views\view_logs'); ?>
</div>

<?php echo view('Views\view_footer'); ?>
<?php echo form_close(); ?>