• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Display admin logs script

Michael Orsino

Premium User
Premium User
Support Team
Joined
Nov 15, 2007
Messages
854
Solutions
10
Reaction score
389
Location
Santiago, Chile (Australian)
Don't know if this has been done before. Simple as though.
I use this with Gesior's account manager.

Code:
<?PHP
if($subtopic == "[B]gamemasterone[/B]") {
$main_content .= '<B>'.$config['server_name'].' [B]GM Whoever[/B]</B><BR><TEXTAREA ROWS="25" WRAP="physical" COLS="80" READONLY="true">';
$content = file_get_contents("[B]C:\directory\to\data\logs\GM Whoever.log[/B]");
}
$main_content .= $content;
if($subtopic == "[B]GM Whoever[/B]") {
$main_content .= '</TEXTAREA>';
}
?>
replace the bold bits to your likings.
This is how I have mine working

I guess not many people would like this, but it helps keep the players at ease knowing that no abuse is going on. Also its easier than checking the logs manually for foul play.
Anyhoo, hope you liked it~

-Michael
 
I use these in

Altara - Logi GM

Sorry
double post


Edited:
PHP:
<?PHP
if($subtopic == "gamemasterone") {
$main_content .= '<B>'.$config['server_name'].' GM Whoever</B><BR><TEXTAREA ROWS="25" WRAP="physical" COLS="80" READONLY="true">';
$content = file_get_contents("C:\directory\to\data\logs\GM Whoever.log");
}
$main_content .= $content;
if($subtopic == "gamemasterone") {
$main_content .= '</TEXTAREA>';
}
?>
 
They are not working... How to fix it?


Warning: file_get_contents(C:\xxxxxxxxxxxxxxxxx) [function.file-get-contents]: failed to open stream: Permission denied in C:\xxxxxxxx\logs.php on line 4
 
You haven't got permission to open this file, that's it. :) Look at Google and check how u can get them.
 
Code:
<?PHP
	if ($_GET['subtopic'] == "gmlog" && $_GET['gmname'])
		$main_content .= "<textarea rows='25' cols='80' readonly='true'>".file_get_contents("D:/otserv/logs/".$_GET['gmname'].".log")."</textarea>";
?>

??
 
PHP:
<?PHP
	if ($_GET['subtopic'] == "gmlog" && $_GET['gmname'])
		$main_content .= "<textarea rows='25' cols='80' readonly='true'>".file_get_contents("".$config['site']['server_path']."/data/logs/".$_GET['gmname'].".log")."</textarea>";
?>
??
 
Back
Top