Пример #1
0
Файл: setup.php Проект: R-J/hm3
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('idle_timer');
output_source('idle_timer');
/* settings page */
add_handler('settings', 'process_idle_time_setting', true, 'idle_timer', 'date', 'after');
add_output('settings', 'idle_time_setting', true, 'idle_timer', 'list_style_setting', 'after');
add_module_to_all_pages('handler', 'idle_time_check', true, 'idle_timer', 'load_user_data', 'after');
/* no-op poll */
add_handler('ajax_no_op', 'login', false, 'core');
add_handler('ajax_no_op', 'load_user_data', true, 'core');
add_handler('ajax_no_op', 'process_idle_time', true);
add_handler('ajax_no_op', 'date', true, 'core');
add_handler('ajax_no_op', 'http_headers', true, 'core');
return array('allowed_pages' => array('ajax_no_op'), 'allowed_post' => array('idle_time' => FILTER_VALIDATE_INT));
Пример #2
0
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);
add_output('ajax_hm_folders', 'search_from_folder_list', true);
add_output('ajax_hm_folders', 'main_menu_content', true);
add_output('ajax_hm_folders', 'logout_menu_item', true);
add_output('ajax_hm_folders', 'main_menu_end', true);
add_output('ajax_hm_folders', 'email_menu_content', true);
add_output('ajax_hm_folders', 'settings_menu_start', true);
add_output('ajax_hm_folders', 'settings_menu_content', true);
add_output('ajax_hm_folders', 'settings_menu_end', true);
add_output('ajax_hm_folders', 'folder_list_content_end', true);
/* allowed input */
return array('allowed_pages' => array('save', 'home', 'compose', 'message_list', 'message', 'settings', 'servers', 'ajax_hm_folders', 'ajax_message_action', 'notfound', 'search'), 'allowed_output' => array('date' => array(FILTER_SANITIZE_STRING, false), 'formatted_folder_list' => array(FILTER_UNSAFE_RAW, false), 'router_user_msgs' => array(FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY), 'router_login_state' => array(FILTER_VALIDATE_BOOLEAN, false), 'formatted_message_list' => array(FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY), 'just_saved_credentials' => array(FILTER_VALIDATE_BOOLEAN, false), 'just_forgot_credentials' => array(FILTER_VALIDATE_BOOLEAN, false), 'deleted_server_id' => array(FILTER_VALIDATE_INT, false), 'msg_headers' => array(FILTER_UNSAFE_RAW, false), 'msg_text' => array(FILTER_UNSAFE_RAW, false), 'msg_parts' => array(FILTER_UNSAFE_RAW, false)), 'allowed_cookie' => array('PHPSESSID' => FILTER_SANITIZE_STRING, 'hm_id' => FILTER_SANITIZE_STRING, 'hm_session' => FILTER_SANITIZE_STRING, 'hm_msgs' => FILTER_SANITIZE_STRING), 'allowed_server' => array('REQUEST_URI' => FILTER_SANITIZE_STRING, 'SERVER_ADDR' => FILTER_VALIDATE_IP, 'REMOTE_ADDR' => FILTER_VALIDATE_IP, 'SERVER_PORT' => FILTER_VALIDATE_INT, 'SERVER_PROTOCOL' => FILTER_SANITIZE_STRING, 'PHP_SELF' => FILTER_SANITIZE_STRING, 'REQUEST_SCHEME' => FILTER_SANITIZE_STRING, 'HTTP_HOST' => FILTER_SANITIZE_STRING, 'HTTP_ACCEPT_LANGUAGE' => FILTER_SANITIZE_STRING, 'HTTP_ACCEPT_ENCODING' => FILTER_SANITIZE_STRING, 'HTTP_ACCEPT_CHARSET' => FILTER_SANITIZE_STRING, 'HTTP_ACCEPT' => FILTER_SANITIZE_STRING, 'HTTP_USER_AGENT' => FILTER_SANITIZE_STRING, 'HTTPS' => FILTER_SANITIZE_STRING, 'SERVER_NAME' => FILTER_SANITIZE_STRING, 'HTTP_X_REQUESTED_WITH' => FILTER_SANITIZE_STRING), 'allowed_get' => array('page' => FILTER_SANITIZE_STRING, 'msgs' => FILTER_SANITIZE_STRING, 'list_path' => FILTER_SANITIZE_STRING, 'list_parent' => FILTER_SANITIZE_STRING, 'list_page' => FILTER_VALIDATE_INT, 'uid' => FILTER_SANITIZE_STRING, 'search_terms' => FILTER_SANITIZE_STRING, 'search_since' => FILTER_SANITIZE_STRING, 'search_fld' => FILTER_SANITIZE_STRING), 'allowed_post' => array('hm_page_key' => FILTER_SANITIZE_STRING, 'logout' => FILTER_VALIDATE_BOOLEAN, 'save_and_logout' => FILTER_VALIDATE_BOOLEAN, 'limit' => FILTER_VALIDATE_INT, 'username' => FILTER_SANITIZE_STRING, 'password' => FILTER_SANITIZE_STRING, 'hm_ajax_hook' => FILTER_SANITIZE_STRING, 'save_settings' => FILTER_SANITIZE_STRING, 'save_settings_permanently' => FILTER_SANITIZE_STRING, 'save_settings_permanently_then_logout' => FILTER_SANITIZE_STRING, 'language' => FILTER_SANITIZE_STRING, 'flagged_per_source' => FILTER_VALIDATE_INT, 'flagged_since' => FILTER_SANITIZE_STRING, 'unread_per_source' => FILTER_VALIDATE_INT, 'unread_since' => FILTER_SANITIZE_STRING, 'all_email_per_source' => FILTER_VALIDATE_INT, 'all_email_since' => FILTER_SANITIZE_STRING, 'all_per_source' => FILTER_VALIDATE_INT, 'all_since' => FILTER_SANITIZE_STRING, 'list_style' => FILTER_SANITIZE_STRING, 'timezone' => FILTER_SANITIZE_STRING, 'section_state' => FILTER_SANITIZE_STRING, 'section_class' => FILTER_SANITIZE_STRING, 'message_ids' => FILTER_SANITIZE_STRING, 'action_type' => FILTER_SANITIZE_STRING, 'message_list_since' => FILTER_SANITIZE_STRING));
Пример #3
0
Файл: setup.php Проект: 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)));
Пример #4
0
<?php

