42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
<%@language = "javascript" %>
|
|
<% /*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: WisLog.asp
|
|
Remark: Wist de html logfile of zet de logging aan/uit
|
|
Je moet ingelogd zijn met FACTAB 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 logurl = rooturl + "/" + Application(customerId + "_logfilename")+".html";
|
|
|
|
if (CheckForLogging(Request.QueryString("logging")))
|
|
{
|
|
if (Session("logging") > 0)
|
|
Response.Redirect(logurl);
|
|
else
|
|
Response.Write("Logging is nu uit");
|
|
Response.End;
|
|
}
|
|
|
|
var logfile = Server.MapPath(logurl);
|
|
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?")
|
|
}
|
|
%>
|