fac_verify_data ook handige linkjes naar any-sql

svn path=/Website/branches/v2017.1/; revision=34873
This commit is contained in:
Jos Groot Lipman
2017-08-09 12:36:25 +00:00
parent 26576fdaef
commit c3e1560c6a

View File

@@ -63,6 +63,24 @@ if (Server.ScriptTimeout<600) Server.ScriptTimeout=600; // 10 minuten moet lukke
var hrefBase = window.location.href;
window.location.href = hrefBase;
}
function showSQL(sql)
{
window.genericsql = sql;
var url = "../mgt/mgt_genericsql.asp?sql=opener"; // requires window.opener and is safe
window.open(url);
}
document.addEventListener("DOMContentLoaded", function(event) {
var times = document.getElementsByClassName('fcltsql');
for (var i = 0; i < times.length; i++)
{
var tddata = times[i];
if (tddata.innerText.substr(0, 6).toUpperCase() == 'SELECT')
tddata.innerHTML = '<a href="#" onclick="showSQL(this.parentElement.innerText);return false;" title="View SQL">SELECT</a>' + tddata.innerHTML.substr(6);
}
});
</script>
</head>
<body>
@@ -664,6 +682,13 @@ checker("Controle: queries die geen records mogen opleveren",
" AND b.prs_bedrijf_key NOT IN (SELECT ba.prs_bedrijf_key" +
" FROM prs_bedrijfadres ba" +
" WHERE ba.prs_bedrijfadres_type = 'C')"
},
{ msg: "Dialect teksten die niet meer bestaan (te verwijderen uit MLD_LCL.SRC e.a.",
sql: "SELECT fac_localeitems_lcl FROM fac_localeitems" +
" MINUS " +
"SELECT fac_locale_xsl_label" +
" FROM fac_locale_xsl" +
" WHERE fac_locale_xsl_module = 'ASP' AND fac_locale_xsl_lang = 'NL'"
}];
if (S("prs_werkplek_implicit") == 1)
noResults.push({ msg: "Er zijn werkplekken met meerdere personen er op, foutief als prs_werkplek_implicit = 1",
@@ -692,7 +717,7 @@ checker("Controle: queries die geen records mogen opleveren",
if (cnt>0)
{
var txt = [noResults[noResult].msg + " ("+cnt+")",
noResults[noResult].sql];
"<span class='fcltsql'>" + noResults[noResult].sql + "</span>"];
if (cnt < 10) // Dan tonen we de data
{
oRs.Close();
@@ -767,7 +792,7 @@ checker("Controle: melding flexkenmerken van type 'R,S' waarvan de waarde niet t
}
var oRs = Oracle.Execute(noResults[noResult].sql);
if (!oRs.Eof)
messages.push(noResults[noResult].msg + "\n<br>"+noResults[noResult].sql);
messages.push(noResults[noResult].msg + "\n<br>"+"<span class='fcltsql'>" + noResults[noResult].sql + "</span>");
oRs.Close();
}
if (!messages.length)