-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunding.php
43 lines (34 loc) · 884 Bytes
/
funding.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
<?php
/**
* funding
*
* @package Delus
* @author Dmitry
*/
// fetch bootloader
require('bootloader.php');
// funding enabled
if (!$system['funding_enabled']) {
_error(404);
}
// user access
if (!$system['system_public']) {
user_access();
}
try {
// page header
page_header(__("Funding") . ' | ' . __($system['system_title']), __($system['system_description_funding']));
// get selected country
if (isset($_GET['country'])) {
/* get selected country */
$selected_country = $user->get_country_by_name($_GET['country']);
/* assign variables */
$smarty->assign('selected_country', $selected_country);
}
// get funding requests
$smarty->assign('funding_requests', $user->get_funding(['country' => $selected_country['country_id']]));
} catch (Exception $e) {
_error(__("Error"), $e->getMessage());
}
// page footer
page_footer('funding');