+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 06/20/2010 *
+ * =================== Last change: 06/20/2010 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : mailid_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext- *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Funktionen fuer ext- *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1793 $ *
+ * $Date:: 2010-05-28 18:58:31 +0200 (Fri, 28 May 2010) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: quix0r $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Handles the error code from mail confirmation
+function handleMailIdErrorCode ($errorCode) {
+ // Is an error set?
+ if (!empty($errorCode)) {
+ // @TODO Rewrite this to a dynamic include or so
+ switch (getConfig('mailid_error_redirect')) {
+ case 'INDEX': // Redirect to index page
+ redirectToUrl('modules.php?module=index&code=' . $errorCode . '&ext=mailid');
+ break;
+
+ case 'REJECT': // Redirect to rejection page
+ if (isExtensionActive('other')) {
+ // Redirect to configured URL
+ redirectToConfiguredUrl('reject_url');
+ } else {
+ // Redirect to index
+ redirectToUrl('modules.php?module=index');
+ }
+ break;
+
+ default:
+ logDebugMessage(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect')));
+ redirectToUrl('modules.php?module=index&code=' . getCode('UNKNOWN_STATUS') . '&ext=mailid');
+ break;
+ } // END - switch
+ } // END - if
+}
+
+// [EOF]
+?>