changeset 193:1e4f530c8310

Add link list of compos.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 10 Nov 2013 15:48:23 +0200
parents 4594594f8b74
children 82803532a51c ef26d16b836e
files compos.inc.php
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/compos.inc.php	Sun Nov 10 15:29:46 2013 +0200
+++ b/compos.inc.php	Sun Nov 10 15:48:23 2013 +0200
@@ -52,6 +52,20 @@
   return $str;
 }
 
+
+$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>".join($list, " | ")."</p>";
+}
+
+
 $sql = "SELECT * FROM compos WHERE visible<>0 ORDER BY id ASC";
 
 if (($res = stExecSQL($sql)) !== FALSE)