Example #1
0
                $template->assign_block_vars('options', array('KEY' => $name, 'TITLE' => isset($user->lang[$vars['lang']]) ? $user->lang[$vars['lang']] : $vars['lang'], 'S_EXPLAIN' => $vars['explain'], 'TITLE_EXPLAIN' => $l_explain, 'CONTENT' => $content['tpl'], 'S_FIND_USER' => isset($content['find_user']) ? true : false, 'U_FIND_USER' => isset($content['find_user']) ? append_sid(PHPBB_ROOT_PATH . 'memberlist.' . PHP_EXT, array('mode' => 'searchuser', 'form' => 'select_user', 'field' => 'username', 'select_single' => 'true', 'form' => 'stk', 'field' => $content['find_user_field'])) : ''));
            }
            $template->set_filenames(array('body' => 'tool_options.html'));
            page_footer();
        } else {
            if (is_string($options)) {
                if (confirm_box(true)) {
                    $tool->run_tool();
                } else {
                    confirm_box(false, $options, '', 'confirm_body.html', STK_DIR_NAME . '/index.' . PHP_EXT . $plugin->url_arg(true));
                }
            } else {
                // The page should have been setup by the tool.  We will exit to prevent the redirect from below.
                exit;
            }
        }
    }
    // Should never get here...
    redirect(append_sid(STK_INDEX, false, true, $user->session_id));
} else {
    // Output the main page
    page_header($user->lang['SUPPORT_TOOL_KIT']);
    // In de event the request category is empty force it to main.
    if (!$plugin->get_part('c')) {
        $plugin->set_part('c', 'main');
    }
    // Category title and desc if available
    $template->assign_vars(array('L_TITLE' => $user->lang['CAT_' . strtoupper($plugin->get_part('c'))], 'L_TITLE_EXPLAIN' => isset($user->lang['CAT_' . strtoupper($plugin->get_part('c')) . '_EXPLAIN']) ? $user->lang['CAT_' . strtoupper($plugin->get_part('c')) . '_EXPLAIN'] : '', 'CAT' => $plugin->get_part('c')));
    $template->set_filenames(array('body' => 'index_body.html'));
    page_footer();
}