]> git.mxchange.org Git - mailer.git/commitdiff
Slogan added, logout added to ext-sponsor:
authorRoland Häder <roland@mxchange.org>
Sat, 24 Jul 2010 01:47:34 +0000 (01:47 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 24 Jul 2010 01:47:34 +0000 (01:47 +0000)
- The slogan will now be displayed in sponsor menu's header
- Logout and only redirect from sponsor area to guest area added

.gitattributes
inc/libs/sponsor_functions.php
inc/modules/guest/what-sponsor_login.php
inc/modules/sponsor/guest.php [new file with mode: 0644]
inc/modules/sponsor/logout.php [new file with mode: 0644]
templates/de/html/sponsor/sponsor_header.tpl

index 26103286d660ee44bc57314870cb8b6eeaed740b..f7c06ae41c663821e80df97c46c61371c52a3a4d 100644 (file)
@@ -595,6 +595,8 @@ inc/modules/sponsor.php -text svneol=unset#text/plain
 inc/modules/sponsor/.htaccess -text svneol=unset#text/plain
 inc/modules/sponsor/.php -text svneol=unset#text/plain
 inc/modules/sponsor/account.php -text svneol=unset#text/plain
+inc/modules/sponsor/guest.php svneol=native#text/plain
+inc/modules/sponsor/logout.php svneol=native#text/plain
 inc/modules/sponsor/settings.php -text svneol=unset#text/plain
 inc/modules/sponsor/welcome.php -text svneol=unset#text/plain
 inc/monthly/.htaccess -text svneol=unset#text/plain
index 757d6880be6c91e5347c1ddf19d71b3d4ab50acf..bba582eb3f8e266a1b6aa8a0398f27918ea061e2 100644 (file)
@@ -256,7 +256,7 @@ function isSponsor () {
        // Determine it
        $ret = (
                (isSessionVariableSet('sponsor_id')) &&
-               (isSessionVariableSet('sponsorpass')) &&
+               (isSessionVariableSet('sponsor_pass')) &&
                (fetchSponsorData(getSession('sponsor_id')))
        );
 
@@ -369,7 +369,7 @@ WHERE
 LIMIT 1",
                        array(
                                bigintval(getSession('sponsor_id')),
-                               getSession('sponsorpass')
+                               getSession('sponsor_pass')
                        ), __FUNCTION__, __LINE__);
 
                // This update went fine?
@@ -441,7 +441,7 @@ function saveSponsorData ($postData, $content) {
        // Add SQL tail data
        $sql .= " WHERE `id`=%s AND `password`='%s' LIMIT 1";
        $DATA[] = bigintval(getSession('sponsor_id'));
-       $DATA[] = getSession('sponsorpass');
+       $DATA[] = getSession('sponsor_pass');
 
        // Saving data was completed... ufff...
        switch (getWhat()) {
@@ -830,5 +830,11 @@ function determineSponsorCountry ($sponsor_id) {
        return $country;
 }
 
+// Destroy sponsor session
+function destroySponsorSession () {
+       // Remove all user data from session
+       return ((setSession('sponsor_id', '')) && (setSession('sponsor_pass', '')));
+}
+
 // [EOF]
 ?>
index af26e823b616dfe82dda1a6ef4f55006e012caca..63439de1dbaa74217caaef3a42fcf8cdce7df5aa 100644 (file)
@@ -273,7 +273,7 @@ LIMIT 1",
                if ($status == 'CONFIRMED') {
                        // Is confirmed so both is fine and we can continue with login procedure
                        $login = ((setSession('sponsor_id'  , bigintval(postRequestParameter('sponsor_id')))) &&
-                       (setSession('sponsorpass', md5(postRequestParameter('password'))           ))
+                       (setSession('sponsor_pass', md5(postRequestParameter('password'))           ))
                        );
 
                        if ($login === true) {
diff --git a/inc/modules/sponsor/guest.php b/inc/modules/sponsor/guest.php
new file mode 100644 (file)
index 0000000..df26054
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 05/19/2008 *
+ * ===================                          Last change: 05/19/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              :                                                  *
+ * -------------------------------------------------------------------- *
+ * Short description :                                                  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  :                                                  *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * 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                           *
+ * 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();
+} elseif ((!isExtensionActive('sponsor'))) {
+       addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor'));
+       return;
+} elseif (!isSponsor()) {
+       // No sponsor!
+       addFatalMessage(__FILE__, __LINE__, '{--SPONSOR_ONLY_AREA_ENTERED--}');
+       return;
+}
+
+// Simple redirect
+redirectToUrl('modules.php?module=index');
+
+// [EOF]
+?>
diff --git a/inc/modules/sponsor/logout.php b/inc/modules/sponsor/logout.php
new file mode 100644 (file)
index 0000000..01514b3
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 05/19/2008 *
+ * ===================                          Last change: 05/19/2008 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              :                                                  *
+ * -------------------------------------------------------------------- *
+ * Short description :                                                  *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  :                                                  *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * 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                           *
+ * 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();
+} elseif ((!isExtensionActive('sponsor'))) {
+       addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveNotInstalledMessage('sponsor'));
+       return;
+} elseif (!isSponsor()) {
+       // No sponsor!
+       addFatalMessage(__FILE__, __LINE__, '{--SPONSOR_ONLY_AREA_ENTERED--}');
+       return;
+}
+
+// Base URL for redirection (both cases)
+$url = 'modules.php?module=index&amp;code=';
+
+if (destroySponsorSession()) {
+       // Remove theme cookie as well
+       if (isExtensionActive('theme')) setTheme('');
+
+       // Logout completed
+       $url .= getCode('LOGOUT_DONE');
+} else {
+       // Cannot logout! :-(
+       $url .= getCode('LOGOUT_FAILED');
+}
+
+// Load the URL
+redirectToUrl($url);
+
+// [EOF]
+?>
index 5b2c21c549b4911f5471aff7acb3064926e2bddf..1c9460c2e948a9ea866e483812ce0a095e5626ec 100644 (file)
@@ -1,3 +1,7 @@
 <div class="big">
        Willkommen zum Sponsorenbereich von {?MAIN_TITLE?}
 </div>
+
+<div>
+       {?SLOGAN?}
+</div>