-
Notifications
You must be signed in to change notification settings - Fork 3
/
schedule.php
47 lines (38 loc) · 1.15 KB
/
schedule.php
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
<?php
/**
* @package Social Ninja
* @version 1.0
* @author InspiredDev <[email protected]>
* @copyright 2015
*/
$login_required = true;
include(dirname(__FILE__).'/loader.php');
$title = $lang['title']['sch'];
if(empty($_GET['gid'])){
redirect('index.php');
}
$schedule_group_id = sql_real_escape_string($_GET['gid']);
$is_owner = $auth->is_schedule_group_owner($user_id, $schedule_group_id);
if(!$is_owner && empty($user_data['is_admin'])){
display_error('You do not have permission to view this schedule!');
exit();
}
/**
* Search parameter [site]
*/
$site = '';
if(!empty($_GET['site']))$site = sql_real_escape_string($_GET['site']);
$from = 1;
$rows = 25;
if(!empty($_GET['from']))$from = (int)$_GET['from'];
if($from < 1)$from = 1;
$schedules = array();
$schedule_group = get_schedules_group($schedule_group_id);
$total_schedules = count_schedules_schedules_from_group($schedule_group_id, $site);
if($total_schedules){
$schedules = get_schedules_schedules_from_group($schedule_group_id, $site, $from, $rows);
}
include(__ROOT__.'/templates/header.php');
include(__ROOT__.'/templates/schedule.php');
include(__ROOT__.'/templates/footer.php');
?>