![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/www/ondjoweb/admin/ |
<?php session_start(); include('includes/config.php'); error_reporting(0); if (strlen($_SESSION['login']) == 0) { header('location:index.php'); } else { // Code for aprove if ($_GET['appid']) { $id = intval($_GET['appid']); $query = mysqli_query($con, "update tblcomments set status=1 where id=$id"); $msg = "Comentário aprovado "; } // Code for deletion if ($_GET['delcom']) { $id = intval($_GET['delcom']); $query = mysqli_query($con, "delete from tblcomments where id=$id"); $delmsg = "Comentário eliminado definitivamente"; } ?> <!DOCTYPE html> <html lang="pt"> <head> <title>OndjoBYTES | Gerir Comentários Inactivos</title> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/core.css" rel="stylesheet" type="text/css" /> <link href="assets/css/components.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/pages.css" rel="stylesheet" type="text/css" /> <link href="assets/css/menu.css" rel="stylesheet" type="text/css" /> <link href="assets/css/responsive.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="../plugins/switchery/switchery.min.css"> <script src="assets/js/modernizr.min.js"></script> </head> <body class="fixed-left"> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include('includes/topheader.php'); ?> <!-- ========== Left Sidebar Start ========== --> <?php include('includes/leftsidebar.php'); ?> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container"> <div class="row"> <div class="col-xs-12"> <div class="page-title-box"> <h4 class="page-title">Gerir comentários não aprovados</h4> <ol class="breadcrumb p-0 m-0"> <li> <a href="#">Admin</a> </li> <li> <a href="#">Comentários </a> </li> <li class="active"> Desaprovar comentário </li> </ol> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row"> <div class="col-sm-6"> <?php if ($msg) { ?> <div class="alert alert-success" role="alert"> <strong>Sucesso!</strong> <?php echo htmlentities($msg); ?> </div> <?php } ?> <?php if ($delmsg) { ?> <div class="alert alert-danger" role="alert"> <strong>Oh pá!</strong> <?php echo htmlentities($delmsg); ?></div> <?php } ?> </div> <div class="row"> <div class="col-md-12"> <div class="demo-box m-t-20"> <div class="table-responsive"> <table class="table m-0 table-colored-bordered table-bordered-primary"> <thead> <tr> <th>#</th> <th> Nome</th> <th>Email</th> <th width="300">Comentário</th> <th>Status</th> <th>Post relacionado</th> <th>Data</th> <th>Acção</th> </tr> </thead> <tbody> <?php $query = mysqli_query($con, "Select tblcomments.id, tblcomments.name,tblcomments.email,tblcomments.postingDate,tblcomments.comment,tblposts.id as postid,tblposts.PostTitulo from tblcomments join tblposts on tblposts.id=tblcomments.postId where tblcomments.status=0"); $cnt = 1; while ($row = mysqli_fetch_array($query)) { ?> <tr> <th scope="row"><?php echo htmlentities($cnt); ?></th> <td><?php echo htmlentities($row['name']); ?></td> <td><?php echo htmlentities($row['email']); ?></td> <td><?php echo htmlentities($row['comment']); ?></td> <td><?php $st = $row['status']; if ($st == 0) : echo "<span style='color: red'>Pendente</span>"; else : echo "<span style='color: blue'>Activo</span>"; endif; ?></td> <td><a href="edit-post.php?pid=<?php echo htmlentities($row['postid']); ?>"><?php echo htmlentities($row['PostTitulo']); ?></a> </td> <td><?php echo htmlentities($row['postingDate']); ?></td> <td> <a href="unapprove-comment.php?appid=<?php echo htmlentities($row['id']); ?>" title="Aprovar"><i class="ion-arrow-return-right" style="color: #29b6f6;"></i></a> <a href="unapprove-comment.php?delcom=<?php echo htmlentities($row['id']); ?>" title="Rejeitar"><i class="fa fa-trash-o" style="color: red;"></i></a> </td> </tr> <?php $cnt++; } ?> </tbody> </table> </div> </div> </div> </div> <!--- end row --> <div class="row"> <div class="col-md-12"> <div class="demo-box m-t-20"> <div class="m-b-30"> </div> </div> </div> </div> </div> <!-- container --> </div> <!-- content --> <?php include('includes/footer.php'); ?> </div> </div> <!-- END wrapper --> <script> var resizefunc = []; </script> <!-- jQuery --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/detect.js"></script> <script src="assets/js/fastclick.js"></script> <script src="assets/js/jquery.blockUI.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <script src="assets/js/jquery.scrollTo.min.js"></script> <script src="../plugins/switchery/switchery.min.js"></script> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> </body> </html> <?php } ?>