Added PHP code to generate list of previous editors draft specifications.
authorManu Sporny <msporny@digitalbazaar.com>
Thu, 14 Oct 2010 16:01:09 -0400
changeset 3 d168cc4f169c
parent 2 288e5369e94a
child 4 2c21d0b65049
Added PHP code to generate list of previous editors draft specifications.
spec/index.php
--- a/spec/index.php	Thu Oct 14 15:37:24 2010 -0400
+++ b/spec/index.php	Thu Oct 14 16:01:09 2010 -0400
@@ -1,5 +1,5 @@
 <?php
-print """"
+print <<< htmlcode
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> 
 <html version="XHTML+RDFa 1.0" xmlns="http://www.w3.org/1999/xhtml"
@@ -13,7 +13,7 @@
    <head> 
       <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
       <title>JSON-LD - Specifications</title> 
-      <link href="site.css" rel="stylesheet" type="text/css" /> 
+      <link href="../site.css" rel="stylesheet" type="text/css" /> 
       <link rel="shortcut icon" href="favicon.ico" /> 
       <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
    </head> 
@@ -27,14 +27,29 @@
          </div> 
 
          <div id="content"> 
+            <div><a href="../">JSON-LD</a> &gt; Specifications</div>
             <div id="info"> 
-               <h1>Latest Specification</h1> 
-               <p></p>
+               <h1>Specifications</h1> 
+               <p>The following specifications are sorted in most recent to
+               least recent order:</p>
+               <ul style="margin-left: 1em">
+                 <li><a href="latest/">latest</a></li>
+
+htmlcode;
+
+$editorsDrafts = scandir('ED', 1);
+
+foreach($editorsDrafts as $draft)
+{
+   if($draft != "." and $draft != "..")
+   {
+     print("                 <li><a href=\"ED/$draft/\">$draft</a></li>");
+   }
+}
+
+print <<< htmlcode
+               </ul>
             </div>
-"""";
-
-
-print """"
          </div>
  
          <div id="footer"> 
@@ -48,6 +63,8 @@
       </div> 
    </body> 
 </html>
-"""";
+
+htmlcode;
+
 ?>