ok
Direktori : /home/pequenacapitolio/www/administrador/ |
Current File : /home/pequenacapitolio/www/administrador/entrada.php |
<?php include '../conexao.php'; // ############# INSERE PAGINA ################### if (isset($_GET["act"]) && $_GET["act"] == "inserir") { $pag_titulo = $_POST["titulo"]; $pag_subtitulo = $_POST["subtitulo"]; $pag_categoria = $_POST["categoria"]; $pag_corpo = $_POST["editor1"]; $dados_cat = array( 'titulo' => $pag_titulo, 'subtitulo' => $pag_subtitulo, 'categoria' => $pag_categoria, 'corpo' => $pag_corpo ); $conn->prepare("INSERT INTO paginas (titulo, subtitulo, corpo, id_categoria) VALUES (:titulo, :subtitulo, :corpo, :categoria)")->execute($dados_cat); $redirect = "https://adaptweb.com.br/administrador/paginas_admin.php"; //$redirect = "http://www.tchaudor.com.br/administrador/paginas_admin.php"; header("location:$redirect"); } // ############# DELETA PAGINA ################### if (isset($_GET["act"]) && $_GET["act"] == "excluir") { $pag_exclui = $_GET["id"]; $dados_cat = array( 'id' => $pag_exclui, ); $conn->prepare("DELETE FROM paginas WHERE idpagina = :id")->execute($dados_cat); $redirect = "https://adaptweb.com.br/administrador/paginas_admin.php"; //$redirect = "http://www.tchaudor.com.br/administrador/paginas_admin.php"; header("location:$redirect"); } // ############# UPDATE PAGINA ################### if (isset($_GET["act"]) && $_GET["act"] == "editar") { $pag_id = $_GET["id"]; $titulo_edita = $_POST["titulo"]; $subtitulo_edita = $_POST["subtitulo"]; $categoria_edita = $_POST["categoria"]; $corpo_edita = $_POST["editor2"]; $dados_titulo = array( 'id' => $pag_id, 'titulo' => $titulo_edita, 'subtitulo' => $subtitulo_edita, 'categoria' => $categoria_edita, 'corpo' => $corpo_edita ); $conn->prepare("UPDATE paginas SET titulo = :titulo, subtitulo = :subtitulo, corpo = :corpo, id_categoria = :categoria WHERE idpagina = :id")->execute($dados_titulo); $redirect = "https://adaptweb.com.br/administrador/paginas_admin.php"; //$redirect = "http://www.tchaudor.com.br/administrador/paginas_admin.php"; header("location:$redirect"); } ?> <!DOCTYPE html> <html> <head> <?php include 'include_head.php';?> </head> <body class="hold-transition skin-blue sidebar-mini"> <!-- Site wrapper --> <div class="wrapper"> <?php include 'estrutura_menu.php';?> <!-- =============================================== --> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <div class="content-wrapper" style="text-align: left;margin-left: 0px"> <!-- Content Header (Page header) --> <!-- <section class="content-header"> <h1> Paginas Admin --> <!-- <small>it all starts here</small> --> <!-- </h1> --> <!-- <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Início</a></li> <li><a href="#">Paginas</a></li> <li><a href="#">Gerenciar Paginas</a></li> </ol> --> <!-- </section> --> <div class="col-md-12" style="background: #fff;border-bottom: 1px solid #bbbbbb"> <div class="col-md-12" style="text-align: left;padding-left: 0px"> <p style="color: #040404;font-weight: 700;font-size: 28px;margin-top: 1%;margin-bottom: 0px">DashBoard Painel de Gestão AdaptWeb 4.0</p> </div> <div class="col-md-8" style="height: 34px;padding-left: 0px"> <p style="color: #3a3a3a;font-size: 14px;">Tela Inicial</p> </div> <div class="col-md-4" style="text-align: right;margin-bottom: 1%"> <!-- <a href="#" data-toggle="modal" data-target="#modal-inserir" class="btn btn-primary btn-flat" style="margin-right: 4%">Gerenciar Categoria</a> <a href="#" data-toggle="modal" data-target="#modal-inserir" class="btn btn-primary btn-flat">Inserir Página</a> --> </div> </div> <div class="col-xs-12" style="margin-top: 2%;background: #eceff4"> <div class="row"> <div class="col-md-4 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-aqua"><i style="width: auto !important;" class="fas fa-file-alt"></i></span> <?php $pag = $conn->query("SELECT count(idpagina) as conta FROM paginas "); $contpaginas = $pag->fetch(PDO::FETCH_OBJ); ?> <div class="info-box-content"> <span class="info-box-text">Páginas</span> <span class="info-box-number"><?php echo $contpaginas->conta ?></span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <div class="col-md-4 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-red"><i style="width: auto !important;" class="far fa-newspaper"></i></span> <?php $blog = $conn->query("SELECT count(idnoticias) as conta FROM noticias "); $contblog = $blog->fetch(PDO::FETCH_OBJ); ?> <div class="info-box-content"> <span class="info-box-text">Blog</span> <span class="info-box-number"><?php echo $contblog->conta ?></span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <!-- fix for small devices only --> <div class="clearfix visible-sm-block"></div> <?php $contato = $conn->query("SELECT count(idcontato) as conta FROM contato "); $contcontato = $contato->fetch(PDO::FETCH_OBJ); ?> <div class="col-md-4 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-green"><i style="width: auto !important;" class="fas fa-headset"></i></span> <div class="info-box-content"> <span class="info-box-text">Contatos</span> <span class="info-box-number"><?php echo $contcontato->conta ?></span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <!-- <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-yellow"><i style="width: auto !important;" class="fas fa-book-open"></i></span> <div class="info-box-content"> <span class="info-box-text">Leads</span> <span class="info-box-number">2,000</span> </div> </div> </div> --> </div> </div> <div class="col-md-12" style="margin-top: 3%;background: #eceff4"> <div class="col-md-8"> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Ultimos Contatos do site</h3> <?php $contatos = $conn->query("SELECT * FROM contato order by idcontato desc limit 6"); ?> <div class="box-tools pull-right"> <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> </button> <!-- <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> --> </div> </div> <!-- /.box-header --> <div class="box-body"> <div class="table-responsive"> <table class="table no-margin"> <thead> <tr> <th width="15%">Data</th> <th width="55%">Nome</th> <th width="30%">Assunto</th> </tr> </thead> <tbody> <?php while ($contatosite = $contatos->fetch(PDO::FETCH_OBJ)) {?> <tr> <td><?php echo $contatosite->data ?></td> <td><?php echo $contatosite->nome ?></td> <td><?php echo $contatosite->assunto ?></td> </tr> <?php }?> </tbody> </table> </div> <!-- /.table-responsive --> </div> <!-- /.box-body --> <div class="box-footer clearfix"> <a href="contato_admin.php" class="btn btn-sm btn-default btn-flat pull-right">Ver todos os Contatos</a> </div> <!-- /.box-footer --> </div> </div> <div class="col-md-4"> <!-- Info Boxes Style 2 --> <div class="info-box bg-green"> <span class="info-box-icon"><i style="width: auto !important;" class="fab fa-whatsapp"></i></span> <div class="info-box-content"> <span class="info-box-text">Canais de Comunicação</span> <span class="info-box-number">WhatsApp | Chat | Forms</span> <span class="progress-description"> Potencialize seu projeto com canais </span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <div class="info-box bg-yellow"> <span class="info-box-icon"><i style="width: auto !important;" class="fas fa-location-arrow"></i></span> <div class="info-box-content"> <span class="info-box-text">CTA</span> <span class="info-box-number">Chamada para ação</span> <span class="progress-description"> Direcione os internautas para cadastros </span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <div class="info-box bg-red"> <span class="info-box-icon"><i style="width: auto !important;" class="fab fa-google"></i></span> <div class="info-box-content"> <span class="info-box-text">Conteúdo</span> <span class="info-box-number">Apareça no Google </span> <span class="progress-description"> Desenvolva conteúdo para seu site </span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <div class="info-box bg-aqua"> <span class="info-box-icon"><i style="width: auto !important;" class="fas fa-users"></i></span> <div class="info-box-content"> <span class="info-box-text">Google Ads</span> <span class="info-box-number">+ Acessos em seu site</span> <span class="progress-description"> Fale com a AdaptWeb, comece uma campanha </span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <!-- /.box --> </div> </div> <!-- <div class="col-md-12" style="height: 22px"> <div class="col-md-4"></div> <div class="col-md-4"></div> <div class="col-md-4"></div> <div class="col-md-4"></div> </div> --> </div> <!-- ############# CORPO VAZIO ################## --> </div> <!-- /.content-wrapper --> <?php include 'estrutura_rodape.php';?> <!-- Add the sidebar's background. This div must be placed immediately after the control sidebar --> <div class="control-sidebar-bg"></div> </div> <!-- ./wrapper --> <!-- jQuery 3 --> <script src="bower_components/jquery/dist/jquery.min.js"></script> <!-- Bootstrap 3.3.7 --> <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <!-- SlimScroll --> <script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script> <!-- FastClick --> <script src="bower_components/fastclick/lib/fastclick.js"></script> <!-- CK Editor --> <script src="bower_components/ckeditor/ckeditor.js"></script> <!-- AdminLTE App --> <script src="dist/js/adminlte.min.js"></script> <!-- AdminLTE for demo purposes --> <script src="dist/js/demo.js"></script> <script> $(document).ready(function () { $('.sidebar-menu').tree() }) </script> </body> </html>