View file iblog/admin/tables/themes_tbl.php

File size: 1.77Kb
<?php 
include "../../lib/functions_class.php"; 
include "../../lib/pagination.php";

$orderby = $_POST['orderby'];

	/*Pagination Property*/
	$adjacents = 2;
	$targetpage = "themes_tbl.php";
	$limit = $_POST['rowlimit'];		
	$page = $_POST['page'];
	$total_pages = $DB->totaltheme();

	if($page) {
		$start = ($page - 1) * $limit;
	}else{
		$start = 0;		
	}	
	
	$pagination_out = pagination($tbl_name,$adjacents,$total_pages,$targetpage,$limit,$page,$start);
/*Pagination Property*/
	
?>
<div class="row">
	<?php 
		$i=1;
		$fetch = $DB->output_theme($start,$limit);
		$rowcount = count($fetch);
		if($rowcount != 0){
		foreach($fetch as $row){?>
			<div class="col-md-4 themeboxcolumn p-box">
				<div class="themebox <?php if($row['status'] == 1){echo 'acttheme';}?>">
					<img src="../themes/<?php echo $row['name'];?>/preview.jpg" alt="<?php echo $row['name'];?>" 
						class="img-height himg">
					<div class="theme-inner">	
						<span class="theme-title">
							<a href="javascript:;"><?php echo $row['name'];?></a>
						</span>
						
						<div class="pull-right">
							<?php if($row['status'] == 1){?>
								<a href="javascript:;" class="btn btn-success btn-sm" role="button">Active</a>
							<?php } else { ?> 
								<a href="javascript:;" onclick="active('<?php echo $row['id'];?>');" 
								class="btn btn-warning btn-sm" role="button">Apply</a>
							<?php } ?>
							
							<a href="javascript:;" onclick="deldialog('<?php echo $row['id'];?>','<?php echo $row['name'];?>');" 
								class="btn btn-danger btn-sm" role="button">Delete</a>
						</div>
					</div>
				</div>
			</div>
	<?php } } else {?>
			<div class="col-md-3">
				<h2>No themes found</h2>
			</div>
	<?php } ?>
			
</div>
<?php echo $pagination_out;?>