Mercurial > hg > fapweb
annotate compos.inc.php @ 511:6fe66ea0e954
Move most of the results code to site module, remove the support for HTML
type output.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Dec 2013 02:16:26 +0200 |
parents | c360fb50221c |
children |
rev | line source |
---|---|
14
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
8
diff
changeset
|
1 <? |
160 | 2 // |
3 // FAPWeb Simple Demoparty System | |
4 // Competitions page | |
5 // (C) Copyright 2012-2013 Tecnic Software productions (TNSP) | |
6 // | |
14
e36c4d2b09c4
Fix settings to work, clean up the code, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
8
diff
changeset
|
7 echo stGetSetting("compoDescription"); |
0 | 8 |
193 | 9 $sql = "SELECT id,name FROM compos WHERE visible<>0 ORDER BY id ASC"; |
10 | |
11 if (($res = stExecSQL($sql)) !== FALSE) | |
12 { | |
13 $list = array(); | |
14 foreach ($res as $item) | |
15 { | |
16 $list[] = "<a href=\"#compo".$item["id"]."\">".chentities($item["name"])."</a>"; | |
17 } | |
338 | 18 echo "<p class=\"compolist\">".join($list, " | ")."</p>"; |
193 | 19 } |
20 | |
21 | |
24
5bc8bd5c7ecc
Make voting toggle for individual compos.
Matti Hamalainen <ccr@tnsp.org>
parents:
14
diff
changeset
|
22 $sql = "SELECT * FROM compos WHERE visible<>0 ORDER BY id ASC"; |
8
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
23 |
4c5f651aa107
Migrate certain settings to SQL database, cleanups, etc.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
24 if (($res = stExecSQL($sql)) !== FALSE) |
0 | 25 { |
26 foreach ($res as $item) | |
27 { | |
28 echo | |
29 "<div id=\"compo".$item["id"]."\">\n". | |
30 "<h2>".chentities($item["name"])."</h2>\n". | |
491
c360fb50221c
Add entity handling to stConvertCommonDesc().
Matti Hamalainen <ccr@tnsp.org>
parents:
488
diff
changeset
|
31 stConvertCommonDesc($item["description"], FALSE). |
0 | 32 "</div>\n"; |
33 } | |
34 } | |
35 ?> |