Mercurial > hg > fapweb
annotate index.php @ 3:916623924bd5
More work on the party management and voting system.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 04 Dec 2012 20:27:08 +0200 |
parents | 50216ed31d78 |
children | 934ab7d8c244 |
rev | line source |
---|---|
0 | 1 <?php |
2 require "mconfig.inc.php"; | |
3 require "msite.inc.php"; | |
4 require "mcommon.inc.php"; | |
5 | |
6 // Switch to https first, if needed | |
7 if (!stCheckHTTPS()) | |
8 { | |
9 header("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); | |
10 exit; | |
11 } | |
12 | |
13 if (isset($_SERVER["REQUEST_URI"]) && | |
14 array_key_exists($_SERVER["REQUEST_URI"], $securePages)) | |
15 { | |
16 header("Cache-Control: private"); | |
17 header("Cache-Control: must-revalidate"); | |
18 header("Cache-Control: ".($securePages[$_SERVER["REQUEST_URI"]] ? "no-store" : "no-cache")); | |
19 } | |
20 | |
21 printPageHeader($pageTitle, | |
22 " <meta http-equiv=\"Pragma\" content=\"no-cache\" />"); | |
23 | |
24 if (!stConnectSQLDB()) | |
25 { | |
26 printPageFooter(); | |
27 exit; | |
28 } | |
29 | |
30 ?> | |
31 <div id="headerbox"> | |
32 <div id="header"> | |
33 <a href="news"><img src="img/fapsm.png" alt="Finnish Amiga Party 2012" class="logo" /></a> | |
34 <div id="date">30.11. - 2.12.2012<br />Helsinki, Finland<br />@ old location<br />Entry 15 EUR + prod</div> | |
35 </div> | |
36 <div id="menu"> | |
37 <a href="news">News</a> | |
38 <a href="compos">Compos</a> | |
39 <a href="event">Event</a> | |
40 <a href="attendees">Attendees</a> | |
41 <? | |
2
50216ed31d78
Add voting button link, if enabled.
Matti Hamalainen <ccr@tnsp.org>
parents:
0
diff
changeset
|
42 if (stGetSetting("allowVoting", FALSE)) |
0 | 43 echo " <a href=\"vote\">Vote</a>\n"; |
3
916623924bd5
More work on the party management and voting system.
Matti Hamalainen <ccr@tnsp.org>
parents:
2
diff
changeset
|
44 |
916623924bd5
More work on the party management and voting system.
Matti Hamalainen <ccr@tnsp.org>
parents:
2
diff
changeset
|
45 if (stGetSetting("showResults", FALSE)) |
916623924bd5
More work on the party management and voting system.
Matti Hamalainen <ccr@tnsp.org>
parents:
2
diff
changeset
|
46 echo " <a href=\"results\">Results</a>\n"; |
0 | 47 ?> |
48 </div> | |
49 </div> | |
50 | |
51 <div id="maincontent"> | |
52 <div> | |
53 <? | |
54 $pageName = isset($_GET["p"]) ? $_GET["p"] : "news"; | |
55 $pageFilename = basename($pageName).".inc.php"; | |
56 if (file_exists($pageFilename)) | |
57 include($pageFilename); | |
58 ?> | |
59 </div> | |
60 </div> | |
61 <? | |
62 printPageFooter(); | |
63 ?> |