22 echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
22 echo '<h3>' . $lang->get('adm_err_not_auth_title') . '</h3>'; |
23 echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
23 echo '<p>' . $lang->get('adm_err_not_auth_body', array( 'login_link' => $login_link )) . '</p>'; |
24 return; |
24 return; |
25 } |
25 } |
26 |
26 |
27 echo 'Hello world!'; |
27 // This should be a constant somewhere |
|
28 $protected_ranks = array( |
|
29 RANK_ID_MEMBER, |
|
30 RANK_ID_MOD, |
|
31 RANK_ID_ADMIN, |
|
32 RANK_ID_GUEST |
|
33 ); |
|
34 |
|
35 if ( $paths->getParam(0) == 'action.json' ) |
|
36 { |
|
37 // ajax call |
|
38 return true; |
|
39 } |
|
40 |
|
41 // draw initial interface |
|
42 // yes, four paragraphs of introduction. Suck it up. |
|
43 echo '<h3>' . $lang->get('acpur_heading_main') . '</h3>'; |
|
44 echo '<p>' . $lang->get('acpur_intro_para1') . '</p>'; |
|
45 echo '<p>' . $lang->get('acpur_intro_para2') . '</p>'; |
|
46 echo '<p>' . $lang->get('acpur_intro_para3') . '</p>'; |
|
47 echo '<p>' . $lang->get('acpur_intro_para4') . '</p>'; |
|
48 |
|
49 // fetch ranks |
|
50 $q = $db->sql_query('SELECT rank_id, rank_title, rank_style FROM ' . table_prefix . "ranks ORDER BY rank_title ASC;"); |
|
51 if ( !$q ) |
|
52 $db->_die(); |
|
53 |
|
54 echo '<div class="rankadmin-left" id="admin_ranks_container_left">'; |
|
55 while ( $row = $db->fetchrow() ) |
|
56 { |
|
57 // format rank according to what its users look like |
|
58 // rank titles can be stored as language strings, so have the language manager fetch this |
|
59 // normally it refetches (which takes time) if a string isn't found, but it won't try to fetch |
|
60 // a string that isn't in the category_stringid format |
|
61 $rank_title = $lang->get($row['rank_title']); |
|
62 // FIXME: make sure htmlspecialchars() is escaping quotes and backslashes |
|
63 echo '<a href="#rank_edit:' . $row['rank_id'] . '" onclick="ajaxInitRankEdit(' . $row['rank_id'] . '); return false;" class="rankadmin-editlink" style="' . htmlspecialchars($row['rank_style']) . '">' . htmlspecialchars($rank_title) . '</a> '; |
|
64 } |
|
65 echo '</div>'; |
|
66 |
|
67 echo '<div class="rankadmin-right" id="admin_ranks_container_right">'; |
|
68 echo $lang->get('acpur_msg_select_rank'); |
|
69 echo '</div>'; |
|
70 echo '<span class="menuclear"></span>'; |
28 } |
71 } |
29 |
72 |
30 ?> |
73 ?> |