本文整理汇总了PHP中add_handler函数的典型用法代码示例。如果您正苦于以下问题:PHP add_handler函数的具体用法?PHP add_handler怎么用?PHP add_handler使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_handler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_page
function render_page($license = false)
{
add_handler("theme_output");
global $settings, $main_style, $locale, $userdata, $aidlink, $mysql_queries_time;
require_once THEME . "includes/header.php";
// Header - something fancy for login page.
if (FUSION_SELF !== 'login.php') {
require_once THEME . "includes/content.php";
}
// Footer
require_once THEME . "includes/footer.php";
}
示例2: render_page
function render_page($license = false)
{
add_handler("theme_output");
global $settings, $main_style, $locale, $colour_switcher, $mysql_queries_time;
//Wrapper
echo "<div class='wrapper' style='width:" . THEME_WIDTH . ";'>\n";
//Header
echo "<div class='main-header'>\n" . showbanners() . "</div>\n";
echo "<div class='sub-header clearfix floatfix'>" . showsublinks("", "") . "</div>\n";
// Content
echo "<div class='main-bg'>\n";
if (LEFT) {
echo "<div id='side-left'>" . LEFT . "</div>\n";
}
if (RIGHT) {
echo "<div id='side-right'>" . RIGHT . "</div>\n";
}
echo "<div id='side-center' class='" . $main_style . "'>";
echo "<div class='upper'>" . U_CENTER . "</div>\n";
echo "<div class='content'>" . CONTENT . "</div>\n";
echo "<div class='lower'>" . L_CENTER . "</div>\n";
echo "</div>\n";
echo "<div class='clear'></div>\n";
echo "</div>\n";
//Footer
echo "<div class='sub-footer-top'></div>\n";
echo "<div class='sub-footer clearfix'>\n";
if ($settings['rendertime_enabled'] == 1 || $settings['rendertime_enabled'] == 2 && iADMIN) {
echo "<div class='flleft' style='padding-top: 8px;'>" . showrendertime() . "<br />" . showcounter() . "</div>\n";
} else {
echo "<div class='flleft' style='padding: 15px 0 6px 0;'>" . showcounter() . "</div>\n";
}
//echo "<div class='flright' style='padding: 15px 0 6px 0;'>".showsubdate()."</div>\n";
echo "<div style='padding: 15px 0 6px 0;'>" . $colour_switcher->makeForm("flright") . "</div>\n";
echo "</div>\n";
echo "<div class='main-footer clearfix'>\n";
echo "<div class='flleft'>\n";
if (!$license) {
echo showcopyright();
}
echo "<br />Theme designed by <a href='http://www.agxthemes.com'>Falcon</a></div>\n";
echo "<div class='flright' style='width: 50%; text-align: right;'>" . stripslashes($settings['footer']) . "</div>\n";
echo "</div>\n";
echo "</div>\n";
}
示例3: handler_source
<?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));
示例4: preg_replace
$seo = preg_replace("#(\"|')" . BASEDIR . "messages\\.php(\"|')#si", BASEDIR . $locale['SEO79'] . ".html", $seo);
$seo = preg_replace("#submit\\.php\\?stype=l#si", BASEDIR . $locale['SEO73'] . "_" . $locale['SEO77'] . ".html", $seo);
$seo = preg_replace("#submit\\.php\\?stype=n#si", BASEDIR . $locale['SEO73'] . "_" . $locale['SEO75'] . ".html", $seo);
$seo = preg_replace("#submit\\.php\\?stype=a#si", BASEDIR . $locale['SEO73'] . "_" . $locale['SEO74'] . ".html", $seo);
$seo = preg_replace("#submit\\.php\\?stype=p#si", BASEDIR . $locale['SEO73'] . "_" . $locale['SEO76'] . ".html", $seo);
######INFUSIONS######
##pro_download_panel
if (check_inf("pro_download_panel")) {
function pdp_dc($id)
{
if ($id != "0") {
$title = dbarray(dbquery("SELECT cat_name FROM " . DB_PREFIX . "pdp_cats WHERE cat_id='{$id}'"));
return "dc" . $id . "_" . seotitle($title['cat_name']);
} else {
return "downloads";
}
}
$seo = preg_replace('#profile\\.php\\?id=([0-9]*?)(\'|")#sie', "'u\\1_'.title('\\1', 'u').'_uploads.html\\2'", $seo);
$seo = preg_replace('#download\\.php\\?catid=([0-9]*?)(\'|")#sie', "pdp_dc('\\1').'.html\\2'", $seo);
$seo = preg_replace('#download\\.php\\?did=([0-9]*?)(\'|")#sie', "'d\\1_'.title('\\1','pdp_d').'.html\\2'", $seo);
}
##arcade
if (check_inf("varcade")) {
$seo = preg_replace('#games\\.php\\?game_id=([0-9]*?)#sie', "'s\\1_'.title('\\1', 's').'.html'", $seo);
}
}
}
return $seo;
}
add_handler("seofusion");
示例5: displayContent
/**
* Render the theme content
*/
public function displayContent()
{
// Septenary Theme Functions
add_handler("theme_output");
$this->setHeader();
$this->open_grid('section-3', 1);
echo !empty(AU_CENTER) || $this->top_html ? "<div class='au-content'>" . $this->top_html . AU_CENTER . "</div>\n" : '';
echo "<div class='row'>\n";
if (!empty(LEFT) || !empty(RIGHT) || !empty($this->left_html)) {
echo "<div class='hidden-xs col-sm-3 col-md-3 col-lg-3 leftbar'>\n";
echo RIGHT . LEFT . $this->left_html;
echo "</div>\n";
}
echo "<div class='" . self::col_span() . " main-content'>\n";
// Get all notices, we also include notices that are meant to be displayed on all pages
echo renderNotices(getNotices(array('all', FUSION_SELF)));
echo $this->upper_html . U_CENTER;
echo CONTENT;
echo $this->lower_html . L_CENTER;
echo "</div>\n";
echo !empty(BL_CENTER) || $this->bottom_html ? "<div class='bl-content'>" . $this->bottom_html . BL_CENTER . "</div>\n" : '';
echo "</div>\n";
$this->close_grid(1);
}
示例6: handler_source
<?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));
示例7: setup_base_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);
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));
示例8: add_output
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));
示例9: setup_base_page
setup_base_page('message_list');
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_start', true, 'core', 'search_content_start', 'after');
add_output('search', 'search_form_content', true, 'core', 'search_form_start', 'after');
add_output('search', 'search_form_end', true, 'core', 'search_form_content', 'after');
add_output('search', 'message_list_start', true, 'core', 'search_form_end', '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');
/* reset search form */
setup_base_ajax_page('ajax_reset_search', 'core');
add_handler('ajax_reset_search', 'reset_search', true, 'core', 'load_user_data', '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 */
setup_base_ajax_page('ajax_message_action', 'core');
/* folder list update ajax request */
setup_base_ajax_page('ajax_hm_folders', 'core');
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);
示例10: render_page
function render_page()
{
global $aidlink, $locale, $settings, $userdata;
add_handler("theme_head_output");
?>
<div id="content" class="container_24">
<div id="header">
<div id="logo" class="grid_6">
<?php
echo showbanners();
?>
</div><!-- /logo -->
<div id="nav" class="grid_16 push_1">
<?php
navigation();
?>
</div><!-- /nav -->
<div class="grid_9 hinfo">
<h4>National Support Network</h4>
<p id="profile"></p>
</div><!-- /nss -->
<div class="grid_6 push_1 hinfo">
<h4>Search the site</h4>
<form action="/search.php" id="search" method="get" role="search">
<div>
<label for="s" class="screen-reader-text">Search for:</label>
<input type="text" id="s" name="stext" value="">
<input type="submit" value="Search" id="searchsubmit">
</div>
</form>
</div><!-- /search -->
<div class="grid_6 push_2 userinfo hinfo">
<?php
userinfo();
?>
</div><!-- /userinfo -->
</div><!-- /header -->
<div id="main" class="grid_24">
<?php
echo U_CENTER;
?>
<?php
echo CONTENT;
?>
<?php
echo L_CENTER;
?>
</div><!-- /main -->
</div>
<!-- /content -->
<div id="footer">
<div class="container_24" style="padding-bottom:20px;">
<?php
navigation(false);
?>
<div class="grid_6 push_1">
<?php
include INFUSIONS . "admin_attention_panel/admin_attention_bifrost.php";
?>
</div>
<div id="subfooter" class="grid_24">
<small style="padding:10px 0">Powered by PHP-Fusion copyright © 2002 - <?php
echo date("Y");
?>
by Nick Jones. Released as free software without warranties under <a href='http://www.fsf.org/licensing/licenses/agpl-3.0.html' target="_blank" rel="nofollow">GNU Affero GPL</a> v3.</small>
</div><!-- /subfooter -->
<div class="clearfix"></div>
</div>
</div><!-- /footer -->
<?php
if (iGUEST) {
?>
<div id="modal-content" style="display:none">
<div id="modal-title">Welcome! Please login below.</div>
<div class="close"><a href="#" class="simplemodal-close">x</a></div>
<div id="modal-data">
<form action="<?php
echo FUSION_SELF;
?>
" method="post" name="loginform">
<fieldset>
<legend>Your Login details</legend>
<label for="user_name"><strong>Username:</strong></label>
<input type="text" name="user_name" id="user_name" size="30" /><br />
<label for="user_pass"><strong>Password:</strong></label>
<input type="password" name="user_pass" id="user_pass" size="30" /><br />
<label for="remember_me"><strong>Remember Me:</strong></label>
<input type="checkbox" value="y" name="remember_me" id="remember_me" /><br />
</fieldset>
<h3>Forgotten your password?</h3>
<p>Request a new one <a href="/lostpassword.php">here</a>.</p>
<p><button type="submit" name="login" class="button"><span>Login</span></button> <a href="#" class="simplemodal-close" style="margin-left:10px">Cancel</a> <span>(or press ESC)</span></p>
</form>
</div>
</div>
<?php
}
get_footer_tags();
echo (DEBUG ? "<div id='debug'><strong>Debug is on </strong>" : "<!-- ") . showrendertime() . (DEBUG ? "</div><!-- /debug -->" : " -->") . "\n";
}
示例11: add_handler
/* 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);
add_handler('ajax_pop3_debug', 'pop3_save', true);
add_handler('ajax_pop3_debug', 'save_pop3_servers', true);
add_handler('ajax_pop3_debug', 'save_user_data', true, 'core');
add_handler('ajax_pop3_debug', 'date', true, 'core');
add_handler('ajax_pop3_debug', 'http_headers', true, 'core');
return array('allowed_pages' => array('ajax_pop3_debug', 'ajax_pop3_message_display', 'ajax_pop3_folder_display', 'ajax_pop3_unread', 'ajax_pop3_status'), 'allowed_output' => array('pop3_connect_status' => array(FILTER_SANITIZE_STRING, false), 'pop3_connect_time' => array(FILTER_SANITIZE_STRING, false), 'pop3_detail_display' => array(FILTER_SANITIZE_STRING, false), 'pop3_status_display' => array(FILTER_UNSAFE_RAW, false), 'pop3_status_server_id' => array(FILTER_VALIDATE_INT, false), 'pop3_server_id' => array(FILTER_VALIDATE_INT, false)), 'allowed_post' => array('new_pop3_name' => FILTER_SANITIZE_STRING, 'new_pop3_address' => FILTER_SANITIZE_STRING, 'new_pop3_port' => FILTER_SANITIZE_STRING, 'pop3_connect' => FILTER_VALIDATE_INT, 'pop3_forget' => FILTER_VALIDATE_INT, 'pop3_save' => FILTER_VALIDATE_INT, 'pop3_delete' => FILTER_VALIDATE_INT, 'submit_pop3_server' => FILTER_SANITIZE_STRING, 'pop3_server_id' => FILTER_VALIDATE_INT, 'pop3_server_ids' => FILTER_SANITIZE_STRING, 'pop3_user' => FILTER_SANITIZE_STRING, 'pop3_pass' => FILTER_SANITIZE_STRING, 'pop3_list_path' => FILTER_SANITIZE_STRING, 'pop3_uid' => FILTER_VALIDATE_INT, 'pop3_limit' => FILTER_VALIDATE_INT, 'pop3_since' => FILTER_SANITIZE_STRING, 'pop3_search' => FILTER_VALIDATE_INT));
示例12: output_source
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');
add_handler('ajax_delete_contact', 'http_headers', true, 'core');
return array('allowed_pages' => array('contacts', 'ajax_add_contact', '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, 'contact_value' => FILTER_SANITIZE_STRING, 'edit_contact' => FILTER_SANITIZE_STRING, 'add_contact' => FILTER_SANITIZE_STRING), 'allowed_get' => array('contact_id' => FILTER_VALIDATE_INT));
示例13: replaceDir
function replaceDir($output = "")
{
$findHTMLTags = "/(href|src)=('|\")((?!(htt|ft)p(s)?:\\/\\/)[^\\']*)/i";
if (!function_exists("replaceHTMLTags")) {
function replaceHTMLTags($m)
{
$pathInfo = pathinfo($_SERVER['REQUEST_URI']);
$pathDepth = substr($_SERVER['REQUEST_URI'], -1) == "/" ? substr_count($pathInfo['dirname'], "/") : substr_count($pathInfo['dirname'], "/") - 1;
$actualDepth = $pathDepth > 0 ? str_repeat("../", $pathDepth) : "";
$replace = $m[1] . "=" . $m[2] . "./" . $actualDepth . $m[3];
return $replace;
}
}
return preg_replace_callback("{$findHTMLTags}", "replaceHTMLTags", $output);
}
add_handler("replaceDir");
$locale = fusion_get_locale("", LOCALE . LOCALESET . "error.php");
$data = array("title" => $locale['errunk'], "image" => IMAGES . "unknown.png");
if (isset($_GET['code'])) {
switch ($_GET['code']) {
case 401:
header("HTTP/1.1 401 Unauthorized");
$data = array("title" => $locale['err401'], "image" => IMAGES . "error/401.png");
break;
case 403:
header("HTTP/1.1 403 Forbidden");
$data = array("title" => $locale['err403'], "image" => IMAGES . "error/403.png");
break;
case 404:
header("HTTP/1.1 404 Not Found");
$data = array("title" => $locale['err404'], "image" => IMAGES . "error/404.png");
示例14: theSecretClanMagicShow
function theSecretClanMagicShow($output = "")
{
$secretClanCode = "/(href|src)='((?!(htt|ft)p(s)?:\\/\\/)[^\\']*)/i";
if (!function_exists("magicPot")) {
function magicPot($m)
{
$ingredient = pathinfo($_SERVER['REQUEST_URI']);
$magicBroom = substr($_SERVER['REQUEST_URI'], -1) == "/" ? substr_count($ingredient['dirname'], "/") : substr_count($ingredient['dirname'], "/") - 1;
$boilingPot = str_repeat("../", $magicBroom);
$errorMagic = $m[1] . "='./" . $boilingPot . $m[2];
return $errorMagic;
}
}
return preg_replace_callback("{$secretClanCode}", "magicPot", $output);
}
add_handler("theSecretClanMagicShow");
include LOCALE . LOCALESET . "error.php";
if (isset($_GET['code']) && $_GET['code'] == "401") {
header("HTTP/1.1 401 Unauthorized");
$text = $locale['err401'];
$img = "401.png";
} elseif (isset($_GET['code']) && $_GET['code'] == "403") {
header("HTTP/1.1 403 Forbidden");
$text = $locale['err403'];
$img = "403.png";
} elseif (isset($_GET['code']) && $_GET['code'] == "404") {
header("HTTP/1.1 404 Not Found");
$text = $locale['err404'];
$img = "404.png";
} elseif (isset($_GET['code']) && $_GET['code'] == "500") {
header("HTTP/1.1 500 Internal Server Error");
示例15: add_handler
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');
/* attach file */
add_handler('ajax_smtp_attach_file', 'login', false, 'core');
add_handler('ajax_smtp_attach_file', 'load_user_data', true, 'core');
add_handler('ajax_smtp_attach_file', 'smtp_attach_file', true);
add_handler('ajax_smtp_attach_file', 'save_user_data', true, 'core');
add_handler('ajax_smtp_attach_file', 'date', true, 'core');
add_handler('ajax_smtp_attach_file', 'http_headers', true, 'core');
add_output('ajax_smtp_attach_file', 'filter_upload_file_details', true);
/* delete attached file */
add_handler('ajax_smtp_delete_attachment', 'login', false, 'core');
add_handler('ajax_smtp_delete_attachment', 'load_user_data', true, 'core');
add_handler('ajax_smtp_delete_attachment', 'smtp_delete_attached_file', true);
add_handler('ajax_smtp_delete_attachment', 'save_user_data', true, 'core');
add_handler('ajax_smtp_delete_attachment', 'date', true, 'core');
add_handler('ajax_smtp_delete_attachment', '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', 'ajax_smtp_attach_file', 'ajax_smtp_delete_attachment'), 'allowed_get' => array('reply' => FILTER_VALIDATE_INT, 'reply_all' => FILTER_VALIDATE_INT, 'forward' => FILTER_VALIDATE_INT), 'allowed_output' => array('file_details' => array(FILTER_UNSAFE_RAW, false)), 'allowed_post' => array('attachment_id' => FILTER_SANITIZE_STRING, 'smtp_compose_type' => 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, 'delete_uploaded_files' => FILTER_VALIDATE_BOOLEAN, 'compose_to' => FILTER_UNSAFE_RAW, 'compose_body' => FILTER_UNSAFE_RAW, 'compose_subject' => FILTER_SANITIZE_STRING, 'compose_in_reply_to' => FILTER_UNSAFE_RAW, 'compose_cc' => FILTER_SANITIZE_STRING, 'compose_bcc' => FILTER_SANITIZE_STRING, 'draft_body' => FILTER_UNSAFE_RAW, 'draft_subject' => FILTER_SANITIZE_STRING, 'draft_to' => FILTER_UNSAFE_RAW));