X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_transfer.php;h=339b5bbad8651f2f14c27f4ac79ac680de271e43;hp=082726877441afa82960a556dcd6dad90f07d4a2;hb=0f3a135204757cc8750262871c8e62c42300acb4;hpb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index 0827268774..339b5bbad8 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -1,7 +1,7 @@ 0) { +$result = SQL_QUERY('SELECT + `userid` AS `from_userid`,`to_userid`,`trans_id`,`points`,`reason`,`time_trans` +FROM + `{?_MYSQL_PREFIX?}_user_transfers_out` +ORDER BY + `trans_id` ASC', __FILE__, __LINE__); + +$total = '0'; +if (!SQL_HASZERONUMS($result)) { // Output rows - $OUT = ''; $SW = 2; + $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template - $content = array( - 'sw' => $SW, - 'trans_id' => $content['trans_id'], - 'stamp' => generateDateTime($content['time_trans'], 3), - 'from_link' => generateUserProfileLink($content['userid']), - 'to_link' => generateUserProfileLink($content['to_userid']), - 'reason' => wordwrap($content['reason'], 15), - 'points' => translateComma($content['points']), - ); + $content['time_trans'] = generateDateTime($content['time_trans'], 3); + $content['reason'] = wordwrap($content['reason'], 15); // Load row template add points and switch color $OUT .= loadTemplate('admin_list_transfer_row', true, $content); - $total += $content['points']; $SW = 3 - $SW; - } + $total += $content['points']; + } // END - while // Free memory SQL_FREERESULT($result); } else { // Nothing for in and out - $OUT = " - - ".loadTemplate('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))." + $OUT = ' + + ' . displayMessage('{--TRANSFER_NO_INOUT_TRANSFERS--}', true) . ' -"; +'; } // ... and add them to a constant for the template $content['rows'] = $OUT; // Remeber total amount -$content['total'] = translateComma($total); +$content['total_points'] = $total; // Set title -$content['title'] = getMessage('TRANSFER_LIST_ALL'); +$content['title'] = '{--TRANSFER_LIST_ALL--}'; // Set "balance" word -$content['balance'] = getMessage('TRANSFER_TOTAL_BALANCE'); +$content['balance'] = '{--TRANSFER_TOTAL_BALANCE--}'; // Don't show a delete button $content['delete'] = ' ';