Mercurial > hg > fapweb
view pages/compos.inc.php @ 629:894a4a6bfb5f fap2013
Better fix for the DB migration issue.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 01 Nov 2014 07:03:10 +0200 |
parents | 135efe0c3b49 |
children | f1016ed4b05b |
line wrap: on
line source
<? // // FAPWeb - Simple Web-based Demoparty Management System // Competitions page // (C) Copyright 2012-2014 Tecnic Software productions (TNSP) // if (stChkSetting("showCompos")) { 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 class=\"compo\" href=\"#compo".$item["id"]."\">".chentities($item["name"])."</a>"; } echo "<div class=\"compolist\">".join($list, "<span class=\"composep\"> | </span>")."</div>"; } $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"; } } } ?>