* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * 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 *
}
// Add description as navigation point
-addMenuDescription('member', __FILE__);
+addYouAreHereLink('member', __FILE__);
if ((!isExtensionActive('transfer')) && (!isAdmin())) {
loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('transfer'));
`time_trans` VARCHAR(10) NOT NULL DEFAULT 0,
`trans_type` ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
KEY (`party_userid`)
-) TYPE=HEAP", array(getMemberId()), __FILE__, __LINE__);
+) TYPE = HEAP COMMENT = 'Temporary transfer table'", array(getMemberId()), __FILE__, __LINE__);
// Let's begin with the incoming list
$result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT {?transfer_max?}",
default: // Overview page
// Check incoming transfers
- $total = countSumTotalData(getMemberId(), 'user_transfers_in', 'id', 'userid', true);
- $content['in_link'] = $total;
- if ($total > 0) {
- $content['in_link'] = '<a href="{%url=modules.php?module=login&what=transfer&mode=list_in%}">' . $total . '</a>';
+ $totalIn = countSumTotalData(getMemberId(), 'user_transfers_in', 'id', 'userid', true);
+ $content['in_link'] = $totalIn;
+ if ($totalIn > 0) {
+ $content['in_link'] = '<a href="{%url=modules.php?module=login&what=transfer&mode=list_in%}">' . $totalIn . '</a>';
} // END - if
// Check outgoing transfers
- $dmy = countSumTotalData(getMemberId(), 'user_transfers_out', 'id', 'userid', true);
-
- // Add to total amount
- $total += $dmy;
+ $totalOut = countSumTotalData(getMemberId(), 'user_transfers_out', 'id', 'userid', true);
- $content['out_link'] = $dmy;
- if ($dmy > 0) {
- $content['out_link'] = '<a href="{%url=modules.php?module=login&what=transfer&mode=list_out%}">' . $dmy . '</a>';
+ $content['out_link'] = $totalOut;
+ if ($totalOut > 0) {
+ $content['out_link'] = '<a href="{%url=modules.php?module=login&what=transfer&mode=list_out%}">' . $totalOut . '</a>';
} // END - if
+ // Add all to total amount
+ $total = $totalIn + $totalOut;
+
// Total transactions
$content['all_link'] = $total;
if ($total > 0) {
- $content['all_link'] = '<a href="{%url=modules.php?module=login&what=transfer&mode=list_all%}">' . $total . '</a>';
+ $content['all_link'] = '<a href="{%url=modules.php?module=login&what=transfer&mode=list_all%}">{%pipe,translateComma=' . $total . '%}</a>';
} // END - if
if (isFormSent()) {
FROM
`{?_MYSQL_PREFIX?}_user_transfers_out`
WHERE
- `time_trans` > (UNIX_TIMESTAMP() - %s) AND `userid`=%s
+ `time_trans` > (UNIX_TIMESTAMP() - {?transfer_timeout?}) AND
+ `userid`=%s
ORDER BY
`time_trans` DESC
LIMIT 1",
array(
- getConfig('transfer_timeout'),
getMemberId()
), __FILE__, __LINE__);