<script type="text/javascript">
function checkForm(form)
{
return confirm('Are you sure you want to clear the cheat log?');
}
function setRun(value)
{
document.form.Run.value = value;
}
</script>
<?PHP
if( isset($message) )
{
?>
<div id="message">
<?PHP echo $message; ?>
</div>
<br />
<?PHP
}
?>
<table>
<tr>
<td>
Suspected Cheating Attempts
</td>
</tr>
<tr>
<td>
The 100 most recent cheat log entries are listed below. To view the entire cheat log, download the
'cheatlog' file from the topsites/data.
<br />
<br />
<?PHP
clearstatcache();
$size = filesize("{$GLOBALS['DDIR']}/cheatlog");
if( $size > 1048576 )
{
$size = sprintf("%.2f MB", $size/1048576);
}
else if( $size > 1024 )
{
$size = sprintf("%.2f KB", $size/1024);
}
else
{
$size = $size . ' bytes';
}
?>
The cheat log is currently <?PHP echo $size; ?> in size.
<span><a href="admin.php?Run=ClearCheatLogPT" onClick="return confirm('Are you sure you want to do this?')" target="_top">[Clear Cheat Log]</a></span><br />
To maintain performance levels you should clear the cheat log if it is larger than 2 megabytes.
<xmp>
<?PHP
$counter = 0;
$lines = array_reverse(file("{$GLOBALS['DDIR']}/cheatlog"));
foreach( $lines as $line )
{
if( $counter > 100 )
{
break;
}
echo "$line";
$counter++;
}
?>
</xmp>
</td>
</tr>
</table>
<br />
<br />