ob_start();
ob_clean();
session_start();
include 'dilg/cnt/join.php';
extract($_REQUEST);
//start pagination
include "pagination/id-pagination.php";
$entries_per_page=12;
$page = (isset($_GET['page'])?$_GET['page']:1);
$result = mysql_query("SELECT * from channel_programs where status='1' and image_upath !='' order by sorting_order asc");
$num_rows = mysql_num_rows($result);
$total_pages = ceil($num_rows/$entries_per_page);
$pagination = pagination_six($total_pages,$page);
$offset = (($page * $entries_per_page) - $entries_per_page);
?>
$Pagename=basename($_SERVER['PHP_SELF']); ?>
$sel_program_name = mysql_query("SELECT * from channel_programs where status='1' and image_upath !='' order by sorting_order asc limit $offset,$entries_per_page");
$tot_program_name = mysql_num_rows($sel_program_name);
if($tot_program_name >0)
{
$i=0;
while($fetch_Program_details = mysql_fetch_object($sel_program_name))
{
$i=$i+1;
$image_upath = $fetch_Program_details->image_upath;
$name = $fetch_Program_details->name;
$large_image=eregi_replace('program-profile/','',$image_upath);
if($image_upath!='')
{
if(file_exists('uploads/program-profile/300-'.$large_image))
{
$thumbnail_image='uploads/program-profile/300-'.$large_image;
}
else
{
$thumbnail_image='uploads/program-profile/'.$large_image;
}
}
else
{
$thumbnail_image='';
}
?>
} } ?>
if($num_rows ==0) { echo ' No Program Found!!!';} if($num_rows >12) { echo $pagination;} ?>