Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[HACK]Admin logs
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-11-11 18:00:58
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

<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 "&nbsp;&nbsp";

echo "<a href='admincp.php?action=clearsadminlogs&yes=no'><b>no</b></a>";

}

end_frame();

stdfoot();

}

// End Truncate admin logs



Please let me no of any errors
admin_logs.PNG
admin_logs.PNG
Unknown User
2008-11-11 18:52:26
Thanks

One error :

Forbidden

You don't have permission to access /cache/cache_logs.php on this server.
Unknown User
2008-11-11 18:57:23
"cmathias, post: 48872":
Thanks
One error :

Forbidden

You don't have permission to access /cache/cache_logs.php on this server.

Try chmod to 777
Unknown User
2008-11-11 19:06:27
Internal Server Error

File "/*******/**********/www/admincp.php" is writeable by group
Unknown User
2008-11-11 19:13:04
try 666
Unknown User
2008-11-11 19:30:23
same mistake
Unknown User
2008-11-11 20:39:06
give me halfhour am im avin problems with ma site then ill ava look
Unknown User
2008-11-11 20:51:00
"cmathias, post: 48877":
Internal Server Error
File "/*******/**********/www/admincp.php" is writeable by group

dont chmod admincp chmod cache_logs.php
Unknown User
2008-11-11 21:04:27
even putting the cache is such chmod 777
Unknown User
2008-11-12 01:39:05
The instructions are badly said for noobs.

You're assuming that people have this installed:

<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>
Which is not true for everyone...



Also finding the
?>





You are referring to the last ?>



Now the cache itself doesn't work on CHMOD 777 or 666



Another thing, I think that you mean cache_logs.txt NOT cache_logs.php



Either way, .txt nor .php works...





<iframe src="<? $site_config["SITEURL"] ?>cache/cache_logs.php"





That should end in .txt not .php





$fp = fopen('cache/cache_logs.php', 'w+');



Also needs to end in .txt
Unknown User
2008-11-12 13:00:41
well u do it then come on here criticizing our mods go back to the premium section
Unknown User
2008-11-12 13:04:01
just one question. there is a log function for tt. would it not be better to write it to that then in the admincp part when you click to see it the script would filter out all except for the who has accessed the staff panel. i am not criticizing, just a thought that may or may not be better.
Unknown User
2008-11-21 15:43:43
I have by my XAMPP these:

Error 403

localhost

11/21/08 16:39:57

Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.6
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728