<?php
$configDao = new \Dao\Configuracoes();
$configDao->getConfiguracoes($conecta);
?>
<div class="breadcrumb-holder">
    <div class="container-fluid">
        <ul class="breadcrumb">
            <li class="breadcrumb-item"><a href="./">Home</a></li>
            <li class="breadcrumb-item active">Editar Configurações</li>
        </ul><!--/.breadcrumb -->
    </div><!---/.container-fluid -->
</div><!--/.breadcrumb-holder -->
<section class="dashboard-counts section-padding">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header d-flex align-items-center">
                        <h2 class="h5 display">Editar Configurações</h2>
                    </div><!--/.card-header -->
                    <div class="card-body">
                        <form class="form-horizontal" method="post" action="?p=salvar" enctype="multipart/form-data">
                            <input type="hidden" name="id" id="id" value="<?php echo $configDao->id; ?>">
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Título</label>
                                <div class="col-sm-7">
                                    <input type="text" name="titulo" id="titulo" placeholder="Título" value="<?php echo $configDao->titulo; ?>" maxlength="150" class="form-control" required autofocus>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Nº 0800</label>
                                <div class="col-sm-3">
                                    <input type="text" name="zero_800" id="zero_800" placeholder="Nº 0800" value="<?php echo $configDao->zero_800; ?>" maxlength="20" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">WhatsApp</label>
                                <div class="col-sm-3">
                                    <input type="text" name="whatsapp" id="whatsapp" placeholder="WhatsApp" value="<?php echo $configDao->whatsapp; ?>" maxlength="20" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Facebook</label>
                                <div class="col-sm-6">
                                    <input type="text" name="facebook" id="facebook" placeholder="Facebook" value="<?php echo $configDao->facebook; ?>" maxlength="90" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Instagram</label>
                                <div class="col-sm-6">
                                    <input type="text" name="instagram" id="instagram" placeholder="Instagram" value="<?php echo $configDao->instagram; ?>" maxlength="90" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Intagram Access Token</label>
                                <div class="col-sm-9">
                                    <input type="text" name="access_token" id="access_token" placeholder="Intagram Access Token" value="<?php echo $configDao->access_token; ?>" maxlength="200" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Email</label>
                                <div class="col-sm-5">
                                    <input type="email" name="email" id="email" placeholder="Email" value="<?php echo $configDao->email; ?>" maxlength="50" class="form-control" required>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Endereço</label>
                                <div class="col-sm-9">
                                    <input type="text" name="endereco" id="endereco" placeholder="Endereço" value="<?php echo $configDao->endereco; ?>" maxlength="200" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2"></label>
                                <div class="col-sm-2">
                                    <button class="btn btn-sm btn-primary">
                                        <i class="fa fa-database"></i> Salvar
                                    </button>
                                </div>
                            </div><!--/.form-group -->
                        </form>
                    </div><!--/.card-body -->
                </div><!--/.card -->
            </div><!--/.col-lg-12 -->
        </div><!--/.row -->
    </div><!--/.container-fluid -->
</section><!--/.dashboard-counts -->