Tom's Ban Logs on a website.

Newbie Spellweaver
Joined
May 26, 2011
Messages
8
Reaction score
2
Sorry for bad English.

I use "Forsaken-Flyff Homepage by Stefan Pfeifer".

Create file toms.php in admin folder.

use this code to toms.php:
PHP:
<?php include('inc/header.php'); ?>
<h1>Management - Toms Ban Logs</h1>
<?php
	echo '<table id="table" style="width: 100%;">
		<tr>
			<td id="key">Account</td>
			<td id="key">Time</td>
			<td id="key">IP</td>
		</tr>';
		
$handle = fopen("D:\\path\\to\\banlist.txt", "r");
while ($userinfo = fscanf($handle, "%s %d %s\n")) {
    list ($name, $time, $ip) = $userinfo;
	echo '<tr class="row">
				<td id="value">'.$name.'</td>
				<td id="value">'.($time=0?$time:'Permamently').'</td>
				<td id="value">'.$ip.'</td>
			</tr>';
}
echo '</table>';
fclose($handle);
?>
<?php include('inc/footer.php'); ?>

Add this
PHP:
<li><a href="toms.php">Toms Ban Logs</a></li>
to navigation.inc.php (admin/inc) example:
PHP:
<ul class="menu">
    <li id="headline">Settings</li>
    <li><a href="index.php">Main Settings</a></li>
    <li><a href="site_news.php">Site: News</a></li>
    <li><a href="site_downloads.php">Site: Downloads</a></li>
    <li><a href="site_shop_items.php">Site: Shop Items</a></li>
    <li><a href="site_shop_categories.php">Site: Shop Categories</a></li>
    <li><a href="site_faq.php">Site: FAQ</a></li>
    <li><a href="votebox.php">Vote Box</a></li>
</ul>
<br/><br/>
<ul class="menu">
    <li id="headline">Management</li>
    <li><a href="donlogs.php">Donation Logs</a></li>
    <li><a href="buylogs.php">Buying Logs</a></li>
    <li><a href="giftlogs.php">Gifting Logs</a></li>
    <li><a href="banlogs.php">Ban Logs</a></li>
    <li><a href="toms.php">Toms Ban Logs</a></li>
</ul>
<br/><br/>
<ul class="menu">
    <li id="headline">Member</li>
    <li><a href="users.php">Users</a></li>
    <li><a href="onlineplayer.php">Player online</a></li>
</ul>
<br/><br/>
<ul class="menu">
    <li><a href="http://forum.ragezone.com/f457/">« Back</a></li>
</ul>

Screenshots:
hzxazs0 - Tom's Ban Logs on a website. - RaGEZONE Forums

Credits:
98% Stefan Pfeifer
2% me
 
Last edited:
Back