clipbucket/upload/channels.php

70 lines
1.5 KiB
PHP
Raw Normal View History

2009-08-25 12:16:42 +00:00
<?php
/*
***************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
****************************************************************
2009-08-25 12:16:42 +00:00
*/
define("THIS_PAGE",'channels');
define("PARENT_PAGE",'channels');
2009-08-25 12:16:42 +00:00
require 'includes/config.inc.php';
$userquery->perm_check('view_channels',true);
2009-08-25 12:16:42 +00:00
//Setting Sort
$sort = $_GET['sort'];
$u_cond = array('category'=>mysql_clean($_GET['cat']),'date_span'=>$_GET['time']);
switch($sort)
{
case "most_recent":
default:
{
$u_cond['order'] = " doj DESC ";
}
break;
case "most_viewed":
{
$u_cond['order'] = " profile_hits DESC ";
}
break;
case "featured":
{
$u_cond['order'] = "yes";
}
break;
case "top_rated":
{
$u_cond['order'] = " rating DESC";
}
break;
case "most_commented":
{
$u_cond['order'] = " total_comments DESC";
}
break;
}
//Getting User List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,CLISTPP);
$ulist = $u_cond;
$ulist['limit'] = $get_limit;
$users = get_users($ulist);
Assign('users', $users);
2009-08-25 12:16:42 +00:00
//Collecting Data for Pagination
$ucount = $u_cond;
$ucount['count_only'] = true;
$total_rows = get_users($ucount);
$total_pages = count_pages($total_rows,CLISTPP);
2009-08-25 12:16:42 +00:00
//Pagination
$pages->paginate($total_pages,$page);
2009-08-25 12:16:42 +00:00
subtitle(lang('channels'));
template_files('channels.html');
display_it();
2009-08-25 12:16:42 +00:00
?>