Mercurial > hg > fapweb
view 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 |
line wrap: on
line source
<? // // FAPWeb Simple Demoparty System // Competitions page // (C) Copyright 2012-2013 Tecnic Software productions (TNSP) // echo stGetSetting("compoDescription"); $sql = "SELECT id,name FROM compos WHERE visible<>0 ORDER BY id ASC"; if (($res = stExecSQL($sql)) !== FALSE) { $list = array(); foreach ($res as $item) { $list[] = "<a href=\"#compo".$item["id"]."\">".chentities($item["name"])."</a>"; } echo "<p class=\"compolist\">".join($list, " | ")."</p>"; } $sql = "SELECT * FROM compos WHERE visible<>0 ORDER BY id ASC"; if (($res = stExecSQL($sql)) !== FALSE) { foreach ($res as $item) { echo "<div id=\"compo".$item["id"]."\">\n". "<h2>".chentities($item["name"])."</h2>\n". stConvertCommonDesc($item["description"], FALSE). "</div>\n"; } } ?>