-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathranks.php
More file actions
64 lines (53 loc) · 1.46 KB
/
ranks.php
File metadata and controls
64 lines (53 loc) · 1.46 KB
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
54
55
56
57
58
59
60
61
62
63
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
$page_title = $lang['Table_ranks'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
"body" => "ranks_body.tpl")
);
$sql = "SELECT * FROM " . RANKS_TABLE . "
ORDER BY rank_min ASC, rank_special ASC";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could npt obtain ranks data", "", __LINE__, __FILE__, $sql);
}
$i=0;
while( $rank_row = $db->sql_fetchrow($result) )
{
$rank = $rank_row['rank_title'];
$rank_id = $rank_row['rank_id'];
$rank_min = $rank_row['rank_min'];
$rank_image = $rank_row['rank_image'];
if( $rank_row['rank_special'] == 1 )
{
$rank_min = $lang['Rank_special'];
}
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_block_vars("rank_row", array(
"ROW_CLASS" => $row_class,
"RANK_NAME" => $rank,
"RANK_MIN" => $rank_min,
"RANK_IMAGE" => $images['rank'].$rank_image
)
);
$i++;
}
$template->assign_vars(array(
"L_RANK_NAME" => $lang['Rank_title'],
"L_RANK_MIN" => $lang['Rank_minimum'],
"L_RANK_IMAGE" => $lang['Rank_image'] )
);
$template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>