if (!defined('DEBUG_MODE')) {
    die;
}
handler_source('themes');
output_source('themes');
add_module_to_all_pages('handler', 'load_theme', true, 'themes', 'load_user_data', 'after');
add_module_to_all_pages('output', 'theme_css', true, 'themes', 'header_css', 'after');
add_handler('ajax_hm_folders', 'load_theme', true, 'themes', 'load_user_data', 'after');
add_handler('ajax_imap_folder_expand', 'load_theme', true, 'themes', 'load_user_data', 'after');
add_handler('settings', 'process_theme_setting', true, 'themes', 'save_user_settings', 'before');
add_output('settings', 'theme_setting', true, 'feeds', 'language_setting', 'after');
return array('allowed_post' => array('theme_setting' => FILTER_SANITIZE_STRING));
Пример #5
0
Файл: setup.php Проект: R-J/hm3
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');
setup_base_ajax_page('ajax_delete_contact', 'core');
add_handler('ajax_delete_contact', 'load_contacts', true, 'contacts', 'load_user_data', 'after');
add_handler('ajax_delete_contact', 'process_delete_contact', true, 'contacts', 'load_contacts', 'after');
add_handler('ajax_delete_contact', 'save_user_data', true, 'core', 'language', 'after');
return array('allowed_pages' => array('contacts', 'ajax_add_contact', 'ajax_delete_contact', 'ajax_autocomplete_contact'), 'allowed_post' => array('contact_email' => FILTER_SANITIZE_STRING, 'contact_name' => FILTER_SANITIZE_STRING, 'contact_phone' => FILTER_SANITIZE_STRING, 'contact_id' => FILTER_VALIDATE_INT, 'contact_value' => FILTER_SANITIZE_STRING, 'edit_contact' => FILTER_SANITIZE_STRING, 'add_contact' => FILTER_SANITIZE_STRING), 'allowed_get' => array('contact_id' => FILTER_VALIDATE_INT), 'allowed_output' => array('contact_suggestions' => array(FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY)));
Пример #6
0
/**
 * Setup commonly used modules for a page
 * @param string $name the page id
 * @param string $source the module set name
 * @return void
 */
