Location: PHPKode > projects > NMS: Network Monitor System > nms/access_logs.php
<?php

// Includes The ADOdb Settings
require_once('adodb/adodb.inc.php');

// Includes The Config Settings
require_once('includes/config.php');

// Includes The Top.php Settings
require_once('includes/top.php');

$secure_username = $_SESSION['username'];

$result = $db->GetAll("SELECT * FROM `nms_users` where username='$secure_username'");
foreach($result as $row)
{
    $access_level = $row['user_level'];
}

// Redirect All Restricted Users
if($access_level == 0) {
   echo "<p>You don't have permission to view this page. If you feel you have
         reached this page by error, please contact the Server Administrator.</p>";
}

// If They Have Permission, We Let Them Pass
if($access_level == 1) {

//Set Up The Table
echo "<table border='1' width='100%'><tr>";
echo "<td>IP Address</td>";
echo "<td>URL Accessed</td>";
echo "<td>Date Accessed</td>";
echo "<td>Users Browser</td>";
echo "</tr>";

// Gets The Access Logs
$result = $db->GetAll("SELECT * FROM nms_access ORDER BY id DESC");
foreach($result as $row)
{
    echo "<tr>";
    echo "<td>";
	echo $row['ip'];
    echo "</td>";
    echo "<td>";
	echo $row['url'];
    echo "</td>";
    echo "<td>";
    echo $row['date'];
    echo "</td>";
    echo "<td>";
    echo $row['browser'];
    echo "</td>";
    echo "</tr>";
}

// Close Off The Table
echo "</table>";

}

// Includes The Bot.php Settings
require_once('includes/bot.php');

?>
Return current item: NMS: Network Monitor System