Files
Facilitor/APPL/FAC/fac_verify_sha.asp
Jos Groot Lipman 756857b8a3 fac_verify aanscherping
svn path=/Website/trunk/; revision=30644
2016-09-08 11:45:47 +00:00

97 lines
2.7 KiB
Plaintext

<%@language = "javascript" %>
<% /*
LET OP: Dit bestand moeilijk te beantwoorden vragen kan opwerpen
en is dan ook een 'undocumented' feature.
$Revision$
$Id$
File: appl/fac/fac_verify_sha.asp
Description: Verify Facilitor asp files
Parameters:
Context: Manual call to check asp file consistency
Note: FACTAB authorization is required
*/ %>
<!--#include file="../Shared/common.inc"-->
<!-- #include file="../Shared/json2.js" -->
<!-- #include file="./fac_verify_sha.inc" -->
<%
var autfunction = "WEB_FACTAB";
var authparams = user.checkAutorisation(autfunction);
if (Server.ScriptTimeout<600) Server.ScriptTimeout=600;
%>
<html>
<head>
<% FCLTHeader.Generate(); %>
<title>FACILITOR file checksum verifier</title>
<style>
table { width: 800px!important };
</style>
</head>
<body id="listbody">
<%
var SHAinfo = findSHAinfo();
if (!SHAinfo)
{
shared.internal_error("No .sha file found in " + Server.MapPath("../"));
Response.End()
}
Response.Write("<h1>Checking files from appl/{0} ({1})</h1>".format(
SHAinfo.shafile,
toDateTimeString(SHAinfo.shadate)));
%><h2>Correct files (<%=SHAinfo.ok.length%>)</h2><%
if (SHAinfo.changed.length)
{
%><h2>Changed files (<%=SHAinfo.changed.length%>)</h2>
<table class='rstable'>
<thead><tr><th>File</th><th>Message</th><th>Date</th></tr></thead>
<%
var cntbad = 0;
for (var i in SHAinfo.changed)
{
var file = SHAinfo.changed[i];
Response.Write("<tr><td>" + file.fname + "</td><td>" + file.message + "</td><td>" + toDateTimeString(file.date, true) + "</td></tr>");
}
%></table><%
}
else
Response.Write("<p>No modified files detected</p>");
if (SHAinfo.missing.length)
{
%><h2>Missing files (<%=SHAinfo.missing.length%>)</h2>
<table class='rstable'>
<thead><tr><th>File</th></tr></thead>
<%
var cntbad = 0;
for (var i in SHAinfo.missing)
{
var file = SHAinfo.missing[i];
Response.Write("<tr><td>" + file.fname + "</td></tr>");
}
%></table><%
}
if (SHAinfo.unknown.length)
{
%><h2>Unknown files (<%=SHAinfo.unknown.length%>)</h2>
<table class='rstable'>
<thead><tr><th>File</th><th>Date</th></tr></thead>
<%
var cntbad = 0;
for (var i in SHAinfo.unknown)
{
var file = SHAinfo.unknown[i];
Response.Write("<tr><td>" + file.fname + "</td><td>" + toDateTimeString(file.date, true) + "</td></tr>");
}
%></table><%
}
Response.Write("<p>Done in " + (SHAinfo.duration) + "ms");
%>
</body>
</html>