ok
Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/tnpsctestbatch.com/ |
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/tnpsctestbatch.com/a1.php |
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /><!-- BOOTSTRAP STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" /><!-- FONTAWESOME STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/feather.css" /><!-- FEATHER ICON SHEET --> <link rel="stylesheet" type="text/css" href="css/owl.carousel.min.css" /><!-- OWL CAROUSEL STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/magnific-popup.min.css" /><!-- MAGNIFIC POPUP STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/lc_lightbox.css" /><!-- Lc light box popup --> <link rel="stylesheet" type="text/css" href="css/bootstrap-select.min.css" /><!-- BOOTSTRAP SLECT BOX STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/dataTables.bootstrap5.min.css" /><!-- DATA table STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/select.bootstrap5.min.css" /><!-- DASHBOARD select bootstrap STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/dropzone.css" /><!-- DROPZONE STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/scrollbar.css" /><!-- CUSTOM SCROLL BAR STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/datepicker.css" /><!-- DATEPICKER STYLE SHEET --> <link rel="stylesheet" type="text/css" href="css/flaticon.css" /> <!-- Flaticon --> <link rel="stylesheet" type="text/css" href="css/swiper-bundle.min.css" /><!-- Swiper Slider --> <link rel="stylesheet" type="text/css" href="css/style.css" /><!-- MAIN STYLE SHEET --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css"> <?php include"config/config.php"; $itemsPerPage = 10; $current_page = isset($_GET['page']) ? $_GET['page'] : 1; $offset = ($current_page - 1) * $itemsPerPage; $statement = $pdo->prepare("SELECT * FROM tbl_current_affairs_titile WHERE current_status=1 LIMIT $itemsPerPage OFFSET $offset"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $statement = $pdo->prepare("SELECT * FROM tbl_current_affairs_titile WHERE current_status=1 order by id asc"); $statement->execute(); $rowCount = $statement->rowCount(); // Calculate the total number of pages $totalPages = ceil($rowCount / $itemsPerPage); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pagination Example</title> </head> <body> <?php $p=1; foreach ($result as $row){ echo "<br>".$row['id']; $p++;} echo '<br><br>'; ?> <div> <?php error_log("$current_page"); ?> <?php if ($current_page > 1): ?> <a href="?page=<?php echo $current_page - 1; ?>">Previous</a> <?php endif; ?> <?php for ($i = 1; $i <= $totalPages; $i++): ?> <a href="?page=<?php echo $i; ?>" <?php echo ($i == $current_page) ? 'style="font-weight: bold;"' : ''; ?>><?php echo $i; ?></a> <?php endfor; ?> <?php if ($current_page < $totalPages): ?> <a href="?page=<?php echo $current_page + 1; ?>">Next</a> <?php endif; ?> </div> </body> </html> <script src="js/jquery-3.6.0.min.js"></script><!-- JQUERY.MIN JS --> <script src="js/popper.min.js"></script><!-- POPPER.MIN JS --> <script src="js/bootstrap.min.js"></script><!-- BOOTSTRAP.MIN JS --> <script src="js/magnific-popup.min.js"></script><!-- MAGNIFIC-POPUP JS --> <script src="js/waypoints.min.js"></script><!-- WAYPOINTS JS --> <script src="js/counterup.min.js"></script><!-- COUNTERUP JS --> <script src="js/waypoints-sticky.min.js"></script><!-- STICKY HEADER --> <script src="js/isotope.pkgd.min.js"></script><!-- MASONRY --> <script src="js/imagesloaded.pkgd.min.js"></script><!-- MASONRY --> <script src="js/owl.carousel.min.js"></script><!-- OWL SLIDER --> <script src="js/theia-sticky-sidebar.js"></script><!-- STICKY SIDEBAR --> <script src="js/lc_lightbox.lite.js"></script><!-- IMAGE POPUP --> <script src="js/bootstrap-select.min.js"></script><!-- Form js --> <script src="js/dropzone.js"></script><!-- IMAGE UPLOAD --> <script src="js/jquery.scrollbar.js"></script><!-- scroller --> <script src="js/bootstrap-datepicker.js"></script><!-- scroller --> <script src="js/jquery.dataTables.min.js"></script><!-- Datatable --> <script src="js/dataTables.bootstrap5.min.js"></script><!-- Datatable --> <script src="js/chart.js"></script><!-- Chart --> <script src="js/bootstrap-slider.min.js"></script><!-- Price range slider --> <script src="js/swiper-bundle.min.js"></script><!-- Swiper JS --> <script src="js/custom.js"></script><!-- CUSTOM FUCTIONS --> <script src="js/switcher.js"></script><!-- SHORTCODE FUCTIONS -->