Keep track on whos been in admin cp

1st make a file name cache_logs.php and upload it to ur cache folder leave it as 644
Now open admincp.php
Find
Please let me no of any errors

1st make a file name cache_logs.php and upload it to ur cache folder leave it as 644
Now open admincp.php
Find
<td align="center"><a href=admincp.php?action=clearshoutbox><img src="images/admin/forums.gif" border=0 width=32 height=32><BR>Clear Shoutbox</a><BR></td>Add below<td align="center"><a href=admincp.php?action=clearsadminlogs><img src="images/admin/forums.gif" border=0 width=32 height=32><br>Clear adminlogs</a><BR></td>
Find
</table></p>
Add below
<?
#======================================================================
#
# admin logs by foz-------foz@basslinebeats.co.uk
#======================================================================#
begin_frame("Admin logs");
?>
<iframe src="<? $site_config["SITEURL"] ?>cache/cache_logs.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="100" width=350 scrolling="yes" align="middle"></iframe>
<?
end_frame();
// End admin logs
?>
Find
?>
Add above
#======================================================================
#
# Admin logs by foz-------foz@basslinebeats.co.uk
#======================================================================#
$filename = 'cache/cache_logs.php';
$somecontent = "(" . $CURUSER["username"] . "--" . $CURUSER["ip"] . ")--\n";
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
fclose($handle);
} else {
echo "The file $filename is not writable";
}
// End admin logs
#======================================================================
#
# Truncate admin logs by foz-------foz@basslinebeats.co.uk
#======================================================================#
if ($action == "clearsadminlogs") {
stdhead("Clear adminlogs");
navmenu();
begin_frame("Clear logs", center);
if ($yes == "yes") {
$fp = fopen('cache/cache_logs.php', 'w+');
ftruncate($fp, 4);
if ($res) echo "admin logs cleared";
} else {
echo "Are you sure you want to clear the admin logs?<br>";
echo "<a href='admincp.php?action=clearsadminlogs&yes=yes'><b>Yes</b></a>";
echo "  ";
echo "<a href='admincp.php?action=clearsadminlogs&yes=no'><b>no</b></a>";
}
end_frame();
stdfoot();
}
// End Truncate admin logsPlease let me no of any errors