inc/modules/admin/what-list_network_params.php svneol=native#text/plain
inc/modules/admin/what-list_network_types.php svneol=native#text/plain
inc/modules/admin/what-list_networks.php svneol=native#text/plain
+inc/modules/admin/what-list_nickname.php svneol=native#text/plain
inc/modules/admin/what-list_notifications.php svneol=native#text/plain
inc/modules/admin/what-list_payouts.php svneol=native#text/plain
inc/modules/admin/what-list_point_accounts.php svneol=native#text/plain
templates/de/html/admin/admin_list_country_row.tpl svneol=native#text/plain
templates/de/html/admin/admin_list_coupon.tpl svneol=native#text/plain
templates/de/html/admin/admin_list_coupon_row.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_coupon_usr.tpl svneol=native#text/plain
+templates/de/html/admin/admin_list_coupon_usr_row.tpl svneol=native#text/plain
templates/de/html/admin/admin_list_doubler_already.tpl svneol=native#text/plain
templates/de/html/admin/admin_list_doubler_overview.tpl svneol=native#text/plain
templates/de/html/admin/admin_list_doubler_waiting.tpl svneol=native#text/plain
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running
// SQL commands to run
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD nick_userid ENUM ('nick','userid') NOT NULL DEFAULT 'userid'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `nickname` VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `nick_userid` ENUM ('nick','userid') NOT NULL DEFAULT 'userid'");
addMemberMenuSql('main','nickname','Nicknamen',5);
break;
case 'remove': // Do stuff when removing extension
// SQL commands to run
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='nickname'");
- addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_nickname','list_nickname')");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='nickname' LIMIT 1");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_nickname','list_nickname') LIMIT 2");
addDropTableSql('nickname_history');
break;
'SPONSOR_EMAIL_404' => "Bei der Anmeldung ist uns ein Fehler unterlaufen: Ihr Sponsor-Account mit der EMail-Adresse <span class=\"data\">%s</span> wurde nicht gefunden.",
'SPONSOR_ACCOUNT_PENDING_FAILED' => "Bei der Umschaltung Ihres Sponorenaccounts auf <em>Wartend</em> trat ein unerwarteter Fehler auf.",
'SPONSOR_ACCOUNT_404' => "Das von Ihnen angegebene Sponsorenaccount <span class=\"data\">%s</span> konnte nicht gefunden werden.",
- 'SPONSOR_ACCOUNT_FAILED' => "Sponsorenaccount konnte nicht geladen werden: <span class=\"data\">%s</span>",
+ 'SPONSOR_ACCOUNT_FAILED' => "Sponsorenaccount konnte nicht geladen werden: <span class=\"data\">{%%pipe,translateSponsorStatus=%s%%}</span>",
'SPONSOR_ACCOUNT_EMAIL_FAILED' => "Konnten Sponsorenaccount nicht freigeben! Bitte benachrichtigen Sie den Support.",
// Login form
}
// Translate the account status
-function sponsorTranslateUserStatus ($status) {
+function translateSponsorStatus ($status) {
// Construct constant name
$constantName = sprintf("ACCOUNT_STATUS_%s", $status);
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-// Check if the user has cashed coupons
-$result = SQL_QUERY('SELECT
+if (isGetRequestParameterSet('coupon_id')) {
+ // List userids for given coupon
+ $result = SQL_QUERY_ESC('SELECT
u.`coupon_id`,
u.`userid`,
UNIX_TIMESTAMP(u.`cashed_on`) AS `cashed_on`,
`{?_MYSQL_PREFIX?}_coupon_data` AS d
ON
u.`coupon_id`=d.`id`
+WHERE
+ u.`coupon_id`=%s
ORDER BY
- u.`cashed_on` DESC', __FILE__, __LINE__);
+ u.`cashed_on` DESC',
+ array(
+ bigintval(getRequestParameter('coupon_id'))
+ ), __FILE__, __LINE__);
-// Do we have entries?
-if (SQL_NUMROWS($result) > 0) {
- // Init variable
- $OUT = '';
+ // Do we have entries?
+ if (SQL_NUMROWS($result) > 0) {
+ // Init variable
+ $OUT = '';
- // Load all rows
- while ($content = SQL_FETCHARRAY($result)) {
- // Translate all timestamps
- $content['cashed_on'] = generateDateTime($content['cashed_on'] , '2');
- $content['coupon_created'] = generateDateTime($content['coupon_created'], '2');
- $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2');
+ // Load all rows
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Translate all timestamps
+ $content['cashed_on'] = generateDateTime($content['cashed_on'] , '2');
+ $content['coupon_created'] = generateDateTime($content['coupon_created'], '2');
+ $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2');
- // Add the row template
- $OUT .= loadTemplate('admin_list_coupon_row', true, $content);
- } // END - while
+ // Add the row template
+ $OUT .= loadTemplate('admin_list_coupon_usr_row', true, $content);
+ } // END - while
- // Load main template
- loadTemplate('admin_list_coupon', false, $OUT);
+ // Load main template
+ loadTemplate('admin_list_coupon_usr', false, $OUT);
+ } else {
+ // No cashed coupons found
+ displayMessage('{--ADMIN_LIST_COUPON_404--}');
+ }
+
+ // Free result
+ SQL_FREERESULT($result);
} else {
- // No cashed coupons found
- displayMessage('{--ADMIN_LIST_COUPON_404--}');
-}
+ // Check if the user has cashed coupons
+ $result = SQL_QUERY('SELECT
+ d.`id` AS `coupon_id`,
+ UNIX_TIMESTAMP(d.`coupon_created`) AS `coupon_created`,
+ UNIX_TIMESTAMP(d.`coupon_expired`) AS `coupon_expired`,
+ d.`points`,
+ d.`total_created`,
+ d.`total_cashed`,
+ d.`coupon_description`
+FROM
+ `{?_MYSQL_PREFIX?}_coupon_data` AS d
+ORDER BY
+ d.`id` ASC', __FILE__, __LINE__);
+
+ // Do we have entries?
+ if (SQL_NUMROWS($result) > 0) {
+ // Init variable
+ $OUT = '';
+
+ // Load all rows
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Translate all timestamps
+ $content['coupon_created'] = generateDateTime($content['coupon_created'], '2');
+ $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2');
-// Free result
-SQL_FREERESULT($result);
+ // Add the row template
+ $OUT .= loadTemplate('admin_list_coupon_row', true, $content);
+ } // END - while
+
+ // Load main template
+ loadTemplate('admin_list_coupon', false, $OUT);
+ } else {
+ // No cashed coupons found
+ displayMessage('{--ADMIN_LIST_COUPON_404--}');
+ }
+
+ // Free result
+ SQL_FREERESULT($result);
+}
// [EOF]
?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 07/29/2011 *
+ * =================== Last change: 07/29/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-list_nickname.php *
+ * -------------------------------------------------------------------- *
+ * Short description : List per-user nickname history *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Nickname-Historie per Mitglied auflisten *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * 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')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Display only title when no form was submitted
+addYouAreHereLink('admin', __FILE__);
+
+// Check if 'userid' is set
+if (isGetRequestParameterSet('userid')) {
+ // List all entries per user
+ showEntriesByXmlCallback('admin_list_nickname_history');
+} else {
+ // Output selection form with all confirmed user accounts listed
+ addMemberSelectionBox();
+}
+
+// [EOF]
+?>
}
} else {
// Locked or so?
- $STATUS = sponsorTranslateUserStatus($content['status']);
- $GLOBALS['sponsor_output'] = displayMessage('{%message,SPONSOR_ACCOUNT_FAILED=' . $STATUS . '%}', true);
+ $GLOBALS['sponsor_output'] = displayMessage('{%message,SPONSOR_ACCOUNT_FAILED=' . $content['status'] . '%}', true);
}
} else {
// Sponsor account not found
}
} else {
// Locked or so?
- $STATUS = sponsorTranslateUserStatus($content['status']);
- $GLOBALS['sponsor_output'] = displayMessage('{%message,SPONSOR_ACCOUNT_FAILED=' . $STATUS . '%}', true);
+ $GLOBALS['sponsor_output'] = displayMessage('{%message,SPONSOR_ACCOUNT_FAILED=' . $content['status'] . '%}', true);
}
} else {
// Sponsor account not found
+<div align="center">
<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=list_rallyes%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
</tr>
</table>
</form>
+</div>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
- <td colspan="9" class="table_header bottom" align="center">
+ <td colspan="7" class="table_header bottom" align="center">
<strong>{--ADMIN_LIST_CASHED_COUPONS_TITLE--}</strong>
</td>
</tr>
<td align="center" class="header_column bottom right">
<strong>{--COUPON_ID--}</strong>
</td>
- <td align="center" class="header_column bottom right">
- <strong>{--_USERID--}</strong>
- </td>
<td align="center" class="header_column bottom right">
<strong>{?POINTS?}</strong>
</td>
- <td align="center" class="header_column bottom right">
- <strong>{--COUPON_CASHED_ON--}</strong>
- </td>
<td align="center" class="header_column bottom right">
<strong>{--COUPON_CREATED_ON--}</strong>
</td>
</tr>
$content
<tr>
- <td colspan="9" class="table_footer" align="center">
+ <td colspan="7" class="table_footer" align="center">
<div class="tiny notice">{--ADMIN_LIST_CASHED_COUPONS_NOTE--}</div>
</td>
</tr>
<tr>
<td align="center" class="{%template,ColorSwitch%} bottom right">
- $content[coupon_id]
- </td>
- <td align="center" class="{%template,ColorSwitch%} bottom right">
- {%pipe,generateUserProfileLink=$content[userid]%}
+ [<a href="{%url=modules.php?module=admin&what=list_coupon&coupon_id=$content[coupon_id]%}">$content[coupon_id]</a>]
</td>
<td align="center" class="{%template,ColorSwitch%} bottom right">
{%pipe,translateComma=$content[points]%}
</td>
- <td align="center" class="{%template,ColorSwitch%} bottom right">
- $content[cashed_on]
- </td>
<td align="center" class="{%template,ColorSwitch%} bottom right">
$content[coupon_created]
</td>
--- /dev/null
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+<tr>
+ <td colspan="9" class="table_header bottom" align="center">
+ <strong>{--ADMIN_LIST_CASHED_COUPONS_TITLE--}</strong>
+ </td>
+</tr>
+<tr>
+ <td align="center" class="header_column bottom right">
+ <strong>{--COUPON_ID--}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{--_USERID--}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{?POINTS?}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{--COUPON_CASHED_ON--}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{--COUPON_CREATED_ON--}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{--COUPON_EXPIRED_ON--}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{--COUPON_TOTAL_CREATED--}</strong>
+ </td>
+ <td align="center" class="header_column bottom right">
+ <strong>{--COUPON_TOTAL_CASHED--}</strong>
+ </td>
+ <td align="center" class="header_column bottom">
+ <strong>{--COUPON_DESCRIPTION--}</strong>
+ </td>
+</tr>
+$content
+<tr>
+ <td colspan="9" class="table_footer" align="center">
+ <div class="tiny notice">{--ADMIN_LIST_CASHED_COUPONS_NOTE--}</div>
+ </td>
+</tr>
+</table>
+</div>
--- /dev/null
+<tr>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ $content[coupon_id]
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ {%pipe,generateUserProfileLink=$content[userid]%}
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ {%pipe,translateComma=$content[points]%}
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ $content[cashed_on]
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ $content[coupon_created]
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ $content[coupon_expired]
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ {%pipe,translateComma=$content[total_created]%}
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ {%pipe,translateComma=$content[total_cashed]%}
+ </td>
+ <td align="center" class="{%template,ColorSwitch%} bottom">
+ $content[coupon_description]
+ </td>
+</tr>
</tr>
<tr>
<td align="right" class="bottom right" height="25">{--SPONSOR_ID--}: </td>
- <td class="bottom">$content[id] [<strong><a href="{%url=modules.php?module=admin&what=lock_sponsor&id=$content[id]%}">{%pipe,sponsorTranslateUserStatus=$content[status]%}</a></strong>]</td>
+ <td class="bottom">$content[id] [<strong><a href="{%url=modules.php?module=admin&what=lock_sponsor&id=$content[id]%}">{%pipe,translateSponsorStatus=$content[status]%}</a></strong>]</td>
</tr>
<tr>
<td colspan="2" align="center" class="table_header bottom">
</tr>
<tr>
<td align="center" class="{%template,ColorSwitch%} bottom right" width="100">
- [<strong><a href="{%url=modules.php?module=admin&what=lock_sponsor&id=$content[id]%}">{%pipe,sponsorTranslateUserStatus=$content[status]%}</a></strong>]
+ [<strong><a href="{%url=modules.php?module=admin&what=lock_sponsor&id=$content[id]%}">{%pipe,translateSponsorStatus=$content[status]%}</a></strong>]
</td>
<td align="center" class="{%template,ColorSwitch%} bottom right" width="120">
$content[sponsor_created]