From 259c881488239188a3a8606043a6864042de42f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 24 Jul 2010 01:47:34 +0000 Subject: [PATCH] Slogan added, logout added to ext-sponsor: - The slogan will now be displayed in sponsor menu's header - Logout and only redirect from sponsor area to guest area added --- .gitattributes | 2 + inc/libs/sponsor_functions.php | 12 +++- inc/modules/guest/what-sponsor_login.php | 2 +- inc/modules/sponsor/guest.php | 55 ++++++++++++++++ inc/modules/sponsor/logout.php | 69 ++++++++++++++++++++ templates/de/html/sponsor/sponsor_header.tpl | 4 ++ 6 files changed, 140 insertions(+), 4 deletions(-) create mode 100644 inc/modules/sponsor/guest.php create mode 100644 inc/modules/sponsor/logout.php diff --git a/.gitattributes b/.gitattributes index 26103286d6..f7c06ae41c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 757d6880be..bba582eb3f 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -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] ?> diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index af26e823b6..63439de1db 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -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 index 0000000000..df26054390 --- /dev/null +++ b/inc/modules/sponsor/guest.php @@ -0,0 +1,55 @@ + diff --git a/inc/modules/sponsor/logout.php b/inc/modules/sponsor/logout.php new file mode 100644 index 0000000000..01514b3f5c --- /dev/null +++ b/inc/modules/sponsor/logout.php @@ -0,0 +1,69 @@ + diff --git a/templates/de/html/sponsor/sponsor_header.tpl b/templates/de/html/sponsor/sponsor_header.tpl index 5b2c21c549..1c9460c2e9 100644 --- a/templates/de/html/sponsor/sponsor_header.tpl +++ b/templates/de/html/sponsor/sponsor_header.tpl @@ -1,3 +1,7 @@
Willkommen zum Sponsorenbereich von {?MAIN_TITLE?}
+ +
+ {?SLOGAN?} +
-- 2.39.5