<?php
require_once(dirname(__FILE__) . '/includes/base.inc.php');

show_home_page();
function show_home_page() {

    // TODO: make the csrf stuff go away [for this fusion] when you fuse a server - so we can do whatever

    $h = get_home_page_options();

    $page_title             = grab_array_var($h, 'page_title',              _('Home'));
    $product_in_page_title  = grab_array_var($h, 'product_in_page_title',   true);
    $iframe_src             = grab_array_var($h, 'iframe_src',              'main.php');

    parent_page($page_title, 'home', $iframe_src, $opts = array(), $autocomplete_page_bottom = true, $product_in_page_title);
}


// perform callback to check for specific home page options
// (anything different than the defaults)
function get_home_page_options() {

    $cbargs = array(
        'page_title'            => _('Home'),
        'product_in_page_title' => true,
        'iframe_src'            => 'main.php',
        );
    do_callbacks(CALLBACK_HOME_PAGE, $cbargs);

    return $cbargs;
}



/*
$admin_options = array(

    'title'
        TITLE_DEFAULT
        TITLE_CUSTOM

    'title_custom'
        'text'

    'allow_title_override'
        true
        false

    'destination'
        DEST_DEFAULT
        DEST_STATIC
        DEST_HOME_DASHBOARD
        DEST_CUSTOM

    'destination_custom'
        'url - full or relative'

    'allow_destination_override'
        true
        false
    );

$user_options = array(

    'title'
        TITLE_DEFAULT
        TITLE_CUSTOM

    'title_custom'
        'text'

    'destination'
        DEST_DEFAULT
        DEST_STATIC
        DEST_HOME_DASHBOARD
        DEST_CUSTOM
        DEST_DASHBOARD

    'destination_custom'
        'url - full or relative OR ID OF DASHBOARD'

    )
*/
