--- /dev/null
+<html>
+ <head>
+ </head>
+ <body>
+ <H1>Matitaweb Administration Panel</H1>
+ <p>
+ <FORM action="reset" method="post">
+ Reset user tables, delete user libraries
+ <input type="SUBMIT" value="Reset"/>
+ </FORM>
+ </p>
+ </body>
+</html>
user_tbl := (uid,(pw,None))::!user_tbl;
serialize ()
;;
+
+let reset () =
+ user_tbl := [];
+ session_tbl := [];
+ MatitaFilesystem.reset_lib ();
+ serialize ();
+;;
val deserialize : unit -> unit
val add_user : string -> string -> unit
+
+val reset : unit -> unit
prerr_endline "BEGIN TREE";prerr_endline res;prerr_endline "END TREE";
res
;;
+
+let reset_lib () =
+ let to_be_removed = (Helm_registry.get "matita.rt_base_dir") ^ "/users/*" in
+ Sys.command ("rm -rf " ^ to_be_removed)
+;;
val checkout : string -> unit
val html_of_library : string -> string
+
+val reset_lib : unit -> unit
;;
+let resetLib (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
+ let cgi = Netcgi1_compat.Netcgi_types.of_compat_activation cgi in
+ MatitaAuthentication.reset ();
+ cgi # set_header
+ ~cache:`No_cache
+ ~content_type:"text/html; charset=\"utf-8\""
+ ();
+
+ cgi#out_channel#output_string
+ ("<html><head>\n" ^
+ "<title>Matitaweb Reset</title>\n" ^
+ "<body><H1>Reset completed</H1></body></html>");
+ cgi#out_channel#commit_work()
+
open Netcgi1_compat.Netcgi_types;;
(**********************************************************************)