<commit_before><? ob_start(); ?>

    <div class="breadcrumb">
        <a href="admin/">Admin Panel</a>
        &raquo; <a href="admin/home/">Home</a>
    </div>

    <?= !empty($this_error_markup) ? '<div style="margin: 0 auto 20px">'.$this_error_markup.'</div>' : '' ?>

    <? print_form_messages() ?>

    <? /*
    <pre>$this_admininfo = <?= print_r($this_admininfo, true) ?></pre>
    */ ?>

    <?

    // Pre-scan all content directories as we'll need them all eventually
    // (Not applicable on stage or live home as git trackers don't exist there)
    if (MMRPG_CONFIG_SERVER_ENV === 'local' || MMRPG_CONFIG_SERVER_ENV === 'dev'){
        cms_admin::git_scan_content_directories();
    }

    /* -- USER CONTROLS (LOCAL/DEV/STAGE/PROD) -- */
    if (true){

        // Define the group name and options array
        $this_group_name = 'User Controls';
        $this_group_options = array();

        // Populate the group options array with relevant pages and buttons
        if (rpg_user::current_user_has_permission('edit-user-accounts')){
            $this_option = array(
                'link' => array('url' => 'admin/edit-users/', 'text' => 'Moderate Users', 'bullet' => 'users'),
                'desc' => 'update or modify user account info and permissions'
                );
            $this_group_options[] = $this_option;
        }
        if (rpg_user::current_user_has_permission('edit-user-challenges')){
            $this_option = array(
                'link' => array('url' => 'admin/edit-user-challenges/', 'text' => 'Moderate User Challenges', 'bullet' => 'users-cog'),
                'desc' => 'update or modify user-created challenge missions for the post-game'
                );
            $this_group_options[] = $this_option;
        }

        // Define the group name subtext for this section
        $this_group_name_subtext = '';
        if (MMRPG_CONFIG_SERVER_ENV !== MMRPG_CONFIG_PULL_LIVE_DATA_FROM){
            $this_group_name_subtext = '<p class="env-notice warning">'.
                'Changes made to user accounts and content on the '.MMRPG_CONFIG_SERVER_ENV.'-build may be overwritten at any time. <br /> '.
                'This section is available in the '.ucfirst(MMRPG_CONFIG_SERVER_ENV).' Admin Panel for testing purposes only, so please be mindful.'.
            '</p>';
            }

        // Print out the group title and options, assuming there are any available
        echo cms_admin::print_admin_home_group_options($this_group_name, $this_group_options, $this_group_name_subtext);

    }

    /* -- (LOCAL/DEV ONLY) -- */
    if (in_array(MMRPG_CONFIG_SERVER_ENV, array('local', 'dev'))){

        /* -- GITHUB TOOLS (common to LOCAL/DEV) -- */
        if (true){

            // Pull in the content types repo so we don't have to redeclare stuff
            require(MMRPG_CONFIG_ROOTDIR.'content/index.php');

            // Define the common kind values for each group
            $common_group_kinds = array();
            $common_group_kinds['game_database'] = array('types', 'players', 'robots', 'abilities', 'skills', 'items', 'fields');
            $common_group_kinds['post_game_content'] = array('stars', 'challenges');
            $common_group_kinds['website_pages'] = array('pages');

            // Create an array to hold the actual options for each group
            $common_group_kinds_options = array();

            // Loop through the common group kinds one-by-one and generate options<commit_msg>Small tweak to admin home<commit_after><? ob_start(); ?>

    <div class="breadcrumb">
        <a href="admin/">Admin Panel</a>
        &raquo; <a href="admin/home/">Home</a>
    </div>

    <?= !empty($this_error_markup) ? '<div style="margin: 0 auto 20px">'.$this_error_markup.'</div>' : '' ?>

    <? print_form_messages() ?>

    <? /*
    <pre>$this_admininfo = <?= print_r($this_admininfo, true) ?></pre>
    */ ?>

    <?

    // Pre-scan all content directories as we'll need them all eventually
    // (Not applicable on stage or live home as git trackers don't exist there)
    if (MMRPG_CONFIG_SERVER_ENV === 'local' || MMRPG_CONFIG_SERVER_ENV === 'dev'){
        cms_admin::git_scan_content_directories();
    }

    /* -- USER CONTROLS (LOCAL/DEV/STAGE/PROD) -- */
    if (true){

        // Define the group name and options array
        $this_group_name = 'User Controls';
        $this_group_options = array();

        // Populate the group options array with relevant pages and buttons
        if (rpg_user::current_user_has_permission('edit-user-accounts')){
            $this_option = array(
                'link' => array('url' => 'admin/edit-users/', 'text' => 'Moderate Users', 'bullet' => 'users'),
                'desc' => 'update or modify user account info and permissions'
                );
            $this_group_options[] = $this_option;
        }
        if (rpg_user::current_user_has_permission('edit-user-challenges')){
            $this_option = array(
                'link' => array('url' => 'admin/edit-user-challenges/', 'text' => 'Moderate User Challenges', 'bullet' => 'users-cog'),
                'desc' => 'update or modify user-created challenge missions for the post-game'
                );
            $this_group_options[] = $this_option;
        }

        // Define the group name subtext for this section
        $this_group_name_subtext = '';
        if (MMRPG_CONFIG_SERVER_ENV !== MMRPG_CONFIG_PULL_LIVE_DATA_FROM
            && MMRPG_CONFIG_SERVER_ENV !== 'prod'){
            $this_group_name_subtext = '<p class="env-notice warning">'.
                'Changes made to user accounts and content on the '.MMRPG_CONFIG_SERVER_ENV.'-build may be overwritten at any time. <br /> '.
                'This section is available in the '.ucfirst(MMRPG_CONFIG_SERVER_ENV).' Admin Panel for testing purposes only, so please be mindful.'.
            '</p>';
            }

        // Print out the group title and options, assuming there are any available
        echo cms_admin::print_admin_home_group_options($this_group_name, $this_group_options, $this_group_name_subtext);

    }

    /* -- (LOCAL/DEV ONLY) -- */
    if (in_array(MMRPG_CONFIG_SERVER_ENV, array('local', 'dev'))){

        /* -- GITHUB TOOLS (common to LOCAL/DEV) -- */
        if (true){

            // Pull in the content types repo so we don't have to redeclare stuff
            require(MMRPG_CONFIG_ROOTDIR.'content/index.php');

            // Define the common kind values for each group
            $common_group_kinds = array();
            $common_group_kinds['game_database'] = array('types', 'players', 'robots', 'abilities', 'skills', 'items', 'fields');
            $common_group_kinds['post_game_content'] = array('stars', 'challenges');
            $common_group_kinds['website_pages'] = array('pages');

            // Create an array to hold the actual options for each group
            $common_group_kinds_options = array();

            // Loop through the common group kinds one-by-one and generate options
{'fraction_non_alphanumeric': 0.13472458830210107, 'fraction_numerical': 0.0008517887563884157, 'mean_word_length': 2.524262131065533, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2316225', 'n_tokens_mistral': 2138, 'n_tokens_neox': 2040, 'n_words': 537}