![]() 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{ if($_GET['action']='restore') { $postid=intval($_GET['pid']); $query=mysqli_query($con,"update tblposts set Is_Active=1 where id='$postid'"); if($query) { $msg="Post recuperado com sucesso "; } else{ $error="Algo deu errado . Por favor tente outra vez."; } } // Code for Forever deletionparmdel if($_GET['presid']) { $id=intval($_GET['presid']); $query=mysqli_query($con,"delete from tblposts where id='$id'"); $delmsg="Post apagado definitivamente"; } ?> <!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content="Coderthemes"> <!-- App favicon --> <link rel="shortcut icon" href="assets/images/favicon.ico"> <!-- App title --> <title>OndjoWEB | Gestão de Posts</title> <!--Morris Chart CSS --> <link rel="stylesheet" href="../plugins/morris/morris.css"> <!-- jvectormap --> <link href="../plugins/jvectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet" /> <!-- App css --> <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"> <!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> <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');?> <!-- ============================================================== --> <!-- 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">Posts na lixeira </h4> <ol class="breadcrumb p-0 m-0"> <li> <a href="#">Admin</a> </li> <li> <a href="#">Posts</a> </li> <li class="active"> Posts na lixeira </li> </ol> <div class="clearfix"></div> </div> </div> </div> <!-- end row --> <div class="row"> <div class="col-sm-6"> <?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-sm-12"> <div class="card-box"> <div class="table-responsive"> <table class="table table-colored table-centered table-inverse m-0"> <thead> <tr> <th>Título</th> <th>Categoria</th> <th>Subcategoria</th> <th>Acção</th> </tr> </thead> <tbody> <?php $query=mysqli_query($con,"select tblposts.id as postid,tblposts.PostTitulo as title,tblcategoria.CategoryName as category,tblsubcategoria.Subcategory as subcategory from tblposts left join tblcategoria on tblcategoria.id=tblposts.categoria left join tblsubcategoria on tblsubcategoria.SubCategoryId=tblposts.subCategoria where tblposts.Is_Active=0"); $rowcount=mysqli_num_rows($query); if($rowcount==0) { ?> <tr> <td colspan="4" align="center"><h3 style="color:red">Sem registo</h3></td> <tr> <?php } else { while($row=mysqli_fetch_array($query)) { ?> <tr> <td><b><?php echo htmlentities($row['title']);?></b></td> <td><?php echo htmlentities($row['category'])?></td> <td><?php echo htmlentities($row['subcategory'])?></td> <td> <a href="trash-posts.php?pid=<?php echo htmlentities($row['postid']);?>&&action=restore" onclick="return confirm('Quer realmente recuperar ?')"> <i class="ion-arrow-return-right" title="Recuperar Post"></i></a> <a href="trash-posts.php?presid=<?php echo htmlentities($row['postid']);?>&&action=perdel" onclick="return confirm('Quer realmente apagar ?')"><i class="fa fa-trash-o" style="color: #f05050" title="Apagar Post Permanentemente"></i></a> </td> </tr> <?php } }?> </tbody> </table> </div> </div> </div> </div> </div> <!-- container --> </div> <!-- content --> <?php include('includes/footer.php');?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </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> <!-- CounterUp --> <script src="../plugins/waypoints/jquery.waypoints.min.js"></script> <script src="../plugins/counterup/jquery.counterup.min.js"></script> <!--Morris Chart--> <script src="../plugins/morris/morris.min.js"></script> <script src="../plugins/raphael/raphael-min.js"></script> <!-- Load page level scripts--> <script src="../plugins/jvectormap/jquery-jvectormap-2.0.2.min.js"></script> <script src="../plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script> <script src="../plugins/jvectormap/gdp-data.js"></script> <script src="../plugins/jvectormap/jquery-jvectormap-us-aea-en.js"></script> <!-- Dashboard Init js --> <script src="assets/pages/jquery.blog-dashboard.js"></script> <!-- App js --> <script src="assets/js/jquery.core.js"></script> <script src="assets/js/jquery.app.js"></script> </body> </html> <?php } ?>