Esempio n. 1
0
File: setup.php Progetto: R-J/hm3
<?php

handler_source('history');
output_source('history');
setup_base_page('history', 'core');
add_output('history', 'history_heading', true, 'history', 'content_section_start', 'after');
add_output('ajax_hm_folders', 'history_page_link', true, 'history', 'logout_menu_item', 'before');
return array('allowed_pages' => array('history'));
Esempio n. 2
0
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('calendar');
output_source('calendar');
/* calendar page */
setup_base_page('calendar', 'core');
add_handler('calendar', 'get_calendar_date', true, 'calendar', 'language', 'after');
add_output('calendar', 'calendar_content', true, 'calendar', 'content_section_start', 'after');
add_output('ajax_hm_folders', 'calendar_page_link', true, 'calendar', 'logout_menu_item', 'before');
return array('allowed_pages' => array('calendar'), 'allowed_get' => array('date' => FILTER_SANITIZE_STRING, 'view' => FILTER_SANITIZE_STRING));
Esempio n. 3
0
add_output('message_list', 'message_list_heading', true, 'core', 'content_section_start', 'after');
add_output('message_list', 'message_list_start', true, 'core', 'message_list_heading', 'after');
add_output('message_list', 'message_list_end', true, 'core', 'message_list_start', 'after');
/* search page */
setup_base_page('search');
add_output('search', 'search_content_start', true, 'core', 'content_section_start', 'after');
add_output('search', 'search_form', true, 'core', 'search_content_start', 'after');
add_output('search', 'message_list_start', true, 'core', 'search_form', 'after');
add_output('search', 'search_results_table_end', true, 'core', 'message_list_start', 'after');
add_output('search', 'search_content_end', true, 'core', 'search_results_table_end', 'after');
/* message view page */
setup_base_page('message');
add_output('message', 'message_start', true, 'core', 'content_section_start', 'after');
add_output('message', 'message_end', true, 'core', 'message_start', 'after');
/* not-found page data and output */
setup_base_page('notfound');
add_output('notfound', 'notfound_content', true, 'core', 'content_section_start', 'after');
/* message action ajax request */
add_handler('ajax_message_action', 'login', false);
add_handler('ajax_message_action', 'load_user_data', true);
add_handler('ajax_message_action', 'language', true);
add_handler('ajax_message_action', 'date', true);
add_handler('ajax_message_action', 'http_headers', true);
/* folder list update ajax request */
add_handler('ajax_hm_folders', 'login', false);
add_handler('ajax_hm_folders', 'load_user_data', true);
add_handler('ajax_hm_folders', 'language', true);
add_handler('ajax_hm_folders', 'date', true);
add_handler('ajax_hm_folders', 'http_headers', true);
add_output('ajax_hm_folders', 'folder_list_content_start', true);
add_output('ajax_hm_folders', 'main_menu_start', true);
Esempio n. 4
0
File: setup.php Progetto: R-J/hm3
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('nasa');
output_source('nasa');
/* APOD display */
setup_base_page('nasa_apod', 'core');
add_handler('nasa_apod', 'fetch_apod_content', true, 'nasa', 'load_user_data', 'after');
add_output('nasa_apod', 'apod_content', true, 'nasa', 'content_section_start', 'after');
/* folder list entry */
add_handler('ajax_hm_folders', 'nasa_folder_data', true, 'nasa', 'load_user_data', 'after');
add_output('ajax_hm_folders', 'nasa_folders', true, 'nasa', 'folder_list_content_start', 'before');
/* servers page */
add_handler('servers', 'nasa_folder_data', true, 'nasa', 'load_user_data', 'after');
add_output('servers', 'nasa_connect_section', true, 'nasa', 'server_content_end', 'before');
/* AJAX request to disconnect */
setup_base_ajax_page('ajax_nasa_disconnect', 'core');
add_handler('ajax_nasa_disconnect', 'process_nasa_connection', true, 'nasa', 'load_user_data', 'after');
/* AJAX request to connect */
setup_base_ajax_page('ajax_nasa_connect', 'core');
add_handler('ajax_nasa_connect', 'process_nasa_connection', true, 'nasa', 'load_user_data', 'after');
return array('allowed_pages' => array('nasa_apod', 'ajax_nasa_connect', 'ajax_nasa_disconnect'), 'allowed_post' => array('api_key' => FILTER_SANITIZE_STRING, 'nasa_disconnect' => FILTER_VALIDATE_BOOLEAN), 'allowed_get' => array('apod_date' => FILTER_SANITIZE_STRING), 'allowed_output' => array('nasa_action_status' => array(FILTER_VALIDATE_BOOLEAN, false)));
Esempio n. 5
0
File: setup.php Progetto: R-J/hm3
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('contacts');
output_source('contacts');
/* contacts page */
setup_base_page('contacts', 'core');
add_handler('contacts', 'load_contacts', true, 'contacts', 'load_user_data', 'after');
add_handler('contacts', 'load_gmail_contacts', true, 'contacts', 'load_contacts', 'after');
add_handler('contacts', 'process_add_contact', true, 'contacts', 'load_contacts', 'after');
add_handler('contacts', 'process_edit_contact', true, 'contacts', 'load_contacts', 'after');
add_output('contacts', 'contacts_content_start', true, 'contacts', 'content_section_start', 'after');
add_output('contacts', 'contacts_content_add_form', true, 'contacts', 'contacts_content_start', 'after');
add_output('contacts', 'contacts_list', true, 'contacts', 'contacts_content_add_form', 'after');
add_output('contacts', 'gmail_contacts_list', true, 'contacts', 'contacts_list', 'after');
add_output('contacts', 'contacts_content_end', true, 'contacts', 'contacts_content_add_form', 'after');
add_output('ajax_hm_folders', 'contacts_page_link', true, 'contacts', 'logout_menu_item', 'before');
add_handler('compose', 'process_send_to_contact', true, 'contacts', 'save_user_data', 'before');
add_handler('ajax_imap_message_content', 'find_message_contacts', true, 'contacts', 'imap_message_content', 'after');
add_output('ajax_imap_message_content', 'add_message_contacts', true, 'contacts', 'filter_message_headers', 'after');
setup_base_ajax_page('ajax_add_contact', 'core');
add_handler('ajax_add_contact', 'load_contacts', true, 'contacts', 'load_user_data', 'after');
add_handler('ajax_add_contact', 'process_add_contact_from_message', true, 'contacts', 'load_contacts', 'after');
add_handler('ajax_add_contact', 'save_user_data', true, 'core', 'language', 'after');
setup_base_ajax_page('ajax_autocomplete_contact', 'core');
add_handler('ajax_autocomplete_contact', 'load_contacts', true, 'contacts', 'load_user_data', 'after');
add_handler('ajax_autocomplete_contact', 'load_imap_servers_from_config', true, 'imap', 'load_user_data', 'after');
add_handler('ajax_autocomplete_contact', 'autocomplete_contact', true, 'contacts', 'load_contacts', 'after');
add_output('ajax_autocomplete_contact', 'filter_autocomplete_list', true, 'contacts');
Esempio n. 6
0
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('profiles');
output_source('profiles');
/* profiles page */
setup_base_page('profiles', 'core');
add_output('profiles', 'profile_content', true, 'profiles', 'content_section_start', 'after');
add_output('ajax_hm_folders', 'profile_page_link', true, 'profiles', 'settings_menu_end', 'before');
return array('allowed_pages' => array('profiles'));
Esempio n. 7
0
 * This assignment will attach a module called "hello_world_home_page" to the output
 * processing of the home page. It will only trigger if the user is logged in, and is from
 * the module set "hello_world". It will be inserted into the home page processing after the
 * content_section_start module. See the setup.php file in the core module set for the default
 * modules included in a standard page. A corresponding output module for this needs to be
 * created in the modules.php file for this set. It should be a class called
 * Hm_Output_hello_world_home_page. See the modules.php file in this example plugin for
 * more detail.
 */
