コード例 #1
0
function jr_admin_make_info_box()
{
    global $template, $lang, $module, $userdata, $board_config;
    /* Debug?  Changes the status stnading of ADMIN!!!  You are warned */
    $debug = false;
    if ($userdata['user_level'] != ADMIN || $debug) {
        find_lang_file_nivisec('lang_jr_admin');
        $jr_admin_userdata = jr_admin_get_user_info($userdata['user_id']);
        $template->set_filenames(array('JR_ADMIN_INFO' => 'admin/jr_admin_user_info_header.tpl'));
        $template->assign_vars(array('JR_ADMIN_START_DATE' => create_date($board_config['default_dateformat'], $jr_admin_userdata['start_date'], $board_config['board_timezone']), 'JR_ADMIN_UPDATE_DATE' => create_date($board_config['default_dateformat'], $jr_admin_userdata['update_date'], $board_config['board_timezone']), 'JR_ADMIN_ADMIN_NOTES' => $jr_admin_userdata['admin_notes'], 'L_VERSION' => $lang['Version'], 'L_JR_ADMIN_TITLE' => $lang['Junior_Admin_Info'], 'VERSION' => MOD_VERSION, 'L_MODULE_COUNT' => $lang['Module_Count'], 'L_NOTES' => $lang['Notes'], 'L_ALLOW_VIEW' => $lang['Allow_View'], 'L_START_DATE' => $lang['Start_Date'], 'L_UPDATE_DATE' => $lang['Update_Date'], 'L_ADMIN_NOTES' => $lang['Admin_Notes']));
        //Switch the info area if allowed to view it
        if ($jr_admin_userdata['notes_view']) {
            $template->assign_block_vars('jr_admin_info_switch', array());
        }
        $template->assign_var_from_handle('JR_ADMIN_INFO_TABLE', 'JR_ADMIN_INFO');
    }
}
コード例 #2
0
    die("Hacking attempt");
}
define('IN_ADMIN', true);
// Include files
include $phpbb_root_path . 'common.' . $phpEx;
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
// Jnr. Admin
include_once $phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx;
find_lang_file_nivisec('lang_jr_admin');
if (!$userdata['session_logged_in']) {
    redirect(append_sid("login.{$phpEx}?redirect=admin/", true));
} else {
    if (isset($HTTP_GET_VARS['file'])) {
        $file = $HTTP_GET_VARS['file'] . '.' . $phpEx;
    } elseif (isset($HTTP_POST_VARS['file'])) {
        $file = $HTTP_POST_VARS['file'] . '.' . $phpEx;
    } else {
        $file = basename(isset($HTTP_SERVER_VARS['REQUEST_URI']) ? $HTTP_SERVER_VARS['REQUEST_URI'] : $HTTP_SERVER_VARS['PHP_SELF']);
    }
    if (!jr_admin_secure($file)) {
        message_die(GENERAL_ERROR, $lang['Error_Module_ID'], '', __LINE__, __FILE__);
    }
}
// Original