annotate pages/compos.inc.php @ 571:ce11ea112a65

Change the header blurb a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 23 May 2014 17:18:33 +0300
parents ed2247111fdd
children 135efe0c3b49
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0980e705dea0 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
2 //
571
ce11ea112a65 Change the header blurb a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 565
diff changeset
3 // FAPWeb - Simple Web-based Demoparty Management System
160
0980e705dea0 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
4 // Competitions page
565
ed2247111fdd Bump copyright years.
Matti Hamalainen <ccr@tnsp.org>
parents: 514
diff changeset
5 // (C) Copyright 2012-2014 Tecnic Software productions (TNSP)
160
0980e705dea0 Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
193
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
9 $sql = "SELECT id,name FROM compos WHERE visible<>0 ORDER BY id ASC";
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
10
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
11 if (($res = stExecSQL($sql)) !== FALSE)
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
12 {
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
13 $list = array();
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
14 foreach ($res as $item)
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
15 {
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
16 $list[] = "<a href=\"#compo".$item["id"]."\">".chentities($item["name"])."</a>";
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
17 }
338
c30f5bcb71fd Add class for compo list.
Matti Hamalainen <ccr@tnsp.org>
parents: 193
diff changeset
18 echo "<p class=\"compolist\">".join($list, " | ")."</p>";
193
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
19 }
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
20
1e4f530c8310 Add link list of compos.
Matti Hamalainen <ccr@tnsp.org>
parents: 160
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 foreach ($res as $item)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 {
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 echo
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 "<div id=\"compo".$item["id"]."\">\n".
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 "</div>\n";
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 ?>