function process_profile()
{
    global $db, $mybb, $templates, $ffplugin_following, $ffplugin_followers, $ffplugin_title, $ffplugin_btn, $buddy_options, $myprofile_buddylist, $ffplugin_content, $ffplugin_action, $ffplugin_uid, $ffplugin_status, $ffplugin_badge, $ffplugin_badge_id, $ffplugin_num, $ffplugin_colspan, $ffplugin_profilepage, $ffplugin_avatar, $ffplugin_avatar_width, $ffplugin_avatar_height, $ffplugin_username, $user;
    require_once MYBB_ROOT . "/inc/adminfunctions_templates.php";
    if (ffplugin_is_installed()) {
        if ($mybb->settings['ffplugin_sn'] == 1) {
            if (countf(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], true) > 0) {
                eval('$ffplugin_num = "' . countf(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], true) . '";');
                eval('$ffplugin_badge_id = "following";');
                eval('$ffplugin_badge = "' . $templates->get('ffplugin_badge') . '";');
                eval('$ffplugin_colspan = "' . $mybb->settings['ffplugin_nodu'] . '";');
                eval('$ffplugin_title = "Following";');
                eval('$ffplugin_action = "showfollowinglist";');
                eval('$ffplugin_uid = "' . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] . '";');
                processList(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], true);
                eval('$ffplugin_following = "' . $templates->get('ffplugin_list') . '";');
            }
            if (countf(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], false) > 0) {
                eval('$ffplugin_badge_id = "followers";');
                eval('$ffplugin_num = "' . countf(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], false) . '";');
                eval('$ffplugin_badge = "' . $templates->get('ffplugin_badge') . '";');
                eval('$ffplugin_colspan = "' . $mybb->settings['ffplugin_nodu'] . '";');
                eval('$ffplugin_title = "Followers";');
                eval('$ffplugin_action = "showfollowerslist";');
                eval('$ffplugin_uid = "' . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] . '";');
                processList(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], false);
                eval('$ffplugin_followers = "' . $templates->get('ffplugin_list') . '";');
            }
        } else {
            eval('$ffplugin_num = "";');
            eval('$ffplugin_badge = "";');
            eval('$ffplugin_title = "Following";');
            eval('$ffplugin_action = "showfollowinglist";');
            eval('$ffplugin_uid = "' . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] . '";');
            processList(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], true);
            eval('$ffplugin_following = "' . $templates->get('ffplugin_list') . '";');
            eval('$ffplugin_title = "Followers";');
            eval('$ffplugin_action = "showfollowerslist";');
            eval('$ffplugin_uid = "' . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] . '";');
            processList(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], false);
            eval('$ffplugin_followers = "' . $templates->get('ffplugin_list') . '";');
        }
        if ($mybb->user['uid'] != 0 && get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] != $mybb->user['uid']) {
            check(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid']);
            eval('$ffplugin_btn = "' . $templates->get('ffplugin_btn') . '";');
        } else {
            eval('$ffplugin_btn = "";');
        }
        if ($mybb->settings['ffplugin_blist'] == 1) {
            eval('$buddy_options = "";');
            eval('$myprofile_buddylist = "";');
        }
    }
}
             }
         }
     }
 } elseif (strtolower($mybb->input['action']) == "unfollow") {
     if ($db->num_rows($db->simple_select("ffplugin", "*", "following='" . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] . "' AND follower='" . $mybb->user['uid'] . "'")) == 0) {
         if (isset($mybb->input['ajax'])) {
             header("Content-type: application/json;");
             echo json_encode(array("status" => "false", "followers" => countf(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], false)));
         } else {
             error("You are not following this user.");
         }
     } else {
         $db->delete_query("ffplugin", "following='" . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'] . "' AND follower='" . $mybb->user['uid'] . "'");
         if (isset($mybb->input['ajax'])) {
             header("Content-type: application/json;");
             echo json_encode(array("status" => "false", "followers" => countf(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], false)));
         } else {
             redirect("member.php?action=profile&uid=" . get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], "You are not following " . getName(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid']) . " anymore.");
         }
     }
 } elseif (strtolower($mybb->input['action']) == "showfollowinglist") {
     if (isset($mybb->input['page'])) {
         $page = $mybb->input['page'];
     } else {
         $page = 0;
     }
     if (get_user($mybb->input['uid'], MyBB::INPUT_INT) == null) {
         drawModal("Following (Page " . ($page + 1) . ")", 500, "<tr><td class=\"trow1\" colspan=\"2\"><em>Can't get the following list of this user: User not found.</em></td></tr>");
     } else {
         drawModal("Following (Page " . ($page + 1) . ")", 500, processModalList(get_user($mybb->input['uid'], MyBB::INPUT_INT)['uid'], true, $page));
     }