2013-10-07 12:17:06 +00:00
|
|
|
<?php
|
|
|
|
|
2016-02-26 08:46:13 +00:00
|
|
|
/**
|
|
|
|
* File: Photos
|
|
|
|
* Description: Used to display list of photos
|
|
|
|
* @author: Arslan Hassan, Saqib Razzaq
|
|
|
|
* @since: 2007
|
|
|
|
* @website: clip-bucket.com
|
|
|
|
* @modified: Feb 26, 2016 ClipBucket 2.8.1 [ Saqib Razzaq ]
|
|
|
|
*/
|
|
|
|
|
|
|
|
define("THIS_PAGE",'photos');
|
|
|
|
define("PARENT_PAGE",'photos');
|
|
|
|
require 'includes/config.inc.php';
|
2016-05-31 19:42:23 +05:00
|
|
|
global $cbphoto, $cbcollection, $pages;
|
2016-02-26 08:46:13 +00:00
|
|
|
$pages->page_redir();
|
2016-05-31 19:42:23 +05:00
|
|
|
$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');
|
2016-02-26 08:46:13 +00:00
|
|
|
display_it();
|
2013-10-07 12:17:06 +00:00
|
|
|
?>
|