www is out-dated
[mailer.git] / inc / modules / sponsor / logout.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 05/19/2008 *
4  * ===================                          Last change: 05/19/2008 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              :                                                  *
8  * -------------------------------------------------------------------- *
9  * Short description :                                                  *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  :                                                  *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * -------------------------------------------------------------------- *
18  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
19  * For more information visit: http://mxchange.org                      *
20  *                                                                      *
21  * This program is free software; you can redistribute it and/or modify *
22  * it under the terms of the GNU General Public License as published by *
23  * the Free Software Foundation; either version 2 of the License, or    *
24  * (at your option) any later version.                                  *
25  *                                                                      *
26  * This program is distributed in the hope that it will be useful,      *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
29  * GNU General Public License for more details.                         *
30  *                                                                      *
31  * You should have received a copy of the GNU General Public License    *
32  * along with this program; if not, write to the Free Software          *
33  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
34  * MA  02110-1301  USA                                                  *
35  ************************************************************************/
36
37 // Some security stuff...
38 if (!defined('__SECURITY')) {
39         die();
40 } elseif ((!isExtensionActive('sponsor'))) {
41         addFatalMessage(__FILE__, __LINE__, '{%pipe,generateExtensionInactiveNotInstalledMessage=sponsor%}');
42         return;
43 } elseif (!isSponsor()) {
44         // No sponsor!
45         addFatalMessage(__FILE__, __LINE__, '{--SPONSOR_ONLY_AREA_ENTERED--}');
46         return;
47 }
48
49 // Base URL for redirection (both cases)
50 $url = 'modules.php?module=index&amp;code=';
51
52 if (destroySponsorSession()) {
53         // Logout completed
54         $url .= getCode('LOGOUT_DONE');
55 } else {
56         // Cannot logout! :-(
57         $url .= getCode('LOGOUT_FAILED');
58 }
59
60 // Load the URL
61 redirectToUrl($url);
62
63 // [EOF]
64 ?>