source: pages/dotation_dump.php@ 651

Last change on this file since 651 was 651, checked in by aleg, 15 years ago

Změněná cesta k GM a Char logům pro realmy 4 a 7.

File size: 1.6 KB
Line 
1<?php
2
3$db->select_db($Config['Database']['Database']);
4
5$Output = '<h3>Výpis příspěvků</h3>';
6
7$operace = array(
8 'buy' => 'Nákup',
9 'sell' => 'Prodej',
10 'consumption' => 'Spotřeba',
11 'internet' => 'Internet',
12 'contribution' => 'Příspěvek od',
13 'hosting' => 'Server hosting',
14);
15
16if(array_key_exists('page_index', $_GET)) $Page = $_GET['page_index'];
17 else $Page = 0;
18
19$DbResult = $db->query('SELECT COUNT(*) FROM `Finance`');
20$DbRow = $DbResult->fetch_row();
21$TotalCount = $DbRow[0];
22
23$Output .= '<div class="Center">'.$html->PageList('page_index', $Page, $TotalCount, $Config['Web']['TableRowPerPage'], 10).'</div>';
24$Output .= '<table class="BaseTable">'.
25 '<tr>'.
26 '<th>Datum</th>'.
27 '<th>Suma</th>'.
28 '<th>Popis</th>'.
29 '<th>Odměna</th>'.
30 '</tr>';
31
32$load_dotation = $db->query('SELECT * FROM `Finance` ORDER BY `Time` DESC LIMIT '.($Page * $Config['Web']['TableRowPerPage']).','.$Config['Web']['TableRowPerPage']);
33while($row = $load_dotation->fetch_assoc())
34{
35 $odmena = $row['Reward'];
36
37 if($row['Time'] != '')
38 {
39 $date = $server->HumanDate($row['Time'], 0);
40 //$date = $row['time'];
41 } else $date = '';
42 if($row['Money'] > 0) $plus = '+';
43 else $plus = '';
44 $Output .= '<tr>'.
45 '<td>'.$date.'</td>'.
46 '<td>'.$plus.$row['Money'].'</td>'.
47 '<td>'.$operace[$row['Operation']].' '.$row['Description'].'</td>'.
48 '<td>'.$odmena.'</td>'.
49 '</tr>';
50}
51$Output .= '</table>';
52$Output .= '<div class="Center">'.$html->PageList('page_index', $Page, $TotalCount, $Config['Web']['TableRowPerPage'], 10).'</div>';
53
54echo($Output);
55
56?>
Note: See TracBrowser for help on using the repository browser.