function setup_base_page($name, $source = false)
{
    add_handler($name, 'login', false, $source);
    add_handler($name, 'default_page_data', true, $source);
    add_handler($name, 'load_user_data', true, $source);
    add_handler($name, 'message_list_type', true);
    add_handler($name, 'language', true, $source);
    add_handler($name, 'process_search_terms', true, $source);
    add_handler($name, 'title', true, $source);
    add_handler($name, 'date', true, $source);
    add_handler($name, 'save_user_data', true, $source);
    add_handler($name, 'logout', true, $source);
    add_handler($name, 'http_headers', true, $source);
    add_output($name, 'header_start', false, $source);
    add_output($name, 'js_data', true, $source);
    add_output($name, 'js_search_data', true, $source);
    add_output($name, 'header_css', false, $source);
    add_output($name, 'header_content', false, $source);
    add_output($name, 'header_end', false, $source);
    add_output($name, 'content_start', false, $source);
    add_output($name, 'login', false, $source);
    add_output($name, 'loading_icon', true, $source);
    add_output($name, 'date', true, $source);
    add_output($name, 'msgs', false, $source);
    add_output($name, 'folder_list_start', true, $source);
    add_output($name, 'folder_list_end', true, $source);
    add_output($name, 'content_section_start', true, $source);
    add_output($name, 'content_section_end', true, $source);
    add_output($name, 'save_reminder', true, $source);
    add_output($name, 'page_js', true, $source);
    add_output($name, 'content_end', true, $source);
}
Пример #7
0
add_handler('ajax_imap_folder_display', 'close_session_early', true, 'core');
add_output('ajax_imap_folder_display', 'filter_folder_page', true);
/* search results */
setup_base_ajax_page('ajax_imap_search', 'core');
add_handler('ajax_imap_search', 'message_list_type', true, 'core');
add_handler('ajax_imap_search', 'imap_message_list_type', true);
add_handler('ajax_imap_search', 'load_imap_servers_from_config', true);
add_handler('ajax_imap_search', 'imap_oauth2_token_check', true);
add_handler('ajax_imap_search', 'close_session_early', true, 'core');
add_handler('ajax_imap_search', 'imap_search', true);
add_output('ajax_imap_search', 'filter_imap_search', true);
/* combined inbox */
setup_base_ajax_page('ajax_imap_combined_inbox', 'core');
add_handler('ajax_imap_combined_inbox', 'message_list_type', true, 'core');
add_handler('ajax_imap_combined_inbox', 'imap_message_list_type', true);
add_handler('ajax_imap_combined_inbox', 'load_imap_servers_from_config', true);
add_handler('ajax_imap_combined_inbox', 'imap_oauth2_token_check', true);
add_handler('ajax_imap_combined_inbox', 'close_session_early', true, 'core');
add_handler('ajax_imap_combined_inbox', 'imap_combined_inbox', true);
add_output('ajax_imap_combined_inbox', 'filter_combined_inbox', true);
/* all email section */
setup_base_ajax_page('ajax_imap_all_email', 'core');
add_handler('ajax_imap_all_email', 'message_list_type', true, 'core');
add_handler('ajax_imap_all_email', 'imap_message_list_type', true);
add_handler('ajax_imap_all_email', 'load_imap_servers_from_config', true);
add_handler('ajax_imap_all_email', 'imap_oauth2_token_check', true);
add_handler('ajax_imap_all_email', 'close_session_early', true, 'core');
add_handler('ajax_imap_all_email', 'imap_combined_inbox', true);
add_output('ajax_imap_all_email', 'filter_all_email', true);
/* allowed input */
return array('allowed_pages' => array('ajax_imap_debug', 'ajax_imap_status', 'ajax_imap_unread', 'ajax_imap_flagged', 'ajax_imap_folder_expand', 'ajax_imap_folder_display', 'ajax_imap_combined_inbox', 'ajax_imap_search', 'ajax_unread_count', 'ajax_imap_message_content', 'ajax_imap_save_folder_state', 'ajax_imap_message_action', 'ajax_imap_delete_message', 'ajax_imap_flag_message', 'ajax_imap_update_combined_source', 'ajax_imap_mark_as_read'), 'allowed_output' => array('imap_connect_status' => array(FILTER_SANITIZE_STRING, false), 'imap_connect_time' => array(FILTER_SANITIZE_STRING, false), 'imap_detail_display' => array(FILTER_UNSAFE_RAW, false), 'imap_status_display' => array(FILTER_UNSAFE_RAW, false), 'imap_status_server_id' => array(FILTER_VALIDATE_INT, false), 'imap_expanded_folder_path' => array(FILTER_SANITIZE_STRING, false), 'imap_expanded_folder_formatted' => array(FILTER_UNSAFE_RAW, false), 'imap_server_ids' => array(FILTER_SANITIZE_STRING, false), 'imap_server_id' => array(FILTER_VALIDATE_INT, false), 'combined_inbox_server_ids' => array(FILTER_SANITIZE_STRING, false), 'page_links' => array(FILTER_UNSAFE_RAW, false), 'imap_delete_error' => array(FILTER_VALIDATE_BOOLEAN, false)), 'allowed_get' => array('imap_server_id' => FILTER_VALIDATE_INT, 'imap_download_message' => FILTER_VALIDATE_BOOLEAN, 'imap_msg_part' => FILTER_SANITIZE_STRING), 'allowed_post' => array('server_port' => FILTER_VALIDATE_INT, 'server' => FILTER_SANITIZE_STRING, 'username' => FILTER_SANITIZE_STRING, 'password' => FILTER_SANITIZE_STRING, 'imap_server_id' => FILTER_VALIDATE_INT, 'imap_server_ids' => FILTER_SANITIZE_STRING, 'imap_user' => FILTER_SANITIZE_STRING, 'imap_pass' => FILTER_SANITIZE_STRING, 'imap_delete' => FILTER_SANITIZE_STRING, 'imap_connect' => FILTER_SANITIZE_STRING, 'imap_remember' => FILTER_VALIDATE_INT, 'imap_folder_ids' => FILTER_SANITIZE_STRING, 'imap_forget' => FILTER_SANITIZE_STRING, 'imap_save' => FILTER_SANITIZE_STRING, 'submit_imap_server' => FILTER_SANITIZE_STRING, 'new_imap_address' => FILTER_SANITIZE_STRING, 'new_imap_hidden' => FILTER_VALIDATE_BOOLEAN, 'new_imap_port' => FILTER_VALIDATE_INT, 'new_imap_name' => FILTER_SANITIZE_STRING, 'tls' => FILTER_VALIDATE_BOOLEAN, 'folder' => FILTER_SANITIZE_STRING, 'force_update' => FILTER_VALIDATE_BOOLEAN, 'imap_folder_state' => FILTER_UNSAFE_RAW, 'imap_msg_uid' => FILTER_VALIDATE_INT, 'imap_msg_part' => FILTER_SANITIZE_STRING, 'imap_prefetch' => FILTER_VALIDATE_BOOLEAN, 'hide_imap_server' => FILTER_VALIDATE_BOOLEAN, 'imap_flag_state' => FILTER_SANITIZE_STRING, 'combined_source_state' => FILTER_VALIDATE_INT, 'list_path' => FILTER_SANITIZE_STRING));
Пример #8
0
 * 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');
