<%@language = "javascript" %>
<% /*
    $Revision$
    $Id$

    File:    WisLog.asp
    Remark:  Wist de html logfile
             Je moet ingelogd zijn met PRSSYS rechten
    Context: Met knop vanuit de logfile
*/
if (Application("otap_environment") == "O")
    ANONYMOUS_Allowed = 1;
%>
<!--#include file="../Shared/common.inc"-->
<%
    Application("otap_environment") == "O" || user.checkAutorisation("WEB_FACTAB");

    var fso = Server.CreateObject("Scripting.FileSystemObject");
    var logfile = Server.MapPath(rooturl + "/" + Application(customerId + "_logfilename")+".html");
    if (fso.FileExists(logfile))
    {
        fso.DeleteFile (logfile);
        Response.Write("Logfile " + logfile + " has been erased.");
        Response.Redirect (rooturl + "/" + Application(customerId + "_logfilename")+".html?" + (new Date).getTime());
    }
    else
    {
        Response.Write("Strange: file " & logfile & " not found?")
    }
%>
