* Kurzbeschreibung : Allgemeine Filter *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2015 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Filter for adding style sheet, closing page header
function FILTER_FINISH_PAGE_HEADER () {
// Include stylesheet
- loadIncludeOnce('inc/stylesheet.php');
+ loadStyleSheets();
// Closing HEAD tag
$GLOBALS['__page_header'] .= '</head>';
redirectToUrl('modules.php?module=index');
}
-// Filter for redirecting on wrong server name (e.g. bad.your-server.tld will be redirected to your-server.tld)
-function FILTER_REDIRECT_WRONG_SERVER_NAME ($filterData) {
- // Get URL
- $url = getUrl();
-
- // Is the configured URL same as SERVER_NAME?
- if (extractHostnameFromUrl($url) != detectServerName()) {
- // Log all attempts
- logWrongServerNameRedirect();
-
- // Then redirect to configured URL
- redirectToRequestUri();
- } // END - if
-
- // Return filter data
- return $filterData;
-}
-
// Filter for adding hidden session id
function FILTER_ADD_INPUT_HIDDEN_SESSION_ID ($filterData) {
// Is a spider detected?
return $filterData;
}
-// Filter for purging old SERVER_NAME entries
-function FILTER_SERVER_NAME_EXTRA_AUTOPURGE ($filterData) {
- // Is purging configured?
- if ((isApServerNameEnabled()) && (getApServerNameSince() > 0)) {
- // Then start purging
- sqlQuery('DELETE LOW_PRIORITY FROM
- `{?_MYSQL_PREFIX?}_server_name_log`
-WHERE
- (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`server_name_added`)) >= {?ap_server_name_since?}',
- __FILE__, __LINE__);
-
- // Are some entries deleted?
- if (sqlAffectedRows() > 0) {
- // Okay, then send an email to the admin
- sendAdminNotification('{--ADMIN_PURGE_SERVER_NAME_LOG_SUBJECT--}', 'admin_purge_user_server_name_log', sqlAffectedRows());
- } // END - if
- } // END - if
-
- // Return filter data
- return $filterData;
-}
-
// Filter for detecting menu mode
function FILTER_DETERMINE_MENU_MODE_GENERIC ($filterData) {
// "Detect" it