ok
Direktori : /home/pequenacapitolio/www/administrador/ |
Current File : /home/pequenacapitolio/www/administrador/ferramentas_admin.php |
<?php include '../conexao.php'; // ############# UPDATE PAGINA ################### if (isset($_GET["act"]) && $_GET["act"] == "editar1") { $analytics = $_POST["analytics"]; $dados_titulo = array( 'analytics' => $analytics, ); $conn->prepare("UPDATE perfil SET g_analytics = :analytics WHERE idperfil = 1")->execute($dados_titulo); $redirect = "/administrador/ferramentas_admin.php"; //$redirect = "http://www.tchaudor.com.br/administrador/ferramentas_admin.php"; header("location:$redirect"); } if (isset($_GET["act"]) && $_GET["act"] == "editar2") { $addthis = $_POST["addthis"]; $dados_titulo = array( 'addthis' => $addthis, ); $conn->prepare("UPDATE perfil SET s_geral = :addthis WHERE idperfil = 1")->execute($dados_titulo); $redirect = "/administrador/ferramentas_admin.php"; //$redirect = "http://www.tchaudor.com.br/administrador/ferramentas_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"> <!-- 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: 32px;margin-top: 1%;margin-bottom: 0px">Gerenciamento de Ferramentas</p> </div> <div class="col-md-8" style="height: 34px;padding-left: 0px"> <p style="color: #3a3a3a;font-size: 14px;">Tela Inicial/Gerenciamento de Ferramentas</p> </div> <div class="col-md-4" style="text-align: right;margin-bottom: 1%"> <!-- <a href="categorias_pagina_admin.php" class="btn btn-primary btn-flat" style="margin-right: 4%">Gerenciar Categorias</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-md-12" style="height: 22px"> </div> <!-- Main content --> <section class="content"> <?php $pag = $conn->query("SELECT g_analytics, s_geral FROM perfil where idperfil = 1"); $ferramentas = $pag->fetch(PDO::FETCH_OBJ); ?> <div class="row"> <div class="col-xs-12"> <div class="box" style="border:0px"> <div class="box-body table-responsive no-padding" > <!-- <a href="#" data-toggle="modal" data-target="#modal-inserir" class="btn btn-primary btn-flat" style="float:right; margin:20px;">Inserir Pagina</a> --> </div> <tr> <!-- <table class="table table-hover"> <tr> <th width="50%"><p style="padding-left: 2%;padding-top:1%;font-size:20px;color:#040404;font-weight: 700">Páginas do Portal</p></th> <th width="5%"> <div class="box-tools" style="margin-top: 4%"> <div class="input-group input-group-sm hidden-xs" style="width: 150px;"> <input type="text" name="table_search" class="form-control pull-right" placeholder="Search"> <div class="input-group-btn"> <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button> </div> </div> </div> </th> </tr> </table> --> <!-- <a href="#" data-toggle="modal" data-target="#modal-ferramentas" class="btn btn-primary btn-flat" style="float:right; margin-top:14px;margin-bottom: 10px">Gerenciar Feramenta</a> --> <?php if ($pag->rowCount()) {?> <!-- /.box-header --> <div class="box-body table-responsive no-padding" style="background: #ecf0f5"> <div class="col-md-12" style="background: #fff;border-top:5px solid #408db9"> <div class="col-md-12" style="margin-top: 2%;text-align: center;margin-bottom: 2%"> <div class="col-md-12" style="background: #ecf0f5;"> <div class="col-md-12" style="padding: 0px;text-align: left;"> <div class="col-md-8"> <p style="font-size: 21px;margin-top: 10px">Google Analytics </p> </div> <div class="col-md-4" style="padding-top: 15px;text-align: right;"> <a style="height: 40px" href="#" data-toggle="modal" data-target="#modal-analytics"><i style="color: #000" class="fas fa-pencil-alt"></i></a> </div> <div class="col-md-12" style="padding: 0px;"> <pre> <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo $ferramentas->g_analytics ?>"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '<?php echo $ferramentas->g_analytics ?>'); </script> </pre> </div> </div> </div> <?php $aux = $ferramentas->s_geral; $aux = str_replace("<script", "<script", $aux); $aux = str_replace("</script>", "</script><br><br>", $aux); ?> </div> <div class="col-md-12" style="margin-top: 2%;text-align: center;margin-bottom: 2%"> <div class="col-md-12" style="background: #ecf0f5;"> <div class="col-md-12" style="padding: 0px;text-align: left;"> <div class="col-md-8"> <p style="font-size: 21px;margin-top: 10px">Scripts Gerais</p> </div> <div class="col-md-4" style="padding-top: 15px;text-align: right;"> <a style="height: 40px" href="#" data-toggle="modal" data-target="#modal-addthis"><i style="color: #000" class="fas fa-pencil-alt"></i></a> </div> <div class="col-md-12" style="height: 300px;padding-top: 2% !important;padding-left: 2% !important;padding: 0px;margin-bottom: 10px;background: #f5f5f5;"> <?php echo $aux ?> </div> </div> </div> </div> </div> </div> <?php }?> <!-- /.box-body --> </div> <!-- /.box --> </div> </div> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include 'estrutura_rodape.php';?> <?php $pag = $conn->query("SELECT g_analytics, s_geral FROM perfil where idperfil = 1"); $ferramentas = $pag->fetch(PDO::FETCH_OBJ); ?> <!-- ########## MODAL INSERIR ########## --> <div class="modal fade" id="modal-analytics"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button> <h4 class="modal-title">Gerenciar Google Analytics</h4> </div> <div class="modal-body"> <div class="row"> <form action="ferramentas_admin.php?act=editar1" method="POST" enctype="multipart/form-data"> <!-- <div class="col-xs-12 pad"> <input type="text" name="titulo" class="form-control" placeholder="Titulo*" required> </div> <div class="col-xs-12 pad"> <input type="text" name="subtitulo" class="form-control" placeholder="Subtitulo"> </div> --> <div class="col-xs-12 pad"> <input type="text" name="analytics" class="form-control" placeholder="Código" value="<?php echo $ferramentas->g_analytics ?>"> </div> <div class="col-xs-12 pad"> <button type="submit" class="btn btn-primary" style="margin-top:20px;">Salvar</button> </div> </form> </div> </div> <!-- <div class="modal-footer"> <button type="button" class="btn btn-default pull-left" data-dismiss="modal">Fechar</button> </div> --> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> <!-- ########## MODAL INSERIR ########## --> <div class="modal fade" id="modal-addthis"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button> <h4 class="modal-title">Gerenciar Scripts Gerais</h4> </div> <div class="modal-body"> <div class="row"> <form action="ferramentas_admin.php?act=editar2" method="POST" enctype="multipart/form-data"> <!-- <div class="col-xs-12 pad"> <input type="text" name="titulo" class="form-control" placeholder="Titulo*" required> </div> <div class="col-xs-12 pad"> <input type="text" name="subtitulo" class="form-control" placeholder="Subtitulo"> </div> --> <div class="col-xs-12 pad" style="height: 300px"> <textarea type="text" name="addthis" class="form-control" placeholder="Código" style="height: 300px"> <?php echo $ferramentas->s_geral ?> </textarea> </div> <div class="col-xs-12 pad"> <button type="submit" class="btn btn-primary" style="margin-top:20px;">Salvar</button> </div> </form> </div> </div> <!-- <div class="modal-footer"> <button type="button" class="btn btn-default pull-left" data-dismiss="modal">Fechar</button> </div> --> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> <!-- 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> <script type="text/javascript"> function reloadPage(){ location.reload(true); } </script> </body> </html>