inc/modules/member/action-stats.php svneol=native#text/plain
inc/modules/member/action-surfbar.php svneol=native#text/plain
inc/modules/member/action-themes.php svneol=native#text/plain
+inc/modules/member/subid- svneol=native#text/plain
+inc/modules/member/subid-stats.php svneol=native#text/plain
inc/modules/member/what- svneol=native#text/plain
inc/modules/member/what-bank_create.php svneol=native#text/plain
inc/modules/member/what-bank_deposit.php svneol=native#text/plain
./inc/modules/member/what-beg.php:54:// @TODO Can't this be moved into EL?
./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter *
+./inc/modules/member/what-logout.php:52: // @TODO Move this in a filter, e.g. member_logout
./inc/modules/member/what-order.php:471: // @TODO Rewrite this to a filter
./inc/modules/member/what-order.php:84: // @TODO Rewrite this to SQL_FETCHARRAY()
./inc/modules/member/what-payout.php:194: // @TODO Rewrite this to a filter
'MEMBER_USER_SUBID_STATS_LINK' => "Aufrufstatistiken",
'MEMBER_USER_SUBID_ADDED' => "Sub-Id hinzugefügt",
'MEMBER_CHANGE_USER_SUBID' => "Geben Sie eine neue ein:",
+ 'MEMBER_INVALID_DO_USER_SUBID' => "Ungültiges Sub-Modul aufgerufen! Sollten Sie der Meinung sein, dies ist ein Fehler, so teilen Sie bitte dem Support mit, wie es zu dieser Meldung gekommen ist.",
+ 'MEMBER_USER_SUBID_NOT_ASSIGNED_404' => "Die angegebene Sub-Id-Kennung ist Ihrem Mitgliedsaccount nicht zugewiesen oder existiert nicht.",
+
+ // Member - sub ids - submit buttons
'MEMBER_USER_SUBIDS_CHANGE_SUBMIT' => "Sub-Ids ändern",
'MEMBER_USER_SUBIDS_REMOVE_SUBMIT' => "Sub-Ids löschen",
+
+ // Member - sub ids - notices
'MEMBER_EDIT_USER_SUBIDS_NOTICE' => "Wenn Sie doch nichts ändern wollen, klicken Sie einfach auf <strong>{--MEMBER_USER_SUBIDS_CHANGE_SUBMIT--}</strong> oder in der Navigation <strong>{--YOU_ARE_HERE--}</strong> auf Sub-Id Tracking.",
'MEMBER_DELETE_USER_SUBIDS_NOTICE' => "Wollen Sie die oben aufgeführte(n) Sub-Id(s) wirklich löschen? Dieses ist nicht umkehrbar! Die Statistik dazu bleibt noch eine Weile gespeichert, ist aber nicht mehr aus der Auswahl aufrufbar (Sie können sich ja den Link notieren?).",
return $subId;
}
+// Check whether given sub *id* is assigned to current member
+function isUserSubIdAssignedToMember ($subId) {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__][$subId])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__][$subId] = ((isMember()) && (countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', true, sprintf(" AND `id`=%s", bigintval($subId))) == 1));
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__][$subId];
+}
+
//-----------------------------------------------------------------------------
// EL code functions
//-----------------------------------------------------------------------------
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 10/08/2012 *
+ * =================== Last change: 10/08/2012 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : subid- *
+ * -------------------------------------------------------------------- *
+ * Short description : *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://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')) {
+ exit();
+} elseif (!isMember()) {
+ redirectToIndexMemberOnlyModule();
+} elseif ((!isGetRequestElementSet('id')) || (!isUserSubIdAssignedToMember(getRequestElement('id')))) {
+ redirectToUrl('modules.php?module=login&what=subids');
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 10/08/2012 *
+ * =================== Last change: 10/08/2012 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : subid-stats.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Statistics sub-module for sub ids *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Statistik-Untermodul fuer Sub-Ids *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://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')) {
+ exit();
+} elseif (!isMember()) {
+ redirectToIndexMemberOnlyModule();
+} elseif ((!isGetRequestElementSet('id')) || (!isUserSubIdAssignedToMember(getRequestElement('id')))) {
+ redirectToUrl('modules.php?module=login&what=subids');
+}
+
+// [EOF]
+?>
// Base URL for redirection (both cases)
$url = 'modules.php?module=index&code=';
-if (destroyMemberSession()) {
+// Do the logout but keep session if current user is also admin
+if (destroyMemberSession(!isAdmin())) {
// Remove theme cookie as well
+ // @TODO Move this in a filter, e.g. member_logout
if (isExtensionActive('theme')) {
setMailerTheme('');
} // END - if
} elseif (isFormSent('do_delete')) {
// Remove entries from database
showEntriesByXmlCallback('member_delete_do_user_subid');
+} elseif ((isGetRequestElementSet('do')) && (isGetRequestElementSet('id'))) {
+ // Construct module name
+ $incFile = sprintf("inc/modules/member/subid-%s.php", SQL_ESCAPE(getRequestElement('do')));
+
+ // Is the include readable and is the sub id assigned to current member?
+ if (!isUserSubIdAssignedToMember(getRequestElement('id'))) {
+ // Sub id is not assigned to current member or doesn't exist
+ displayMessage('{--MEMBER_USER_SUBID_NOT_ASSIGNED_404--}');
+ } elseif (isIncludeReadable($incFile)) {
+ // Then include it
+ loadIncludeOnce($incFile);
+
+ // Do not show the list of URLs after this template
+ $show = false;
+ } else {
+ // Display error message
+ displayMessage('{--MEMBER_INVALID_DO_USER_SUBID--}');
+ }
}
// Show entries?
}
// Destroy user session
-function destroyMemberSession () {
+function destroyMemberSession ($destroy = false) {
// Reset userid
initMemberId();
// Remove all user data from session
- return ((setSession('userid', '')) && (setSession('u_hash', '')));
+ if ($destroy === true) {
+ // Destroy whole session
+ return session_destroy();
+ } else {
+ return ((setSession('userid', '')) && (setSession('u_hash', '')));
+ }
}
// Destroys the admin session