Example #1
0
$db_category_fields = rpg_website::get_category_fields(true, 'categories');
$db_thread_fields = rpg_website::get_thread_fields(true, 'threads');
$db_post_fields = rpg_website::get_post_fields(true, 'posts');
$db_role_fields = rpg_user_role::get_fields(true, 'roles');
$db_user_fields = rpg_user::get_fields(true, 'users');
/*
 * COLLECT FORMACTIONS
 */
// Collect this player's battle point total
if (empty($_SESSION[rpg_game::session_token()]['DEMO'])) {
    $community_battle_points = rpg_game::battle_points();
} else {
    $community_battle_points = 0;
}
// Collect all the categories from the index
$this_categories_index = rpg_website::community_index();
$this_categories_index_tokens = array();
foreach ($this_categories_index as $token => $info) {
    $this_categories_index_tokens[$info['category_id']] = $token;
}
// Include the community form actions
require_once 'pages/community_actions.php';
/*
 * COLLECT INDEXES
 */
// Define the view based on available data
$this_current_view = 'index';
if (!empty($this_current_cat)) {
    $this_current_view = 'category';
}
if ($this_current_id !== false && !empty($this_current_token)) {