Moderator: Moderators

define('PAGE_CALENDER', -77);'INSERT IGNORE INTO ' . FORUMS_TABLE . ' (forum_id ,cat_id, forum_name, forum_desc, forum_status )
VALUES ("'.PAGE_CALENDER.'", "0", "CALENDER PAGE", "Calender Page Control", 1 )',[FIND]
if ($view_pages_ary[''.PAGE_PROFILE]['auth_view'])
{
$template->assign_block_vars('switch_profile_on', array());
}
[AFTER, ADD]
if ($view_pages_ary[''.PAGE_CALENDER]['auth_view'])
{
$template->assign_block_vars('switch_calender_on', array());
}[FIND]
// End session management
//
[AFTER, ADD] (something like this)
// Added for Extra permission MOD
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, PAGE_CALENDER, $userdata);
if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
{
if ( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=calender.$phpEx", true));
exit;
}
$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}<!-- BEGIN switch_calender_on -->
<a href="{U_CALENDER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_calender.gif" width="12" height="13" border="0" alt="{L_CALENDER}" hspace="3" />{L_CALENDER}</a>
<!-- END switch_calender_on -->

Return to Extra permission [2.0.6/EM]
Users browsing this forum: No registered users and 1 guest