This repository has been archived by the owner on Jul 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
debaty.inc
58 lines (53 loc) · 1.73 KB
/
debaty.inc
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
<?php
/*
* greybox
* $Id: debaty.inc,v 1.10 2007/03/05 15:31:59 che0 Exp $
*/
pg_head();
if ($GLOBALS["cps_debaty"] >= 1) cph_p(cphs_link("./?page=debata.add",$lang["add debate"]));
if (! cpdb_fetch_all("
select
tym_aff.tym_ID as aff_ID,
tym_aff.nazev as aff_tym,
tym_neg.tym_ID as neg_ID,
tym_neg.nazev as neg_tym,
teze.tx as teze,
teze.tx_short as teze_short,
teze.teze_ID as teze_ID,
datum,
vitez,
presvedcive,
achtung,
debata.debata_ID
from
debata
left join soutez on debata.soutez_ID = soutez.soutez_ID
left join debata_tym dt_aff on dt_aff.debata_ID = debata.debata_ID and dt_aff.pozice = 1
left join debata_tym dt_neg on dt_neg.debata_ID = debata.debata_ID and dt_neg.pozice = 0
left join tym tym_aff on dt_aff.tym_ID = tym_aff.tym_ID
left join tym tym_neg on dt_neg.tym_ID = tym_neg.tym_ID
left join teze on teze.teze_ID = debata.teze_ID
where
soutez.rocnik = :rocnik
order by
datum desc
", array(":rocnik"=>$GLOBALS["current_season"]),$r_debaty)) {
pg_achtung($lang["no records"]);
return;
}
de_html($r_debaty);
cph_table_head(array($lang["date"],$lang["aff"],$lang["neg"],$lang["resolution"],$lang["result"],""));
foreach ($r_debaty as $debata) {
cph_table_row(array(
format_date($debata["datum"]),
cphs_link("./?page=tym&tym_id=" . $debata["aff_ID"],$debata["aff_tym"]),
cphs_link("./?page=tym&tym_id=" . $debata["neg_ID"],$debata["neg_tym"]),
cphs_link("./?page=teze.detaily&teze_id=" . $debata["teze_ID"],$debata["teze_short"],array("title"=>$debata["teze"])),
result_to_str($debata["vitez"], $debata["presvedcive"]),
cphs_link("./?page=debata&debata_id=" . $debata["debata_ID"], $lang["details"])
),
$debata["achtung"] ? array("class"=>"achtung") : array()
);
}
cph_table_end();
?>