view compos.inc.php @ 491:c360fb50221c

Add entity handling to stConvertCommonDesc().
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 07 Dec 2013 15:27:33 +0200
parents 532cebd9c9f2
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";
  }
}
?>