Add a simple index to the top of the APIDOC page

This commit is contained in:
james 2011-02-21 22:17:58 +00:00
parent 8d7eb7ca72
commit 1d2642527e

View File

@ -60,9 +60,21 @@ echo "All API commands return \"status\", which is either \"ok\" or \"error\" <b
echo "If status is \"error\", then the return also contains \"error\" which contains the error message <br />\n";
echo "<h1>Implemented API</h1>\n";
ksort($commands);
$cols=3;
$percol=ceil($numi/$cols);
echo "<table cellspacing=\"10\">";
echo "<tr><td>";
$x=0;
foreach($commands AS $c=>$com) {
if($x%$percol==0) echo "</td><td>";
echo "<a href=\"#$c\">$c</a><br />";
$x++;
}
echo "</tr></table>\n";
foreach($commands AS $c=>$com) {
echo "<a name=\"$c\"></a>";
echo "<h2>".htmlspecialchars($c)."</h2>";
echo "<div class=\"apidoc\">\n";
echo $com['description'];