-
Notifications
You must be signed in to change notification settings - Fork 0
/
packages.php
45 lines (36 loc) · 950 Bytes
/
packages.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
<?php
// fetch bootloader
require('bootloader.php');
// check if packages enabled
if (!$system['packages_enabled']) {
_error(404);
}
try {
switch ($_GET['view']) {
case 'packages':
// page header
page_header(__($system['system_title']) . " › " . __("Packages"));
// get packages
$packages = $user->get_packages();
/* assign variables */
$smarty->assign('packages', $packages);
$smarty->assign('packages_count', count($packages));
break;
case 'upgraded':
// page header
page_header(__($system['system_title']) . " › " . __("Congratulation"));
if (!$user->_data['user_subscribed']) {
redirect("/packages");
}
break;
default:
_error(404);
break;
}
} catch (Exception $e) {
_error(__("Error"), $e->getMessage());
}
// assign varible
$smarty->assign('view', $_GET['view']);
// page footer
page_footer("packages");