2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 10/06/2012 *
4 * =================== Last change: 10/06/2012 *
6 * -------------------------------------------------------------------- *
7 * File : what-subids.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Lists and manages member's own sub ids *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Auflisten und verwalten der Mitglied-SubIds *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * -------------------------------------------------------------------- *
18 * Copyright (c) 2003 - 2009 by Roland Haeder *
19 * Copyright (c) 2009 - 2012 by Mailer Developer Team *
20 * For more information visit: http://mxchange.org *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
27 * This program is distributed in the hope that it will be useful, *
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
30 * GNU General Public License for more details. *
32 * You should have received a copy of the GNU General Public License *
33 * along with this program; if not, write to the Free Software *
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
36 ************************************************************************/
38 // Some security stuff...
39 if (!defined('__SECURITY')) {
41 } elseif (!isMember()) {
42 redirectToIndexMemberOnlyModule();
45 // Add description as navigation point
46 addYouAreHereLink('member', __FILE__);
48 // Continue only if the proper extension is active (admins can always continue)
49 if ((!isExtensionActive('user')) && (!isAdmin())) {
50 // Required extension ext-user not active
51 displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=user%}');
57 // By default show the list...
60 // Check for 'url_id' element
61 //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isFormSent()=' . intval(isFormSent('add_subid')) . ',ifPostContainsSelections()=' . intval(ifPostContainsSelections()) . ',countRequestPost()=' . countRequestPost());
62 if ((countRequestPost('id') > 0) && (!isFormSent('add_subid')) && ((!ifPostContainsSelections('id')) || (countRequestPost('id') == 0))) {
63 // Not found so output message
64 displayMessage('{--MEMBER_SUBID_NO_SELECTIONS--}');
70 // Edit or delete button hit?
71 if (isFormSent('add_subid')) {
73 showEntriesByXmlCallback('member_add_do_user_subid');
74 } elseif (isFormSent('edit')) {
75 // Show entries for editing
76 showEntriesByXmlCallback('member_edit_show_user_subid');
78 // Do not show the list of URLs after this template
80 } elseif (isFormSent('do_edit')) {
81 // Change data of entries
82 showEntriesByXmlCallback('member_edit_do_user_subid');
83 } elseif (isFormSent('delete')) {
84 // Show entries for deletion
85 showEntriesByXmlCallback('member_delete_show_user_subid');
87 // Do not show the list of URLs after this template
89 } elseif (isFormSent('do_delete')) {
90 // Remove entries from database
91 showEntriesByXmlCallback('member_delete_do_user_subid');
95 if ($show === false) {
96 // No, a form has already been show
100 // List all campaigns
101 showEntriesByXmlCallback('member_list_subid');
103 // Display form for adding a sub id
104 loadTemplate('member_add_subid');