/**
 * Add our own custom output module to the ajax request. See the site.js file in this
 * module set for further explination of how to trigger and process ajax requests.
 */
add_output('ajax_hello_world', 'hello_world_ajax_content', true);
/**
 * Module setup files must return an array of values they want access to. They also must
 * define any fields they want included in a JSON formatted response. All of these must
 * have associated PHP input filter types associated with them. You should try to use the
 * most restrictive filter type you can. This is also where a module can define it's own
 * pages within the program.
 */
return array('allowed_pages' => array('hello_world', 'ajax_hello_world'), 'allowed_output' => array('hello_world_ajax_result' => array(FILTER_SANITIZE_STRING, false)), 'allowed_get' => array(), 'allowed_post' => array());
/**
 * For more examples check out the setup.php file for the other module sets. They don't have
 * a lot of comments, but they show how this sytem works in practice for real module sets. 
 * Also see the examples in the site module set for more information about how to configure
 * modules.
 */
Пример #9
0
 /**
  * @preserveGlobalState disabled
  * @runInSeparateProcess
  */
 public function test_add_module_to_all_pages()
 {
     add_handler('test', 'test_mod', false);
     add_output('test', 'test_mod', false);
     add_module_to_all_pages('output', 'all_pages', false, 'test', false, false);
     add_module_to_all_pages('handler', 'all_pages', false, 'test', false, false);
     Hm_Output_Modules::process_all_page_queue();
     Hm_Handler_Modules::process_all_page_queue();
     $mods = Hm_Output_Modules::dump();
     foreach ($mods as $name => $vals) {
         if (!preg_match("/^ajax_/", $name)) {
             $this->assertTrue(array_key_exists('all_pages', $vals));
         }
     }
     $mods = Hm_Handler_Modules::dump();
     foreach ($mods as $name => $vals) {
         if (!preg_match("/^ajax_/", $name)) {
             $this->assertTrue(array_key_exists('all_pages', $vals));
         }
     }
 }
