let root_page env (cgi:Netcgi1_compat.Netcgi_types.cgi_activation) = 
  let hpr = cgi # output # output_string in 
    handle_html_arg cgi "file" (fun s -> P.load_student_file ("./xml/"^s));

    cgi # set_header ~content_type:"text/html" ();    
    initialize_html hpr "Root page";

    hpr "<ul>\n";
    hpr "<li><a href='list.html'>Student List</a></li>\n";
    hpr "<li><a href='gradelist.html'>Grade Sheet</a></li>\n";
    hpr "<li><a href='orals.html'>Orals Sheet</a></li>\n";
    hpr "</ul>\n";

    hpr "<hr/>\n";

    hpr "<ul>\n";
    List.iter (fun s -> 
                 if (Str.string_match (Str.regexp ".*xml$") s 0) then 
                   hpr (Printf.sprintf "<li><a href='?file=%s'>%s</a></li>\n" s s))
      (listdir "./xml");
    hpr "</ul>\n";

    (* Form values *)
    if (!verbose_mode) then begin
      hpr "<hr/>\n";
      display_args_html hpr cgi;
      display_values_html hpr;
    end;

    finalize_html hpr;
    cgi # output # commit_work();