From 1d2642527e00bde5049a4ee6a001f69a8ecd0ee8 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 21 Feb 2011 22:17:58 +0000 Subject: [PATCH] Add a simple index to the top of the APIDOC page --- apidoc.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apidoc.php b/apidoc.php index f8bd78a..e741bd4 100644 --- a/apidoc.php +++ b/apidoc.php @@ -60,9 +60,21 @@ echo "All API commands return \"status\", which is either \"ok\" or \"error\" \n"; echo "

Implemented API

\n"; - ksort($commands); +$cols=3; +$percol=ceil($numi/$cols); +echo ""; +echo "
"; +$x=0; foreach($commands AS $c=>$com) { + if($x%$percol==0) echo ""; + echo "$c
"; + $x++; +} +echo "
\n"; + +foreach($commands AS $c=>$com) { + echo ""; echo "

".htmlspecialchars($c)."

"; echo "
\n"; echo $com['description'];