Code moved back

This commit is contained in:
Saqib Razzaq 2016-05-31 19:42:23 +05:00
parent c9d50c1b4a
commit f58e0b70a7

View file

@ -12,8 +12,37 @@
define("THIS_PAGE",'photos');
define("PARENT_PAGE",'photos');
require 'includes/config.inc.php';
global $hlp;
global $cbphoto, $cbcollection, $pages;
$pages->page_redir();
$hlp->photos();
$assign_arry = array();
$sort = $_GET['sort'];
$cond = array("category"=>mysql_clean($_GET['cat']),"date_span"=>$_GET['time'], "active"=>"yes");
$table_name = "photos";
$cond = build_sort_photos($sort, $cond);
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,MAINPLIST);
$clist = $cond;
$clist['limit'] = $get_limit;
$photos = get_photos($clist);
$collections = $cbcollection->get_collections($clist);
//Collecting Data for Pagination
$ccount = $cond;
$ccount['count_only'] = true;
$total_rows = get_photos($ccount);
$total_pages = count_pages($total_rows,MAINPLIST);
//Pagination
$link==NULL;
$extra_params=NULL;
$tag='<li><a #params#>#page#</a><li>';
$pages->paginate($total_pages,$page,$link,$extra_params,$tag);
if (!$subtitle) {
$subtitle = 'Photos';
}
subtitle(lang($subtitle));
//Displaying The Template
$assign_arry['photos'] = $photos;
$assign_arry['collections'] = $collections;
array_val_assign($assign_arry);
template_files('photos.html');
display_it();
?>