timestamp info message and repeat warnings at end

This commit is contained in:
Sarah Hoffmann
2017-09-17 11:06:52 +02:00
parent cf32da3748
commit 3546b30473
2 changed files with 58 additions and 31 deletions

View File

@@ -128,3 +128,23 @@ function chksql($oSql, $sMsg = false)
return $oSql;
}
function info($sMsg)
{
echo date('Y-m-d H:i:s == ').$sMsg."\n";
}
$aWarnings = [];
function warn($sMsg)
{
$GLOBALS['aWarnings'][] = $sMsg;
echo date('Y-m-d H:i:s == ').'WARNING: '.$sMsg."\n";
}
function repeatWarnings()
{
foreach ($GLOBALS['aWarnings'] as $sMsg) {
echo ' * ',$sMsg."\n";
}
}