Files
Facilitor/APPL/Shared/wisLog.asp
Jos Groot Lipman 902755a87b Gemakkelijker logging kunnen toggelen zonder complete refresh
w:\Trunk\CUST\custenv.wsc maar hier gebruik van

svn path=/Website/trunk/; revision=29106
2016-04-21 09:33:17 +00:00

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?")
}
%>