1 | <?php |
||||
2 | |||||
3 | /** |
||||
4 | * affilates.php |
||||
5 | * |
||||
6 | * v2 (c) copyright 2010 by Gorlum for http://supernova.ws |
||||
7 | * [~] Complies with PCG1 |
||||
8 | * v1 (c) copyright 2010 by Gorlum for http://supernova.ws |
||||
9 | */ |
||||
10 | |||||
11 | include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
||||
12 | |||||
13 | lng_include('affilates'); |
||||
14 | |||||
15 | $template = SnTemplate::gettemplate('affilates', true); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
16 | |||||
17 | $rpg_bonus_minimum = SN::$config->rpg_bonus_minimum; |
||||
0 ignored issues
–
show
The property
rpg_bonus_minimum does not exist on classConfig . Since you implemented __get , consider adding a @property annotation.
![]() |
|||||
18 | $rpg_bonus_divisor = SN::$config->rpg_bonus_divisor ? SN::$config->rpg_bonus_divisor : 10; |
||||
0 ignored issues
–
show
The property
rpg_bonus_divisor does not exist on classConfig . Since you implemented __get , consider adding a @property annotation.
![]() |
|||||
19 | |||||
20 | $affilates = db_referrals_list_by_id($user['id']); |
||||
21 | while ($affilate = db_fetch($affilates)) |
||||
0 ignored issues
–
show
The function
db_fetch() has been deprecated.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
22 | { |
||||
23 | $affilate_gain = $affilate['dark_matter'] >= $rpg_bonus_minimum ? floor($affilate['dark_matter'] / $rpg_bonus_divisor) : 0; |
||||
24 | |||||
25 | $template->assign_block_vars('affilates', array( |
||||
26 | 'REGISTERED' => date(FMT_DATE_TIME, $affilate['register_time']), |
||||
27 | 'USERNAME' => $affilate['username'], |
||||
28 | 'DARK_MATTER' => $affilate['dark_matter'], |
||||
29 | 'GAINED' => $affilate_gain, |
||||
30 | )); |
||||
31 | |||||
32 | $gained += $affilate_gain; |
||||
33 | } |
||||
34 | |||||
35 | $bannerURL = SN_ROOT_VIRTUAL_PARENT . SN::$config->int_banner_URL; |
||||
0 ignored issues
–
show
The property
int_banner_URL does not exist on classConfig . Since you implemented __get , consider adding a @property annotation.
![]() |
|||||
36 | $bannerURL .= strpos($bannerURL, '?') ? '&' : '?'; |
||||
37 | $bannerURL .= "id={$user['id']}"; |
||||
38 | |||||
39 | $userbarURL = SN_ROOT_VIRTUAL_PARENT . SN::$config->int_userbar_URL; |
||||
0 ignored issues
–
show
The property
int_userbar_URL does not exist on classConfig . Since you implemented __get , consider adding a @property annotation.
![]() |
|||||
40 | $userbarURL .= strpos($userbarURL, '?') ? '&' : '?'; |
||||
41 | $userbarURL .= "id={$user['id']}"; |
||||
42 | |||||
43 | $template->assign_vars(array( |
||||
44 | 'GAINED' => $gained, |
||||
45 | 'user_id' => $user['id'], |
||||
46 | 'bannerURL' => $bannerURL, |
||||
47 | 'userbarURL' => $userbarURL, |
||||
48 | )); |
||||
49 | |||||
50 | SnTemplate::display($template, $lang['aff_title']); |
||||
51 |