add_output('home', 'hello_world_home_page', true, 'hello_world', 'content_section_start', 'after');
/**
 * Creates a new page in the program for the hello_world page identifier (accesed by the
 * page=hello_world URL argument). All this does is assign the core set of modules to this
 * identifier. It's defined in the setup.php file of the core module set.
 */
setup_base_page('hello_world', 'core');
/**
 * Add our own custom input and output modules to this new page. The first will execute
 * after the load_user_data handler module, and the second will execute after the
 * content_section_start output module.
 */
add_handler('hello_world', 'hello_world_page_handler', true, 'hello_world', 'load_user_data', 'after');
add_output('hello_world', 'hello_world_page_content', true, 'hello_world', 'content_section_start', 'after');
/**
 * These assign the basic core modules needed to process an ajax request.
 */
add_handler('ajax_hello_world', 'login', false, 'core');
add_handler('ajax_hello_world', 'load_user_data', true, 'core');
add_handler('ajax_hello_world', 'language', true, 'core');
add_handler('ajax_hello_world', 'date', true, 'core');
add_handler('ajax_hello_world', 'http_headers', true, 'core');
Esempio n. 8
0
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
/* dev resources and info page are only available in debug mode */
if (DEBUG_MODE) {
    /* setup sources */
    handler_source('developer');
    output_source('developer');
    /* info page */
    setup_base_page('info', 'core');
    add_handler('info', 'process_server_info', true, 'developer', 'load_user_data', 'after');
    add_output('info', 'info_heading', true, 'developer', 'content_section_start', 'after');
    add_output('info', 'server_information', true, 'developer', 'info_heading', 'after');
    add_output('info', 'server_status_start', true, 'developer', 'server_information', 'after');
    add_output('info', 'server_status_end', true, 'developer', 'server_status_start', 'after');
    add_output('info', 'config_map', true, 'developer', 'server_status_end', 'after');
    /* folder list */
    add_output('ajax_hm_folders', 'info_page_link', true, 'developer', 'settings_menu_end', 'before');
    add_output('ajax_hm_folders', 'developer_doc_link', true, 'developer', 'settings_menu_end', 'before');
    /* developer docs */
    setup_base_page('dev', 'core');
    add_output('dev', 'dev_content', true, 'developer', 'content_section_start', 'after');
    /* add pages */
    return array('allowed_pages' => array('info', 'dev'));
}
return array();
Esempio n. 9
0
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('account');
output_source('account');
/* create account page */
setup_base_page('create_account', 'core');
add_handler('create_account', 'process_create_account', true, 'account', 'login', 'after');
add_handler('create_account', 'check_internal_users', true, 'account', 'login', 'after');
add_output('create_account', 'create_form', true, 'account', 'content_section_start', 'after');
setup_base_page('change_password', 'core');
add_handler('change_password', 'process_change_password', true, 'account', 'load_user_data', 'after');
add_handler('change_password', 'check_internal_users', true, 'account', 'login', 'after');
add_output('change_password', 'change_password', true, 'account', 'content_section_start', 'after');
/* folder list link */
add_handler('ajax_hm_folders', 'check_internal_users', true, 'account', 'login', 'after');
add_output('ajax_hm_folders', 'create_account_link', true, 'account', 'settings_menu_end', 'before');
add_output('ajax_hm_folders', 'change_password_link', true, 'account', 'settings_menu_content', 'after');
/* input/output */
return array('allowed_pages' => array('create_account', 'change_password'), 'allowed_post' => array('create_username' => FILTER_SANITIZE_STRING, 'create_password' => FILTER_SANITIZE_STRING, 'create_password_again' => FILTER_SANITIZE_STRING, 'new_pass1' => FILTER_SANITIZE_STRING, 'new_pass2' => FILTER_SANITIZE_STRING, 'old_pass' => FILTER_SANITIZE_STRING, 'change_password' => FILTER_SANITIZE_STRING));