Permalink
Browse files

First implementation of the new permissions system in CMS.

New auth system enabled in all files even if not fully implemented everywhere.
CMS functions to manage permissions and roles almost completed.
Some extra bugs fixed.
  • Loading branch information...
1 parent 4320fb7 commit d164727cda88724f3be14b7324934934fc5d9fe9 @MightyGorgon committed Sep 23, 2011
Showing with 4,729 additions and 691 deletions.
  1. +1 −1 acronyms.php
  2. +5 −5 adm/admin_bbcodes.php
  3. +7 −0 adm/admin_board_clearcache.php
  4. +0 −1 adm/admin_cms_auth.php
  5. +0 −1 adm/admin_groups.php
  6. +0 −1 adm/admin_pa_ug_auth.php
  7. +0 −13 adm/admin_plugins.php
  8. +0 −1 adm/admin_postcount.php
  9. +0 −6 adm/admin_prune_users_loop.php
  10. +0 −1 adm/admin_ug_auth.php
  11. +0 −1 adm/admin_user_ban.php
  12. +0 −2 adm/admin_user_bantron.php
  13. +2 −2 adm/admin_userlist.php
  14. +0 −1 adm/admin_users.php
  15. +1 −1 adm/cookie.php
  16. +1 −1 adm/ip_header.php
  17. +1 −1 adm/pagestart.php
  18. +1 −1 ajax.php
  19. +1 −1 ajax_chat.php
  20. +1 −1 ajax_shoutbox.php
  21. +1 −1 ajax_upload.php
  22. +1 −1 album.php
  23. +1 −1 album_allpics.php
  24. +1 −1 album_avatar.php
  25. +2 −2 album_cat.php
  26. +1 −1 album_comment_delete.php
  27. +1 −1 album_comment_edit.php
  28. +1 −1 album_delete.php
  29. +1 −1 album_download.php
  30. +1 −1 album_edit.php
  31. +1 −1 album_hotornot.php
  32. +1 −1 album_modcp.php
  33. +1 −1 album_nuffload_pbar.php
  34. +1 −1 album_otf.php
  35. +1 −1 album_otf_thumbnail.php
  36. +1 −1 album_personal_cat_admin.php
  37. +1 −1 album_personal_index.php
  38. +1 −1 album_pic.php
  39. +1 −1 album_pic_nuffed.php
  40. +1 −1 album_picm.php
  41. +1 −1 album_rdf.php
  42. +1 −1 album_rss.php
  43. +1 −1 album_search.php
  44. +1 −1 album_showpage.php
  45. +1 −1 album_thumbnail.php
  46. +1 −1 album_upload.php
  47. +1 −1 attach_rules.php
  48. +1 −1 attachments.php
  49. +1 −1 bbcb_mg_cp.php
  50. +2 −2 bin.php
  51. +1 −1 birthday_popup.php
  52. +1 −1 calendar.php
  53. +1 −1 calendar_scheduler.php
  54. +1 −1 card.php
  55. +58 −284 cms.php
  56. +1 −1 cms_ads.php
  57. +1 −1 cms_ajax.php
  58. +1 −1 cms_db_update.php
  59. +1 −1 cms_menu.php
  60. +2 −0 common.php
  61. +1 −1 contact_us.php
  62. +1 −1 credits.php
  63. +1 −1 cron.php
  64. +1 −1 ct_login_history.php
  65. +1 −1 delete_users.php
  66. +1 −1 digests.php
  67. +1 −1 dload.php
  68. +1 −1 download.php
  69. +1 −1 download_post.php
  70. +1 −1 drafts.php
  71. +1 −2 edit_post_details.php
  72. +1 −1 errors.php
  73. +1 −1 faq.php
  74. +1 −1 features.php
  75. +1 −1 forum.php
  76. +1 −2 groupcp.php
  77. +1 −1 gsearch.php
  78. +1 −1 includes/album_mod/album_hierarchy_sql.php
  79. +1 −1 includes/bb_usage_stats_coldesc.php
  80. +2 −2 includes/captcha/plugins/phpbb_captcha_gd_plugin.php
  81. +1 −1 includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
  82. +1 −1 includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
  83. +4 −4 includes/captcha/plugins/phpbb_captcha_qa_plugin.php
  84. +2 −2 includes/captcha/plugins/phpbb_recaptcha_plugin.php
  85. +8 −4 includes/class_auth_admin.php
  86. +0 −38 includes/class_cms_admin.php
  87. +822 −0 includes/class_cms_permissions.php
  88. +589 −0 includes/class_cms_permissions_roles.php
  89. +1 −1 includes/class_form.php
  90. +7 −0 includes/class_module.php
  91. +37 −0 includes/class_plugins.php
  92. +3 −1 includes/constants.php
  93. +104 −3 includes/functions.php
  94. +0 −9 includes/functions_admin.php
  95. +109 −8 includes/functions_admin_phpbb3.php
  96. +1 −1 includes/functions_categories_hierarchy.php
  97. +2 −2 includes/functions_groups.php
  98. +5 −5 includes/functions_mg_log_admin.php
  99. +1 −1 includes/functions_post.php
  100. +1 −1 includes/functions_search.php
  101. +1 −1 includes/log_http_cmd.php
  102. +1 −1 includes/new_page_common.php
  103. +1 −1 includes/pafiledb/modules/pa_email.php
  104. +3 −0 includes/template.php
  105. +1 −1 includes/topic_review.php
  106. +1 −1 includes/usercp_viewprofile.php
  107. +0 −1 includes/usercp_zebra.php
  108. +1 −1 install/database_update.php
  109. +1 −1 install/includes/functions.php
  110. +1 −1 install/install.php
  111. +1 −1 install/phpbb3_to_ip.php
  112. +89 −65 install/schemas/db_update_054.sql
  113. +28 −10 install/schemas/mysql_basic.sql
  114. +79 −57 install/schemas/sql_update_ip.php
  115. +1 −1 install/schemas/versions.php
  116. +1 −4 language/lang_english/lang_admin.php
  117. +45 −3 language/lang_english/lang_cms.php
  118. +305 −0 language/lang_english/lang_cms_permissions.php
  119. +6 −1 language/lang_english/lang_main.php
  120. +109 −0 language/lang_english/lang_permissions.php
  121. +1 −1 link_register.php
  122. +1 −1 links.js.php
  123. +1 −1 links.php
  124. +1 −1 links_popup.php
  125. +1 −1 login_captcha.php
  126. +4 −3 login_ip.php
  127. +2 −2 mail_digests.php
  128. +1 −1 memberlist.php
  129. +2 −2 modcp.php
  130. +1 −1 news_rss.php
  131. +1 −1 posted_img_list.php
  132. +1 −1 posted_img_list_thumbnail.php
  133. +1 −1 posted_img_thumbnail.php
  134. +1 −1 posting.php
  135. +1 −1 printview.php
  136. +1 −2 privmsg.php
  137. +1 −1 profile.php
  138. +1 −1 profile_main.php
  139. +2 −2 profile_options.php
  140. +1 −1 profile_view_popup.php
  141. +1 −1 profile_view_user.php
  142. +1 −1 ranks.php
  143. +1 −1 rate.php
  144. +1 −1 recent.php
  145. +1 −1 referrers.php
  146. +1 −1 remove_cookies.php
  147. +1 −1 rss.php
  148. +1 −1 rss_news_help.php
  149. +1 −1 rules.php
  150. +1 −1 search.php
  151. +1 −1 share.php
  152. +1 −1 shoutbox.php
  153. +1 −1 shoutbox_max.php
  154. +1 −1 shoutbox_view.php
  155. +1 −1 show_post.php
  156. +1 −1 sitemap.php
  157. +1 −1 sitemap_tpl.php
  158. +1 −1 smiley_creator.php
  159. +1 −1 smileys.php
  160. +1 −1 staff.php
  161. +1 −1 statistics.php
  162. +1 −1 stopwords.php
  163. +1 −1 subsc_forums.php
  164. +1 −1 sudoku.php
  165. +1 −1 tags.php
  166. +1 −1 tellafriend.php
  167. +1 −1 templates/common/acp/ip_header.tpl
  168. +1 −1 templates/common/cms/cms_info_box.tpl
  169. +138 −0 templates/common/cms/cms_permission_mask.tpl
  170. +30 −0 templates/common/cms/cms_permission_roles_mask.tpl
  171. +58 −0 templates/common/cms/cms_permission_trace.tpl
  172. +351 −0 templates/common/cms/cms_permissions.tpl
  173. +195 −0 templates/common/cms/cms_permissions_roles.tpl
  174. +762 −0 templates/common/cms_auth.css
  175. BIN templates/common/images/bg_tabs_alt1.gif
  176. BIN templates/common/images/bg_tabs_alt2.gif
  177. BIN templates/common/images/cms_arrow_down_gray.png
  178. BIN templates/common/images/cms_arrow_up_gray.png
  179. BIN templates/common/images/corners_left.gif
  180. BIN templates/common/images/corners_left2.gif
  181. BIN templates/common/images/corners_right.gif
  182. BIN templates/common/images/corners_right2.gif
  183. BIN templates/common/images/gradient2b.gif
  184. BIN templates/common/images/icon_delete.gif
  185. BIN templates/common/images/icon_delete_disabled.gif
  186. BIN templates/common/images/icon_down.gif
  187. BIN templates/common/images/icon_down_disabled.gif
  188. BIN templates/common/images/icon_edit.gif
  189. BIN templates/common/images/icon_edit_disabled.gif
  190. BIN templates/common/images/icon_sync.gif
  191. BIN templates/common/images/icon_sync_disabled.gif
  192. BIN templates/common/images/icon_up.gif
  193. BIN templates/common/images/icon_up_disabled.gif
  194. +359 −0 templates/common/js/permissions.js
  195. +251 −0 templates/common/js/tooltip.js
  196. +1 −1 templates/default/default.cfg
  197. +2 −1 templates/default/search_username.tpl
  198. +1 −1 text2shield.php
  199. +1 −1 topic_view_users.php
  200. +2 −2 uacp.php
  201. +1 −1 upload.php
  202. +1 −1 upload_ajax.php
  203. +2 −2 viewforum.php
  204. +1 −1 viewforumlist.php
  205. +1 −1 viewonline.php
  206. +1 −1 viewtopic.php
  207. +1 −1 watched_topics.php
  208. +1 −1 wordgraph.php
