-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackages.php
53 lines (42 loc) · 1012 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
46
47
48
49
50
51
52
53
<?php
/**
* packages
*
* @package Delus
* @author Dmitry
*/
// 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':
if (!$user->_data['user_subscribed']) {
redirect("/packages");
}
// page header
page_header(__($system['system_title']) . " › " . __("Congratulation"));
break;
default:
_error(404);
break;
}
} catch (Exception $e) {
_error(__("Error"), $e->getMessage());
}
// assign varible
$smarty->assign('view', $_GET['view']);
// page footer
page_footer('packages');