forked from arnost00/members
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfin_claims.inc.php
63 lines (55 loc) · 1.96 KB
/
fin_claims.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php /* financnik - seznam reklamaci */
if (!defined("__HIDE_TEST__")) exit; /* zamezeni samostatneho vykonani */ ?>
<?
DrawPageTitle('Přehled reklamací členů');
?>
<CENTER>
<script language="javascript">
<!--
javascript:set_default_size(800,800);
//-->
</script>
<?
require_once "./common_user.inc.php";
$query = 'select *, f.id as fin_id from `'.TBL_FINANCE.'` as f inner join
`'.TBL_CLAIM.'` as c on f.id = c.payment_id inner join
`'.TBL_USER.'` as u on f.id_users_user = u.id left join
`'.TBL_RACE.'` as r on f.id_zavod = r.id
where f.claim = 1 and c.id in (select max(id) from `'.TBL_CLAIM.'` group by payment_id)
order by u.sort_name';
@$vysledek=query_db($query);
$i=1;
if ($vysledek != FALSE && mysqli_num_rows($vysledek) > 0)
{
$data_tbl = new html_table_mc();
$col = 0;
$data_tbl->set_header_col($col++,'Poř.č.',ALIGN_CENTER);
$data_tbl->set_header_col($col++,'Člen',ALIGN_LEFT);
$data_tbl->set_header_col($col++,'Závod',ALIGN_LEFT);
$data_tbl->set_header_col($col++,'Datum',ALIGN_LEFT);
$data_tbl->set_header_col($col++,'Částka',ALIGN_LEFT);
$data_tbl->set_header_col($col++,'Poznámka',ALIGN_LEFT);
$data_tbl->set_header_col($col++,'Reklamace',ALIGN_LEFT);
$data_tbl->set_header_col($col++,'Možnosti',ALIGN_CENTER);
echo $data_tbl->get_css()."\n";
echo $data_tbl->get_header()."\n";
echo $data_tbl->get_header_row()."\n";
while ($zaznam=mysqli_fetch_array($vysledek))
{
$row = array();
$row[] = $i++;
$row[] = $zaznam['prijmeni']." ".$zaznam['jmeno'];
$row[] = GetFormatedTextDel($zaznam['nazev'], $zaznam['cancelled']);
$row[] = $zaznam['date'];
$row[] = $zaznam['amount'];
$row[] = $zaznam['note'];
$row[] = $zaznam['text'];
if ($g_enable_finances_claim)
$row[] = '<A HREF="javascript:open_win(\'./claim.php?payment_id='.$zaznam['fin_id'].'\',\'\')">Problém?</A>';
echo $data_tbl->get_new_row_arr($row)."\n";
}
echo $data_tbl->get_footer()."\n";
}
?>
<BR>
</CENTER>