Esempio n. 1
0
function queue_details()
{
    global $mybb, $db, $cache, $templates, $approval_page, $theme, $lang, $header, $headerinclude, $footer, $parser;
    if ($mybb->settings['rpgsuite_approval']) {
        $currentuser = new GroupMember($mybb, $db, $cache, $mybb->user);
        if ($currentuser->is_admin() && $mybb->input['action'] == 'activationqueue') {
            if ($mybb->request_method == "post") {
                $userid = (int) $mybb->input['userid'];
                $username = $db->escape_string($mybb->input['username']);
                $type = $mybb->input['type'];
                if (isset($mybb->input['approve'])) {
                    approve($userid, $username, $type);
                } else {
                    if (isset($mybb->input['deny'])) {
                        deny($userid, $username);
                    }
                }
            }
            add_breadcrumb('Approve New Members');
            $rpgsuite = new RPGSuite($mybb, $db, $cache);
            $accounts = $rpgsuite->get_awaiting_approval();
            foreach ($accounts as $user) {
                eval("\$userlist .= \"" . $templates->get("rpgapprove_user") . "\";");
            }
            eval("\$approval_page = \"" . $templates->get("rpgapprove_page") . "\";");
            output_page($approval_page);
            exit;
        }
    }
}