<?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">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" id="form-config" 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">Titulo</label>
                                <div class="col-sm-8">
                                    <input type="text" name="titulo" id="titulo" placeholder="Titulo" value="<?php echo $configDao->titulo; ?>" maxlength="150" class="form-control" required autofocus>
                                </div><!--/.col-sm-8 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Email</label>
                                <div class="col-sm-4">
                                    <input type="email" name="email" id="email1" placeholder="Email" value="<?php echo $configDao->email; ?>" maxlength="50" class="form-control" required>
                                </div><!--/.col-sm-4 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Nº Serviços</label>
                                <div class="col-sm-2">
                                    <input type="number" name="num_servios" id="num_servios" placeholder="Nº Serviços" value="<?php echo $configDao->num_servicos; ?>" min="0" max="9999" class="form-control" required>
                                </div><!--/.col-sm-2 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Facebook</label>
                                <div class="col-sm-5">
                                    <input type="text" name="facebook" id="facebook" placeholder="Facebook" value="<?php echo $configDao->facebook; ?>" maxlength="70" class="form-control">
                                </div><!--/.col-sm-5 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Twitter</label>
                                <div class="col-sm-5">
                                    <input type="text" name="twitter" id="twitter" placeholder="Twitter" value="<?php echo $configDao->twitter; ?>" maxlength="70" class="form-control">
                                </div><!--/.col-sm-5 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Google +</label>
                                <div class="col-sm-5">
                                    <input type="text" name="google_plus" id="google_plus" placeholder="Google +" value="<?php echo $configDao->google_plus; ?>" maxlength="70" class="form-control">
                                </div><!--/.col-sm-5 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Pinterest</label>
                                <div class="col-sm-5">
                                    <input type="text" name="pinterest" id="pinterest" placeholder="Pinterest" value="<?php echo $configDao->pinterest; ?>" maxlength="70" class="form-control">
                                </div><!--/.col-sm-5 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Instagram</label>
                                <div class="col-sm-5">
                                    <input type="text" name="instagram" id="instagram" placeholder="Instagram" value="<?php echo $configDao->instagram; ?>" maxlength="70" class="form-control">
                                </div><!--/.col-sm-5 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Telefone</label>
                                <div class="col-sm-3">
                                    <input type="tel" name="telefone" id="telefone" placeholder="Telefone" value="<?php echo $configDao->telefone; ?>" maxlength="20" class="form-control">
                                </div><!--/.col-sm-3 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Descrição</label>
                                <div class="col-sm-10">
                                    <textarea cols="13" rows="5" name="descricao" id="descricao" class="form-control" placeholder="Descrição"><?php echo stripslashes($configDao->descricao); ?></textarea>
                                </div><!--/.col-sm-10 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Keywords</label>
                                <div class="col-sm-10">
                                    <textarea cols="13" rows="5" name="keywords" id="keywords" class="form-control" placeholder="Keywords"><?php echo stripslashes($configDao->keywords); ?></textarea>
                                </div><!--/.col-sm-10 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Horário Funcionamento</label>
                                <div class="col-sm-7">
                                    <input type="text" name="horario_funcionamento" id="horario_funcionamento" placeholder="Horário Funcionamento" value="<?php echo $configDao->horario_funcionamento; ?>" maxlength="80" class="form-control">
                                </div><!--/.col-sm-7 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Endereço</label>
                                <div class="col-sm-10">
                                    <input type="text" name="endereco" id="endereco" placeholder="Endereço" value="<?php echo $configDao->endereco; ?>" maxlength="200" class="form-control">
                                </div><!--/.col-sm-10 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2 form-label">Google Maps</label>
                                <div class="col-sm-10">
                                    <textarea cols="13" rows="5" name="googlemaps" id="googlemaps" class="form-control" placeholder="Google Maps"><?php echo htmlentities(stripslashes($configDao->googlemaps)); ?></textarea>
                                </div><!--/.col-sm-10 -->
                            </div><!--/.form-group -->
                            <div class="form-group row">
                                <label class="col-sm-2"></label>
                                <div class="col-sm-10">
                                    <button class="btn btn-sm btn-primary pull-right">
                                        <i class="fa fa-database"></i> Salvar
                                    </button>
                                </div><!--/.col-sm-2 -->
                            </div><!--/.form-group -->
                        </form>
                    </div><!--/.card-body -->
                </div><!--/.card -->
            </div><!--/.col-lg-12 -->
        </div><!--/.row -->
    </div><!--/.container-fluid -->
</section><!--/.dashboard-counts -->
<style>
    .selectize-control.multi .selectize-input > div {
        padding: 2px 6px;
        margin: 0 3px 3px 0;
        cursor: pointer;
        border: 1px solid #0073bb;
    }   
    .selectize-input > * {
        display: -moz-inline-stack;
        display: inline-block;
        *display: inline;
        vertical-align: baseline;
        zoom: 1;
    }
</style>