-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroups.php
More file actions
71 lines (63 loc) · 1.54 KB
/
groups.php
File metadata and controls
71 lines (63 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/*
***********************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
***********************************************************
*/
define("THIS_PAGE","groups");
define("PARENT_PAGE","groups");
require 'includes/config.inc.php';
$pages->page_redir();
$userquery->perm_check('view_groups',true);
//Setting Sort
$sort = $_GET['sort'];
$g_cond = array('category'=>mysql_clean($_GET['cat']),'date_span'=>$_GET['time']);
switch($sort)
{
case "most_recent":
default:
{
$g_cond['order'] = " date_added DESC ";
}
break;
case "most_viewed":
{
$g_cond['order'] = " total_views DESC ";
}
break;
case "featured":
{
$g_cond['featured'] = "yes";
}
break;
case "top_rated":
{
$g_cond['order'] = " total_members DESC";
}
break;
case "most_commented":
{
$g_cond['order'] = " total_topics DESC";
}
break;
}
//Getting User List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page,GLISTPP);
$glist = $g_cond;
$glist['limit'] = $get_limit;
$groups = $cbgroup->get_groups($glist);
Assign('groups', $groups);
//Collecting Data for Pagination
$gcount = $g_cond;
$gcount['count_only'] = true;
$total_rows = $cbgroup->get_groups($gcount);
$total_pages = count_pages($total_rows,GLISTPP);
//Pagination
$pages->paginate($total_pages,$page);
subtitle(lang('groups'));
template_files('groups.html');
display_it();
?>