Пример #10
0
Файл: setup.php Проект: R-J/hm3
add_output('servers', 'quick_add_section', true, 'nux', 'server_content_start', 'after');
add_output('servers', 'quick_add_dialog', true, 'nux', 'quick_add_section', 'after');
add_handler('ajax_nux_service_select', 'login', false, 'core');
add_handler('ajax_nux_service_select', 'load_user_data', true, 'core');
add_handler('ajax_nux_service_select', 'setup_nux', true);
add_handler('ajax_nux_service_select', 'process_nux_service', true);
add_handler('ajax_nux_service_select', 'language', true, 'core');
add_handler('ajax_nux_service_select', 'date', true, 'core');
add_handler('ajax_nux_service_select', 'http_headers', true, 'core');
add_output('ajax_nux_service_select', 'filter_service_select', true);
add_handler('ajax_nux_add_service', 'login', false, 'core');
add_handler('ajax_nux_add_service', 'load_user_data', true, 'core');
add_handler('ajax_nux_add_service', 'setup_nux', true);
add_handler('ajax_nux_add_service', 'load_smtp_servers_from_config', true, 'smtp');
add_handler('ajax_nux_add_service', 'load_imap_servers_from_config', true, 'imap');
add_handler('ajax_nux_add_service', 'process_nux_add_service', true, 'nux');
add_handler('ajax_nux_add_service', 'save_user_data', true, 'core');
add_handler('ajax_nux_add_service', 'language', true, 'core');
add_handler('ajax_nux_add_service', 'date', true, 'core');
add_handler('ajax_nux_add_service', 'http_headers', true, 'core');
add_handler('home', 'load_pop3_servers_from_config', true, 'pop3', 'load_user_data', 'after');
add_handler('home', 'load_smtp_servers_from_config', true, 'smtp', 'load_user_data', 'after');
add_handler('home', 'load_feeds_from_config', true, 'feeds', 'load_user_data', 'after');
add_handler('home', 'process_oauth2_authorization', true, 'nux', 'message_list_type', 'after');
add_handler('home', 'nux_homepage_data', true, 'nux', 'process_oauth2_authorization', 'after');
add_handler('home', 'nux_dev_news', true, 'nux', 'nux_homepage_data', 'after');
add_output('home', 'welcome_dialog', true, 'nux', 'home_heading', 'after');
add_output('home', 'nux_help', true, 'nux', 'welcome_dialog', 'after');
add_output('home', 'nux_dev_news', true, 'nux', 'nux_help', 'after');
add_output('message_list', 'nux_message_list_notice', true, 'nux', 'message_list_start', 'before');
return array('allowed_pages' => array('ajax_nux_service_select', 'ajax_nux_add_service'), 'allowed_get' => array('code' => FILTER_SANITIZE_STRING, 'state' => FILTER_SANITIZE_STRING, 'error' => FILTER_SANITIZE_STRING, 'security_token' => FILTER_SANITIZE_STRING), 'allowed_output' => array('nux_service_step_two' => array(FILTER_UNSAFE_RAW, false), 'nux_account_added' => array(FILTER_VALIDATE_BOOLEAN, false)), 'allowed_post' => array('nux_service' => FILTER_SANITIZE_STRING, 'nux_email' => FILTER_SANITIZE_STRING, 'nux_name' => FILTER_SANITIZE_STRING, 'nux_pass' => FILTER_UNSAFE_RAW, 'nux_account_name' => FILTER_SANITIZE_STRING));
Пример #11
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();
Пример #12
0
add_handler('ajax_pop3_message_display', 'close_session_early', true, 'core');
add_handler('ajax_pop3_message_display', 'pop3_message_content', true);
add_handler('ajax_pop3_message_display', 'save_pop3_servers', true);
add_handler('ajax_pop3_message_display', 'date', true, 'core');
add_handler('ajax_pop3_message_display', 'http_headers', true, 'core');
add_output('ajax_pop3_message_display', 'filter_pop3_message_content', true);
/* ajax status callback data */
add_handler('ajax_pop3_status', 'login', false, 'core');
add_handler('ajax_pop3_status', 'load_user_data', true, 'core');
add_handler('ajax_pop3_status', 'language', true, 'core');
add_handler('ajax_pop3_status', 'load_pop3_servers_from_config', true);
add_handler('ajax_pop3_status', 'close_session_early', true, 'core');
add_handler('ajax_pop3_status', 'pop3_status', true);
add_handler('ajax_pop3_status', 'date', true, 'core');
add_handler('ajax_pop3_status', 'http_headers', true, 'core');
add_output('ajax_pop3_status', 'filter_pop3_status_data', true);
/* message action callback */
add_handler('ajax_message_action', 'load_pop3_servers_from_config', true, 'pop3', 'load_user_data', 'after');
add_handler('ajax_message_action', 'pop3_message_action', true, 'pop3', 'load_pop3_servers_from_config', 'after');
add_handler('ajax_message_action', 'save_pop3_servers', true, 'pop3', 'pop3_message_action', 'after');
/* ajax server setup callback data */
add_handler('ajax_pop3_debug', 'login', false, 'core');
add_handler('ajax_pop3_debug', 'load_user_data', true, 'core');
add_handler('ajax_pop3_debug', 'language', true, 'core');
add_handler('ajax_pop3_debug', 'load_pop3_servers_from_config', true);
add_handler('ajax_pop3_debug', 'load_pop3_cache', true);
add_handler('ajax_pop3_debug', 'save_pop3_cache', true);
add_handler('ajax_pop3_debug', 'add_pop3_servers_to_page_data', true);
add_handler('ajax_pop3_debug', 'pop3_connect', true);
add_handler('ajax_pop3_debug', 'pop3_delete', true);
add_handler('ajax_pop3_debug', 'pop3_forget', true);
Пример #13
0
}
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', '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', 'contacts_content_end', true, 'contacts', 'contacts_content_add_form', 'after');
add_output('ajax_hm_folders', 'contacts_page_link', true, 'contacts', 'settings_menu_end', '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');
add_handler('ajax_add_contact', 'login', false, 'core');
add_handler('ajax_add_contact', 'load_user_data', true, 'core');
add_handler('ajax_add_contact', 'load_contacts', true);
add_handler('ajax_add_contact', 'process_add_contact_from_message', true);
add_handler('ajax_add_contact', 'language', true, 'core');
add_handler('ajax_add_contact', 'save_user_data', true, 'core');
add_handler('ajax_add_contact', 'date', true, 'core');
add_handler('ajax_add_contact', 'http_headers', true, 'core');
add_handler('ajax_delete_contact', 'login', false, 'core');
add_handler('ajax_delete_contact', 'load_user_data', true, 'core');
add_handler('ajax_delete_contact', 'load_contacts', true);
add_handler('ajax_delete_contact', 'process_delete_contact', true);
add_handler('ajax_delete_contact', 'language', true, 'core');
add_handler('ajax_delete_contact', 'save_user_data', true, 'core');
add_handler('ajax_delete_contact', 'date', true, 'core');
Пример #14
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));
Пример #15
0
Файл: setup.php Проект: 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'));
Пример #16
0
Файл: setup.php Проект: R-J/hm3
handler_source('saved_searches');
output_source('saved_searches');
add_handler('ajax_save_search', 'login', false, 'core');
add_handler('ajax_save_search', 'load_user_data', true, 'core');
add_handler('ajax_save_search', 'save_search', true, 'core');
add_handler('ajax_save_search', 'language', true);
add_handler('ajax_save_search', 'date', true, 'core');
add_handler('ajax_save_search', 'http_headers', true, 'core');
add_output('ajax_save_search', 'filter_saved_search_result', true);
add_handler('ajax_update_search', 'login', false, 'core');
add_handler('ajax_update_search', 'load_user_data', true, 'core');
add_handler('ajax_update_search', 'update_search', true, 'core');
add_handler('ajax_update_search', 'language', true);
add_handler('ajax_update_search', 'date', true, 'core');
add_handler('ajax_update_search', 'http_headers', true, 'core');
add_output('ajax_update_search', 'filter_saved_search_result', true);
add_handler('ajax_delete_search', 'login', false, 'core');
add_handler('ajax_delete_search', 'load_user_data', true, 'core');
add_handler('ajax_delete_search', 'delete_search', true, 'core');
add_handler('ajax_delete_search', 'language', true);
add_handler('ajax_delete_search', 'date', true, 'core');
add_handler('ajax_delete_search', 'http_headers', true, 'core');
add_output('ajax_delete_search', 'filter_saved_search_result', true);
add_handler('ajax_hm_folders', 'saved_search_folder_data', true, 'saved_searches', 'load_user_data', 'after');
add_output('ajax_hm_folders', 'search_folders', true, 'saved_searches', 'folder_list_content_start', 'before');
add_handler('search', 'save_searches_data', true, 'saved_searches', 'load_user_data', 'after');
add_output('search', 'save_search_icon', true, 'saved_searches', 'search_results_table_end', 'after');
add_output('search', 'search_name_fld', true, 'saved_searches', 'search_form_content', 'after');
add_output('search', 'delete_search_icon', true, 'saved_searches', 'search_form_end', 'after');
add_output('search', 'update_search_icon', true, 'saved_searches', 'search_form_end', 'after');
return array('allowed_pages' => array('ajax_save_search', 'ajax_update_search', 'ajax_delete_search'), 'allowed_get' => array('search_name' => FILTER_SANITIZE_STRING), 'allowed_post' => array('search_name' => FILTER_SANITIZE_STRING, 'search_terms' => FILTER_SANITIZE_STRING, 'search_fld' => FILTER_SANITIZE_STRING, 'search_since' => FILTER_SANITIZE_STRING), 'allowed_output' => array('saved_search_result' => array(FILTER_VALIDATE_INT, false)));
Пример #17
0
Файл: setup.php Проект: R-J/hm3
add_handler('ajax_message_action', 'wordpress_msg_action', true, 'wordpress', 'wordpress_list_type', 'after');
add_handler('home', 'process_wordpress_authorization', true, 'wordpress', 'load_user_data', 'after');
add_handler('ajax_wordpess_notifications', 'login', false, 'core');
add_handler('ajax_wordpess_notifications', 'load_user_data', true, 'core');
add_handler('ajax_wordpess_notifications', 'message_list_type', true, 'core');
add_handler('ajax_wordpess_notifications', 'language', true, 'core');
add_handler('ajax_wordpess_notifications', 'wordpress_list_type', true, 'core');
add_handler('ajax_wordpess_notifications', 'wp_notification_data', true);
add_handler('ajax_wordpess_notifications', 'date', true, 'core');
add_handler('ajax_wordpess_notifications', 'http_headers', true, 'core');
add_output('ajax_wordpess_notifications', 'filter_wp_notification_data', true);
add_handler('ajax_wp_notice_display', 'login', false, 'core');
add_handler('ajax_wp_notice_display', 'load_user_data', true, 'core');
add_handler('ajax_wp_notice_display', 'language', true, 'core');
add_handler('ajax_wp_notice_display', 'get_wp_notice_data', true);
add_handler('ajax_wp_notice_display', 'close_session_early', true, 'core');
add_handler('ajax_wp_notice_display', 'date', true, 'core');
add_handler('ajax_wp_notice_display', 'http_headers', true, 'core');
add_output('ajax_wp_notice_display', 'filter_wp_notice_data', true);
add_handler('ajax_wordpess_freshly_pressed', 'login', false, 'core');
add_handler('ajax_wordpess_freshly_pressed', 'load_user_data', true, 'core');
add_handler('ajax_wordpess_freshly_pressed', 'message_list_type', true, 'core');
add_handler('ajax_wordpess_freshly_pressed', 'language', true, 'core');
add_handler('ajax_wordpess_freshly_pressed', 'wordpress_list_type', true, 'core');
add_handler('ajax_wordpess_freshly_pressed', 'wp_freshly_pressed_data', true);
add_handler('ajax_wordpess_freshly_pressed', 'date', true, 'core');
add_handler('ajax_wordpess_freshly_pressed', 'http_headers', true, 'core');
add_output('ajax_wordpess_freshly_pressed', 'filter_wp_freshly_pressed_data', true);
add_handler('settings', 'process_unread_wp_included', true, 'wordpress', 'save_user_settings', 'before');
add_output('settings', 'unread_wp_included_setting', true, 'wordpress', 'unread_source_max_setting', 'after');
return array('allowed_pages' => array('ajax_wordpess_freshly_pressed', 'ajax_wordpess_notifications', 'ajax_wp_notice_display'), 'allowed_post' => array('wp_disconnect' => FILTER_SANITIZE_STRING, 'unread_exclude_wordpress' => FILTER_VALIDATE_INT), 'allowed_output' => array('wp_notice_text' => array(FILTER_UNSAFE_RAW, false), 'wp_notice_headers' => array(FILTER_UNSAFE_RAW, false)));
Пример #18
0
add_handler('message', 'add_feeds_to_page_data', true, 'feeds', 'load_feeds_from_config', 'after');
/* message view */
add_handler('ajax_feed_item_content', 'login', false, 'core');
add_handler('ajax_feed_item_content', 'load_user_data', true, 'core');
add_handler('ajax_feed_item_content', 'language', true, 'core');
add_handler('ajax_feed_item_content', 'load_feeds_from_config', true);
add_handler('ajax_feed_item_content', 'feed_item_content', true);
add_handler('ajax_feed_item_content', 'save_feeds', true);
add_handler('ajax_feed_item_content', 'date', true, 'core');
add_handler('ajax_feed_item_content', 'http_headers', true, 'core');
add_output('ajax_feed_item_content', 'filter_feed_item_content', true);
add_handler('ajax_feed_debug', 'login', false, 'core');
add_handler('ajax_feed_debug', 'load_user_data', true, 'core');
add_handler('ajax_feed_debug', 'language', true, 'core');
add_handler('ajax_feed_debug', 'load_feeds_from_config', true);
add_handler('ajax_feed_debug', 'delete_feed', true);
add_handler('ajax_feed_debug', 'feed_connect', true);
add_handler('ajax_feed_debug', 'save_feeds', true);
add_handler('ajax_feed_debug', 'save_user_data', true, 'core');
add_handler('ajax_feed_debug', 'date', true, 'core');
add_handler('ajax_feed_debug', 'http_headers', true, 'core');
add_handler('ajax_feed_status', 'login', false, 'core');
add_handler('ajax_feed_status', 'load_user_data', true, 'core');
add_handler('ajax_feed_status', 'language', true, 'core');
add_handler('ajax_feed_status', 'load_feeds_from_config', true);
add_handler('ajax_feed_status', 'close_session_early', true, 'core');
add_handler('ajax_feed_status', 'feed_status', true);
add_handler('ajax_feed_status', 'date', true, 'core');
add_handler('ajax_feed_status', 'http_headers', true, 'core');
add_output('ajax_feed_status', 'filter_feed_status_data', true);
return array('allowed_pages' => array('ajax_feed_combined_inbox', 'ajax_feed_list_display', 'ajax_feed_item_content', 'ajax_feed_combined', 'ajax_feed_debug', 'ajax_feed_status'), 'allowed_output' => array('feed_connect_status' => array(FILTER_SANITIZE_STRING, false), 'feed_connect_time' => array(FILTER_SANITIZE_STRING, false), 'feed_detail_display' => array(FILTER_UNSAFE_RAW, false), 'feed_status_display' => array(FILTER_UNSAFE_RAW, false), 'feed_status_server_id' => array(FILTER_VALIDATE_INT, false), 'feed_server_ids' => array(FILTER_SANITIZE_STRING, false), 'feed_msg_headers' => array(FILTER_UNSAFE_RAW, false), 'feed_msg_text' => array(FILTER_UNSAFE_RAW, false)), 'allowed_post' => array('feed_id' => FILTER_VALIDATE_INT, 'delete_feed' => FILTER_VALIDATE_INT, 'feed_connect' => FILTER_VALIDATE_INT, 'feed_server_ids' => FILTER_SANITIZE_STRING, 'submit_feed' => FILTER_SANITIZE_STRING, 'new_feed_name' => FILTER_SANITIZE_STRING, 'feed_delete' => FILTER_VALIDATE_INT, 'new_feed_address' => FILTER_SANITIZE_STRING, 'unread_exclude_feeds' => FILTER_VALIDATE_INT, 'feed_list_path' => FILTER_SANITIZE_STRING, 'feed_uid' => FILTER_SANITIZE_STRING, 'feed_since' => FILTER_SANITIZE_STRING, 'feed_limit' => FILTER_VALIDATE_INT, 'feed_search' => FILTER_VALIDATE_INT));
Пример #19
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));
Пример #20
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'));
Пример #21
0
add_handler('servers', 'load_smtp_servers_from_config', true, 'smtp', 'language', 'after');
add_handler('servers', 'process_add_smtp_server', true, 'smtp', 'load_smtp_servers_from_config', 'after');
add_handler('servers', 'add_smtp_servers_to_page_data', true, 'smtp', 'process_add_smtp_server', 'after');
add_handler('servers', 'save_smtp_servers', true, 'smtp', 'add_smtp_servers_to_page_data', 'after');
add_output('servers', 'add_smtp_server_dialog', true, 'smtp', 'server_content_start', 'after');
add_output('servers', 'display_configured_smtp_servers', true, 'smtp', 'add_smtp_server_dialog', 'after');
add_handler('settings', 'process_compose_type', true, 'smtp', 'save_user_settings', 'before');
add_output('settings', 'compose_type_setting', true, 'smtp', 'start_general_settings', 'after');
/* ajax server setup callback data */
add_handler('ajax_smtp_debug', 'login', false, 'core');
add_handler('ajax_smtp_debug', 'load_user_data', true, 'core');
add_handler('ajax_smtp_debug', 'load_smtp_servers_from_config', true);
add_handler('ajax_smtp_debug', 'add_smtp_servers_to_page_data', true);
add_handler('ajax_smtp_debug', 'smtp_connect', true);
add_handler('ajax_smtp_debug', 'smtp_delete', true);
add_handler('ajax_smtp_debug', 'smtp_forget', true);
add_handler('ajax_smtp_debug', 'smtp_save', true);
add_handler('ajax_smtp_debug', 'save_smtp_servers', true);
add_handler('ajax_smtp_debug', 'save_user_data', true, 'core');
add_handler('ajax_smtp_debug', 'date', true, 'core');
add_handler('ajax_smtp_debug', 'http_headers', true, 'core');
/* save draft ajax request */
add_handler('ajax_smtp_save_draft', 'login', false, 'core');
add_handler('ajax_smtp_save_draft', 'load_user_data', true, 'core');
add_handler('ajax_smtp_save_draft', 'smtp_save_draft', true);
add_handler('ajax_smtp_save_draft', 'close_session_early', true, 'core');
add_handler('ajax_smtp_save_draft', 'date', true, 'core');
add_handler('ajax_smtp_save_draft', 'http_headers', true, 'core');
/* folder list link */
add_output('ajax_hm_folders', 'compose_page_link', true, 'smtp', 'logout_menu_item', 'before');
return array('allowed_pages' => array('ajax_smtp_debug', 'ajax_smtp_save_draft'), 'allowed_get' => array('reply' => FILTER_VALIDATE_INT, 'forward' => FILTER_VALIDATE_INT), 'allowed_post' => array('smtp_compose_type_setting' => FILTER_VALIDATE_INT, 'new_smtp_name' => FILTER_SANITIZE_STRING, 'new_smtp_address' => FILTER_SANITIZE_STRING, 'new_smtp_port' => FILTER_SANITIZE_STRING, 'smtp_connect' => FILTER_VALIDATE_INT, 'smtp_forget' => FILTER_VALIDATE_INT, 'smtp_save' => FILTER_VALIDATE_INT, 'smtp_delete' => FILTER_VALIDATE_INT, 'smtp_send' => FILTER_VALIDATE_INT, 'submit_smtp_server' => FILTER_SANITIZE_STRING, 'smtp_server_id' => FILTER_VALIDATE_INT, 'smtp_user' => FILTER_SANITIZE_STRING, 'smtp_pass' => FILTER_SANITIZE_STRING, 'compose_to' => FILTER_UNSAFE_RAW, 'compose_body' => FILTER_UNSAFE_RAW, 'compose_subject' => FILTER_SANITIZE_STRING, 'draft_body' => FILTER_UNSAFE_RAW, 'draft_subject' => FILTER_SANITIZE_STRING, 'draft_to' => FILTER_UNSAFE_RAW));
Пример #22
0
<?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', 'process_add_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', 'contacts_content_end', true, 'contacts', 'contacts_content_add_form', 'after');
add_output('ajax_hm_folders', 'contacts_page_link', true, 'contacts', 'settings_menu_end', 'before');
add_handler('compose', 'process_send_to_contact', true, 'contacts', 'save_user_data', 'before');
add_handler('ajax_delete_contact', 'login', false, 'core');
add_handler('ajax_delete_contact', 'load_user_data', true, 'core');
add_handler('ajax_delete_contact', 'load_contacts', true);
add_handler('ajax_delete_contact', 'process_delete_contact', true);
add_handler('ajax_delete_contact', 'language', true, 'core');
add_handler('ajax_delete_contact', 'save_user_data', true, 'core');
add_handler('ajax_delete_contact', 'date', true, 'core');
add_handler('ajax_delete_contact', 'http_headers', true, 'core');
return array('allowed_pages' => array('contacts', 'ajax_delete_contact'), 'allowed_post' => array('contact_email' => FILTER_SANITIZE_STRING, 'contact_name' => FILTER_SANITIZE_STRING, 'contact_phone' => FILTER_SANITIZE_STRING, 'contact_id' => FILTER_VALIDATE_INT), 'allowed_get' => array('contact_id' => FILTER_VALIDATE_INT));