ok
Direktori : /home2/selectio/public_html/tnpsctestbatch.com/ |
Current File : /home2/selectio/public_html/tnpsctestbatch.com/a.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"; $load_limit=5; $start=0; $showing_limit=2; if($_GET['page']){ $start=($_GET['page']*$load_limit)-$load_limit; }else{ $start=0; } $statement = $pdo->prepare("SELECT * FROM tbl_current_affairs_titile WHERE current_status=1 order by id asc"); $statement->execute(); $totalCount = $statement->rowCount(); $statement = $pdo->prepare("SELECT * FROM tbl_current_affairs_titile WHERE current_status=1 order by id asc limit $start,$load_limit"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); $p=1; foreach ($result as $row){ echo "<br>".$row['id']; $p++;} echo '<br><br>'; if($_GET['page']){ $start=$_GET['page']; } $page=ceil($totalCount/$load_limit); if($start>1){ echo '<a href="a.php?page='.(1).'" class="btn btn-info btn-xs"> << First</a> '; echo '<a href="a.php?page='.($start-1).'" class="btn btn-info btn-xs"> << Priviews</a> '; } for($s=($start-$showing_limit);($s<=$start && $s>0);$s++){ if($start==$s){ $btn='success';}else{$btn='default'; } echo '<a href="a.php?page='.$s.'" class="btn btn-'.$btn.' btn-xs"> '.($s).'</a> '; } for($e=$s;($e<=$page && $e<$s+$showing_limit);$e++){ if($start==$e){ $btn='success';}else{$btn='default'; } echo '<a href="a.php?page='.$e.'" class="btn btn-'.$btn.' btn-xs"> '.($e).'</a> '; } if($start<$page){ echo '<a href="a.php?page='.($start+1).'" class="btn btn-info btn-xs">Next >></a> '; echo '<a href="a.php?page='.($page).'" class="btn btn-info btn-xs">Last >></a> '; } ?>