View
2 acronyms.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
10 adm/admin_bbcodes.php
@@ -102,7 +102,7 @@
if($data['bbcode_tag'] == '')
{
- trigger_error($lang['BBCODES_NO_BBCODES_INPUT'] . adm_back_link($page_action), E_USER_WARNING);
+ trigger_error($lang['BBCODES_NO_BBCODES_INPUT'] . page_back_link($page_action), E_USER_WARNING);
}
if (substr($data['bbcode_tag'], -1) === '=')
@@ -116,22 +116,22 @@
if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $data['bbcode_match']))
{
- trigger_error($lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($page_action), E_USER_WARNING);
+ trigger_error($lang['BBCODE_OPEN_ENDED_TAG'] . page_back_link($page_action), E_USER_WARNING);
}
if (strlen($data['bbcode_tag']) > 16)
{
- trigger_error($lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($page_action), E_USER_WARNING);
+ trigger_error($lang['BBCODE_TAG_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING);
}
if (strlen($data['bbcode_match']) > 4000)
{
- trigger_error($lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($page_action), E_USER_WARNING);
+ trigger_error($lang['BBCODE_TAG_DEF_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING);
}
if (strlen($data['bbcode_helpline']) > 255)
{
- trigger_error($lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($page_action), E_USER_WARNING);
+ trigger_error($lang['BBCODE_HELPLINE_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING);
}
if(($data['bbcode_match'] == '') && ($data['bbcode_tpl'] == ''))
View
7 adm/admin_board_clearcache.php
@@ -36,6 +36,13 @@
message_die(GENERAL_MESSAGE, $meta_tag . $message);
}
+ // Clean also data in global cache
+ $cache_data = array('config', 'config_plugins', 'config_plugins_config', 'config_style', 'newest_user');
+ foreach ($cache_data as $cache_data_section)
+ {
+ $cache->destroy($cache_data_section);
+ }
+
// Make sure cron is unlocked... just to make sure that it didn't hang somewhere in time... :-)
set_config('cron_lock', '0');
set_config('cron_lock_hour', 0);
View
1 adm/admin_cms_auth.php
@@ -120,7 +120,6 @@
$template->set_filenames(array('body' => ADM_TPL . 'user_select_body.tpl'));
$template->assign_vars(array(
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser')
)
);
View
1 adm/admin_groups.php
@@ -148,7 +148,6 @@
'L_GROUP_RANK' => $lang['group_rank'],
'L_GROUP_COLOR' => $lang['group_color'],
'L_GROUP_LEGEND' => $lang['group_legend'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'L_GROUP_STATUS' => $lang['group_status'],
'L_GROUP_OPEN' => $lang['group_open'],
'L_GROUP_CLOSED' => $lang['group_closed'],
View
1 adm/admin_pa_ug_auth.php
@@ -803,7 +803,6 @@
if ($mode == 'user' || $mode == 'glob_user')
{
$template->assign_vars(array(
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser')
)
View
13 adm/admin_plugins.php
@@ -23,19 +23,6 @@
define('THIS_PAGE', 'admin_plugins.' . PHP_EXT);
-// NEW AUTH - BEGIN
-// To be removed when auth integration has been completed!
-if (!class_exists('auth'))
-{
- @include(IP_ROOT_PATH . 'includes/class_auth.' . PHP_EXT);
-}
-if (empty($auth))
-{
- $auth = new auth();
- $auth->acl($user->data);
-}
-// NEW AUTH - END
-
// FORM CLASS - BEGIN
include(IP_ROOT_PATH . 'includes/class_form.' . PHP_EXT);
$class_form = new class_form();
View
1 adm/admin_postcount.php
@@ -82,7 +82,6 @@
'L_USER_EXPLAIN' => $lang['Post_count_explain'],
'L_USER_SELECT' => $lang['Select_a_User'],
'L_LOOK_UP' => $lang['Look_up_user'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid('./../' . CMS_PAGE_SEARCH . '?mode=searchuser'),
View
6 adm/admin_prune_users_loop.php
@@ -30,12 +30,6 @@
@set_time_limit(180);
-// Start session management
-$user->session_begin();
-//$auth->acl($user->data);
-$user->setup();
-// End session management
-
if ($user->data['user_level'] != ADMIN)
{
message_die(GENERAL_ERROR, $lang['Not_Authorized']);
View
1 adm/admin_ug_auth.php
@@ -970,7 +970,6 @@ function check_auth($type, $key, $u_access, $is_admin)
if ($mode == 'user')
{
$template->assign_vars(array(
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser')
)
);
View
1 adm/admin_user_ban.php
@@ -375,7 +375,6 @@
'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'],
'L_USERNAME' => $lang['Username'],
'L_LOOK_UP' => $lang['Look_up_User'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser'),
'S_UNBAN_USERLIST_SELECT' => $select_userlist,
View
2 adm/admin_user_bantron.php
@@ -382,7 +382,6 @@
{
$template->assign_block_vars('username_row', array(
'L_USERNAME' => $lang['Username'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser'),
'USERNAME' => $row['username']
)
@@ -465,7 +464,6 @@
$template->assign_block_vars('username_row', array(
'L_USERNAME' => $lang['Username'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser')
)
);
View
4 adm/admin_userlist.php
@@ -338,7 +338,7 @@
$group_name = $group_name_row['group_name'];
$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($config['script_path']));
- $script_name = ($script_name != '') ? $script_name . '/groupcp.' . PHP_EXT : 'groupcp.' . PHP_EXT;
+ $script_name = (($script_name != '') ? $script_name . '/' : '') . CMS_PAGE_GROUP_CP;
$server_name = trim($config['server_name']);
$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';
$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/';
@@ -594,7 +594,7 @@
'GROUP_NAME' => $group_row['group_name'],
'GROUP_COLOR' => 'style="font-weight: bold; text-decoration: none;' . (($group_row['group_color'] != '') ? ('color: ' . $group_row['group_color'] . ';') : '') . '"',
'GROUP_STATUS' => $group_status,
- 'U_GROUP' => append_sid(IP_ROOT_PATH . 'groupcp.' . PHP_EXT . '?' . POST_GROUPS_URL . '=' . $group_row['group_id'])
+ 'U_GROUP' => append_sid(IP_ROOT_PATH . CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $group_row['group_id'])
)
);
$g++;
View
1 adm/admin_users.php
@@ -1881,7 +1881,6 @@
'L_USER_EXPLAIN' => $lang['User_admin_explain'],
'L_USER_SELECT' => $lang['Select_a_User'],
'L_LOOK_UP' => $lang['Look_up_user'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser'),
View
2 adm/cookie.php
@@ -26,7 +26,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 adm/ip_header.php
@@ -19,7 +19,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 adm/pagestart.php
@@ -34,7 +34,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 ajax.php
@@ -26,7 +26,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 ajax_chat.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 ajax_shoutbox.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin(false);
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 ajax_upload.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_allpics.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_avatar.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
4 album_cat.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
@@ -193,7 +193,7 @@
{
for ($j = 0; $j < sizeof($grouprows); $j++)
{
- $group_link = '<a href="' . append_sid('groupcp.' . PHP_EXT . '?'. POST_GROUPS_URL . '=' . $grouprows[$j]['group_id']) . '">' . $grouprows[$j]['group_name'] . '</a>';
+ $group_link = '<a href="' . append_sid(CMS_PAGE_GROUP_CP . '?'. POST_GROUPS_URL . '=' . $grouprows[$j]['group_id']) . '">' . $grouprows[$j]['group_name'] . '</a>';
$moderators_list .= ($moderators_list == '') ? $group_link : ', ' . $group_link;
}
View
2 album_comment_delete.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_comment_edit.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_delete.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_download.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_edit.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_hotornot.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_modcp.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_nuffload_pbar.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_otf.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_otf_thumbnail.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_personal_cat_admin.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_personal_index.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_pic.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_pic_nuffed.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_picm.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_rdf.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_rss.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_search.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_showpage.php
@@ -24,7 +24,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_thumbnail.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin(false);
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 album_upload.php
@@ -25,7 +25,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 attach_rules.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 attachments.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 bbcb_mg_cp.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
4 bin.php
@@ -87,14 +87,14 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
// session id check
if ($sid == '' || ($sid != $user->data['session_id']))
{
- message_die(GENERAL_ERROR, 'Invalid_session');
+ message_die(GENERAL_ERROR, 'INVALID_SESSION');
}
// Start auth check
View
2 birthday_popup.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 calendar.php
@@ -29,7 +29,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 calendar_scheduler.php
@@ -26,7 +26,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 card.php
@@ -83,7 +83,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
342 cms.php
@@ -24,7 +24,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
@@ -68,6 +68,8 @@
setup_extra_lang(array('lang_admin', 'lang_cms', 'lang_blocks', 'lang_permissions'));
+$page_title = $lang['CMS_TITLE'];
+
$cms_type = 'cms_standard';
$preview_block = isset($_POST['preview']) ? true : false;
@@ -450,308 +452,80 @@
//if (($cms_admin->mode == 'auth') && ($cms_auth->acl_get('cms_edit', $cms_admin->cms_id)))
if ($cms_admin->mode == 'auth')
{
- $template_to_parse = CMS_TPL . 'cms_auth_body.tpl';
- $cms_role_langs = cms_role_langs();
-
- if($cms_admin->user_id)
- {
- $cms_admin->s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $cms_admin->user_id . '">';
- }
-
- switch ($cms_admin->action)
- {
- case 'addrole':
- case 'editrole':
- $cms_admin->s_hidden_fields .= '<input type="hidden" name="in_role" value="1" />';
- break;
- default:
- $cms_admin->s_hidden_fields .= '<input type="hidden" name="in_role" value="0" />';
- break;
- }
-
- if($cms_admin->action == 'save')
- {
- $class_db->main_db_table = ACL_USERS_TABLE;
-
- $s_in_role = request_var('in_role', 0) ? true : false;
-
- if(($cms_admin->user_id) || isset($_POST['username']))
- {
- $sql_where = $s_in_role ? ' AND auth_role_id <> 0' : ' AND auth_role_id = 0';
+ $css_temp = array('cms_auth.css');
+ $template->css_include = array_merge($template->css_include, $css_temp);
+ unset($css_temp);
- if ($cms_admin->user_id)
- {
- $sql = "DELETE FROM " . ACL_USERS_TABLE . " WHERE user_id = '" . $cms_admin->user_id . "' AND forum_id = '" . $cms_admin->cms_id . "' " . $sql_where . "";
- $result = $db->sql_query($sql);
- }
- else
- {
- $this_userdata = get_userdata(request_var('username', ''), true);
-
- if (!is_array($this_userdata))
- {
- if (!defined('STATUS_404')) define('STATUS_404', true);
- message_die(GENERAL_MESSAGE, 'NO_USER');
- }
-
- if ($this_userdata['user_id'] == $user->data['user_id'])
- {
- redirect(append_sid($cms_admin->root . '?mode=auth'));
- }
- $cms_admin->user_id = $this_userdata['user_id'];
- }
-
- $data = array(
- 'user_id' => $cms_admin->user_id,
- 'forum_id' => $cms_admin->cms_id,
- );
-
- if($s_in_role)
- {
- $sql = "SELECT * FROM " . ACL_USERS_TABLE . " WHERE user_id = '" . $cms_admin->user_id . "' AND forum_id = '" . $cms_admin->cms_id . "' AND auth_role_id <> 0";
- $result = $db->sql_query($sql);
- $row = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
-
- if(empty($row))
- {
- $new_role = isset($_POST['role']) ? request_var('role', 0) : false;
- if($new_role)
- {
- $data['auth_role_id'] = $new_role;
- $class_db->insert_item($data);
- }
- }
- }
- else
- {
- $auth_array = array();
- //$auth_array = $_POST['auth'];
- $auth_array = request_var('auth', array(0));
- //die(print_r($auth_array));
- $data['auth_setting'] = '1';
-
- if (!empty($auth_array))
- {
- foreach($auth_array as $k => $update_data)
- {
- $data['auth_option_id'] = $k;
- $class_db->insert_item($data);
- }
- }
- }
- }
- redirect(append_sid($cms_admin->root . '?mode=auth'));
- }
-
- if(($cms_admin->action == 'delete') && ($cms_admin->user_id) && ($user->data['user_id'] != $cms_admin->user_id))
- {
- if(!isset($_POST['confirm']))
- {
- $template->assign_vars(array(
- 'L_YES' => $lang['YES'],
- 'L_NO' => $lang['NO'],
-
- 'MESSAGE_TITLE' => $lang['Confirm'],
- 'MESSAGE_TEXT' => $lang['Confirm_delete_item'],
-
- 'S_CONFIRM_ACTION' => append_sid($cms_admin->root . $cms_admin->s_append_url),
- 'S_HIDDEN_FIELDS' => $cms_admin->s_hidden_fields
- )
- );
- full_page_generation(CMS_TPL . 'confirm_body.tpl', $lang['Confirm'], '', '');
- }
- else
- {
- if($cms_admin->user_id != 0)
- {
- $sql = "DELETE FROM " . ACL_USERS_TABLE . " WHERE user_id = '" . $cms_admin->user_id . "' AND forum_id = '" . $cms_admin->cms_id . "' AND auth_role_id <>0";
- $result = $db->sql_query($sql);
- }
- redirect(append_sid($cms_admin->root . '?mode=auth'));
- }
- }
-
- $template->assign_vars(array(
- 'U_AUTH_ADD' => append_sid($cms_admin->root . '?mode=auth&amp;action=add'),
- 'U_AUTH_ADDROLE' => append_sid($cms_admin->root . '?mode=auth&amp;action=addrole'),
- 'S_AUTH_ACTION' => append_sid($cms_admin->root . $cms_admin->s_append_url),
- 'S_HIDDEN_FIELDS' => $cms_admin->s_hidden_fields
- )
- );
-
- if ($cms_admin->action == 'addrole')
- {
- $row_class = ($row_class == $theme['td_class1']) ? $theme['td_class2'] : $theme['td_class1'];
- $input = '<input type="text" name="username" id="username" maxlength="255" size="25" class="post" />';
- $input .= '<img src="' . $images['cms_icon_search'] . '" alt="' . $lang['Find_username'] . '" title="' . $lang['Find_username'] . '" style="cursor: pointer; vertical-align: middle;" onclick="window.open(\'' . append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser') . '\', \'_search\', \'width=400,height=250,resizable=yes\'); return false;" />';
-
- $cms_roles_select = $class_form->build_select_box('role', false, $cms_role_langs['ID'], $cms_role_langs['NAME']);
-
- $template->assign_block_vars('roles', array(
- 'ROW_CLASS' => $row_class,
- 'USERNAME' => $input,
- 'CMS_ROLES' => $cms_roles_select,
- 'BUTTON' => '<input type="submit" name="save" value="' . strtoupper($lang['CMS_SAVE']) . '" class="liteoption" />',
- )
- );
- }
+ include_once(IP_ROOT_PATH . 'includes/functions_admin_phpbb3.' . PHP_EXT);
- $sql = "SELECT au.*
- FROM " . ACL_USERS_TABLE . " au, " . ACL_ROLES_TABLE . " ar
- WHERE au.forum_id = '" . $cms_admin->cms_id . "'
- AND au.auth_role_id = ar.role_id
- AND au.auth_role_id <> 0
- AND ar.role_type LIKE 'cms_%'";
- $result = $db->sql_query($sql);
- $rows = $db->sql_fetchrowset($result);
- $db->sql_freeresult($result);
+ $roles_admin = request_var('roles_admin', 0);
- if (!empty($rows))
+ if (empty($roles_admin))
{
- foreach($rows as $data)
- {
- $row_class = ($row_class == $theme['td_class1']) ? $theme['td_class2'] : $theme['td_class1'];
+ include_once(IP_ROOT_PATH . 'includes/class_cms_permissions.' . PHP_EXT);
+ $cms_permissions = new cms_permissions();
- if (($cms_admin->action == 'editrole') && ($data['user_id'] == $cms_admin->user_id) && ($user->data['user_id'] != $cms_admin->user_id))
- {
- $cms_role = $class_form->build_select_box('role', $data['auth_role_id'], $cms_role_langs['ID'], $cms_role_langs['NAME']);
- $button = '<input type="submit" name="save" value="' . strtoupper($lang['CMS_SAVE']) . '" class="liteoption" />';
- }
- else
- {
- $cms_role = '<div style="margin-top:3px">' . $cms_role_langs['NAME_ARRAY'][$data['auth_role_id']] . '</div>';
- $button_link_edit = append_sid($cms_admin->root . '?mode=auth&amp;action=editrole&amp;user_id=' . $data['user_id']);
- $button_link_delete = append_sid($cms_admin->root . '?mode=auth&amp;action=delete&amp;user_id=' . $data['user_id']);
- if ($data['user_id'] == $user->data['user_id'])
- {
- $button = '';
- }
- else
- {
- $button = '<a class="cms-button-small" onclick="window.location.href=\'' . $button_link_edit . '\'" href="javascript:void(0);">' . strtoupper($lang['B_EDIT']) . '</a>';
- $button .= '<a class="cms-button-small" onclick="window.location.href=\'' . $button_link_delete . '\'" href="javascript:void(0);">' . strtoupper($lang['B_DELETE']) . '</a>';
- }
- }
+ $pmode = request_var('pmode', '');
+ $pmode_array = array('intro', 'setting_cms_user_global', 'setting_cms_group_global', 'setting_plugins_user_global', 'setting_plugins_group_global', 'setting_user_global', 'setting_group_global', 'setting_user_local', 'setting_group_local', 'setting_admin_global', 'setting_mod_global', 'view_admin_global', 'view_user_global', 'view_mod_global');
+ $pmode = in_array($pmode, $pmode_array) ? $pmode : $pmode_array[0];
+ $cms_permissions->main(0, $pmode);
- $template->assign_block_vars('roles', array(
- 'ROW_CLASS' => $row_class,
- 'USERNAME' => colorize_username($data['user_id']),
- 'CMS_ROLES' => $cms_role,
- 'BUTTON' => $button,
- )
- );
- }
+ $template_to_parse = CMS_TPL . $cms_permissions->tpl_name;
+ $page_title = $lang[$cms_permissions->page_title];
}
- elseif ($cms_admin->action != 'addrole')
- {
- $template->assign_var('NO_ROLE', true);
- }
-
- $cms_auth_langs_array = $cms_auth->auth_langs('cms_');
-
- $row_class = $theme['td_class1'];
-
- if ($cms_admin->action == 'add')
+ else
{
- $button = '<input type="submit" name="save" value="' . strtoupper($lang['CMS_SAVE']) . '" class="liteoption" />';
- $input = '<input type="text" name="username" id="username" maxlength="255" size="25" class="post" />';
- $input .= '<img src="' . $images['cms_icon_search'] . '" alt="' . $lang['Find_username'] . '" title="' . $lang['Find_username'] . '" style="cursor: pointer; vertical-align: middle;" onclick="window.open(\'' . append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser') . '\', \'_search\', \'width=400,height=250,resizable=yes\'); return false;" />';
-
- $template->assign_block_vars('users', array(
- 'ROW_CLASS' => $row_class,
- 'USERNAME' => $input,
- 'BUTTON' => $button,
- )
- );
+ include_once(IP_ROOT_PATH . 'includes/class_cms_permissions_roles.' . PHP_EXT);
+ $cms_permissions_roles = new cms_permissions_roles();
- foreach($cms_auth_langs_array as $k => $data)
- {
- $auth_checkbox = '<input type="checkbox" name="auth[' . $k . ']">';
-
- $template->assign_block_vars('users.auth', array(
- 'AUTH_CHECKBOX' => $auth_checkbox,
- 'AUTH_CLASS' => '',
- 'AUTH_NAME' => $cms_auth_langs_array[$k],
- )
- );
- }
- }
+ $rmode = request_var('rmode', '');
+ $rmode_array = array('admin_roles', 'cms_roles', 'mod_roles', 'plugins_roles', 'user_roles');
+ $rmode = in_array($rmode, $rmode_array) ? $rmode : $rmode_array[0];
+ $cms_permissions_roles->main(0, $rmode);
- $sql = "SELECT * FROM " . ACL_USERS_TABLE . " WHERE forum_id = '" . $cms_admin->cms_id . "' AND auth_role_id = 0 ORDER BY user_id";
- $result = $db->sql_query($sql);
- while($row = $db->sql_fetchrow($result))
- {
- $user_auth_array[$row['user_id']][$row['auth_option_id']] = $row['auth_setting'];
+ $template_to_parse = CMS_TPL . $cms_permissions_roles->tpl_name;
+ $page_title = $lang[$cms_permissions_roles->page_title];
}
- $db->sql_freeresult($result);
- if(!empty($user_auth_array))
- {
- foreach($user_auth_array as $id => $auth_data)
- {
- $row_class = ($row_class == $theme['td_class1']) ? $theme['td_class2'] : $theme['td_class1'];
- if(($cms_admin->action == 'edit') && ($cms_admin->user_id == $id) && ($user->data['user_id'] != $cms_admin->user_id))
- {
- $button = '<input type="submit" name="save" value="' . strtoupper($lang['CMS_SAVE']) . '" class="liteoption" />';
- }
- else
- {
- $button_link = append_sid($cms_admin->root . '?mode=auth&amp;action=edit&amp;user_id=' . $id);
- $button = '<a class="cms-button-small" onclick="window.location.href=\'' . $button_link . '\'" href="javascript:void(0);">' . strtoupper($lang['B_EDIT']) . '</a>';
- }
-
- $template->assign_block_vars('users', array(
- 'ROW_CLASS' => $row_class,
- 'USERNAME' => colorize_username($id),
- 'BUTTON' => $button,
- )
- );
-
- foreach($cms_auth_langs_array as $k => $data)
- {
- if (($cms_admin->action == 'edit') && $cms_admin->user_id == $id)
- {
- $is_checked = $auth_data[$k] ? 'checked="checked"' : '';
- $auth_checkbox = '<input type="checkbox" name="auth[' . $k . ']" ' . $is_checked . '>';
- $auth_class = '';
- }
- else
- {
- $auth_checkbox = '';
- $auth_class = $auth_data[$k] ? 'auth_yes' : 'auth_no';
- }
-
- $template->assign_block_vars('users.auth', array(
- 'AUTH_CHECKBOX' => $auth_checkbox,
- 'AUTH_CLASS' => $auth_class,
- 'AUTH_NAME' => $cms_auth_langs_array[$k],
- )
- );
- }
- }
- }
- elseif ($cms_admin->action != 'add')
- {
- $template->assign_var('NO_AUTH', true);
- }
+ $template->assign_vars(array(
+ 'S_CMS_ACTION' => append_sid($cms_admin->root . '?mode=auth&amp;pmode=' . $pmode),
+ 'U_CMS_BASE_URL' => append_sid($cms_admin->root . '?mode=auth'),
+
+/*
+ 'ICON_MOVE_UP' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_up.gif" alt="' . $lang['MOVE_UP'] . '" title="' . $lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_UP_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_up_disabled.gif" alt="' . $lang['MOVE_UP'] . '" title="' . $lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_DOWN' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_down.gif" alt="' . $lang['MOVE_DOWN'] . '" title="' . $lang['MOVE_DOWN'] . '" />',
+ 'ICON_MOVE_DOWN_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_down_disabled.gif" alt="' . $lang['MOVE_DOWN'] . '" title="' . $lang['MOVE_DOWN'] . '" />',
+ 'ICON_EDIT' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_edit.gif" alt="' . $lang['EDIT'] . '" title="' . $lang['EDIT'] . '" />',
+ 'ICON_EDIT_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_edit_disabled.gif" alt="' . $lang['EDIT'] . '" title="' . $lang['EDIT'] . '" />',
+ 'ICON_DELETE' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_delete.gif" alt="' . $lang['DELETE'] . '" title="' . $lang['DELETE'] . '" />',
+ 'ICON_DELETE_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_delete_disabled.gif" alt="' . $lang['DELETE'] . '" title="' . $lang['DELETE'] . '" />',
+ 'ICON_SYNC' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_sync.gif" alt="' . $lang['RESYNC'] . '" title="' . $lang['RESYNC'] . '" />',
+ 'ICON_SYNC_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/icon_sync_disabled.gif" alt="' . $lang['RESYNC'] . '" title="' . $lang['RESYNC'] . '" />',
+*/
- foreach ($cms_role_langs['ID'] as $id_data)
- {
- $template->assign_block_vars('roles_desc', array(
- 'ROLE_NAME' => $cms_role_langs['NAME_ARRAY'][$id_data],
- 'ROLE_DESC' => $cms_role_langs['DESC_ARRAY'][$id_data],
- )
- );
- }
+ 'ICON_MOVE_UP' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_up.png" alt="' . $lang['MOVE_UP'] . '" title="' . $lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_UP_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_up_gray.png" alt="' . $lang['MOVE_UP'] . '" title="' . $lang['MOVE_UP'] . '" />',
+ 'ICON_MOVE_DOWN' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_down.png" alt="' . $lang['MOVE_DOWN'] . '" title="' . $lang['MOVE_DOWN'] . '" />',
+ 'ICON_MOVE_DOWN_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_down_gray.png" alt="' . $lang['MOVE_DOWN'] . '" title="' . $lang['MOVE_DOWN'] . '" />',
+ 'ICON_EDIT' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_edit.png" alt="' . $lang['EDIT'] . '" title="' . $lang['EDIT'] . '" />',
+ 'ICON_EDIT_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_edit.png" alt="' . $lang['EDIT'] . '" title="' . $lang['EDIT'] . '" />',
+ 'ICON_DELETE' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_delete.png" alt="' . $lang['DELETE'] . '" title="' . $lang['DELETE'] . '" />',
+ 'ICON_DELETE_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_delete.png" alt="' . $lang['DELETE'] . '" title="' . $lang['DELETE'] . '" />',
+ 'ICON_SYNC' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_refresh.png" alt="' . $lang['RESYNC'] . '" title="' . $lang['RESYNC'] . '" />',
+ 'ICON_SYNC_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_refresh.png" alt="' . $lang['RESYNC'] . '" title="' . $lang['RESYNC'] . '" />',
+
+ 'IMG_USER_SEARCH' => $images['cms_icon_search'],
+ )
+ );
}
-if (($cms_admin->mode == false))
+if (empty($cms_admin->mode))
{
$template_to_parse = CMS_TPL . 'cms_index_body.tpl';
$template->assign_var('CMS_PAGE_TITLE', false);
}
-full_page_generation($template_to_parse, $lang['CMS_TITLE'], '', '');
+full_page_generation($template_to_parse, $page_title, '', '');
?>
View
2 cms_ads.php
@@ -25,7 +25,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 cms_ajax.php
@@ -21,7 +21,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 cms_db_update.php
@@ -21,7 +21,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 cms_menu.php
@@ -27,7 +27,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 common.php
@@ -181,6 +181,7 @@ function deregister_globals()
require(IP_ROOT_PATH . 'includes/template.' . PHP_EXT);
require(IP_ROOT_PATH . 'includes/sessions.' . PHP_EXT);
require(IP_ROOT_PATH . 'includes/auth.' . PHP_EXT);
+require(IP_ROOT_PATH . 'includes/class_auth.' . PHP_EXT);
require(IP_ROOT_PATH . 'includes/class_cache.' . PHP_EXT);
require(IP_ROOT_PATH . 'includes/class_cache_extends.' . PHP_EXT);
require(IP_ROOT_PATH . 'includes/functions.' . PHP_EXT);
@@ -197,6 +198,7 @@ function deregister_globals()
$cache = new ip_cache();
$class_settings = new class_settings();
$user = new user();
+$auth = new auth();
$ip_cms = new ip_cms();
$ip_cms->init_vars();
View
2 contact_us.php
@@ -20,7 +20,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 credits.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 cron.php
@@ -29,7 +29,7 @@
// Do not update users last page entry
// Start session management
$user->session_begin(false);
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 ct_login_history.php
@@ -27,7 +27,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 delete_users.php
@@ -60,7 +60,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 digests.php
@@ -31,7 +31,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 dload.php
@@ -18,7 +18,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 download.php
@@ -243,7 +243,7 @@ function send_file_to_browser($attachment, $upload_dir)
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 download_post.php
@@ -16,7 +16,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 drafts.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
3 edit_post_details.php
@@ -16,7 +16,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
@@ -254,7 +254,6 @@
'L_TIME' => ($topic_post_time == 'topic') ? $lang['Topic_time_xs'] : $lang['Post_time'],
'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid(CMS_PAGE_SEARCH . '?mode=searchuser'),
View
2 errors.php
@@ -20,7 +20,7 @@
// Start session management
$user->session_begin(false);
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 faq.php
@@ -22,7 +22,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 features.php
@@ -15,7 +15,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 forum.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
3 groupcp.php
@@ -24,7 +24,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
@@ -860,7 +860,6 @@
'L_SELECT' => $lang['Select'],
'L_REMOVE_SELECTED' => $lang['Remove_selected'],
'L_ADD_MEMBER' => $lang['Add_member'],
- 'L_FIND_USERNAME' => $lang['Find_username'],
'L_COLORIZE_ALL' => $lang['Colorize_All'],
'L_COLORIZE_SELECTED' => $lang['Colorize_Selected'],
View
2 gsearch.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
2 includes/album_mod/album_hierarchy_sql.php
@@ -881,7 +881,7 @@ function album_get_moderator_info($cat)
{
for ($j = 0; $j < sizeof($grouprows); $j++)
{
- $group_link = '<a href="' . append_sid('groupcp.' . PHP_EXT . '?' . POST_GROUPS_URL . '=' . $grouprows[$j]['group_id']) . '">' . $grouprows[$j]['group_name'] . '</a>';
+ $group_link = '<a href="' . append_sid(CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $grouprows[$j]['group_id']) . '">' . $grouprows[$j]['group_name'] . '</a>';
$moderators .= ($moderators == '') ? $group_link : ', ' . $group_link;
}
}
View
2 includes/bb_usage_stats_coldesc.php
@@ -23,7 +23,7 @@
// Start session management
$user->session_begin();
-//$auth->acl($user->data);
+$auth->acl($user->data);
$user->setup();
// End session management
View
4 includes/captcha/plugins/phpbb_captcha_gd_plugin.php
@@ -124,11 +124,11 @@ function acp_page($id, &$module)
}
//add_log('admin', 'LOG_CONFIG_VISUAL');
- trigger_error($lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
+ trigger_error($lang['CONFIG_UPDATED'] . page_back_link($module->u_action));
}
else if ($submit)
{
- trigger_error($lang['FORM_INVALID'] . adm_back_link($module->u_action));
+ trigger_error($lang['FORM_INVALID'] . page_back_link($module->u_action));
}
else
{
View
2 includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
@@ -76,7 +76,7 @@ function acp_page($id, &$module)
{
global $config, $db, $template, $lang;
- trigger_error($lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
+ trigger_error($lang['CAPTCHA_NO_OPTIONS'] . page_back_link($module->u_action));
}
}
View
2 includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
@@ -67,7 +67,7 @@ function acp_page($id, &$module)
{
global $lang;
- trigger_error($lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
+ trigger_error($lang['CAPTCHA_NO_OPTIONS'] . page_back_link($module->u_action));
}
}
View
8 includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -627,7 +627,7 @@ function acp_page($id, &$module)
{
$this->acp_delete_question($question_id);
- trigger_error($lang['QUESTION_DELETED'] . adm_back_link($list_url));
+ trigger_error($lang['QUESTION_DELETED'] . page_back_link($list_url));
}
else
{