75 lines
2.7 KiB
PHP
75 lines
2.7 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /?error_message=" . urlencode(getLanguageText('ERRORMSG-SESSION-EXPIRED')));
|
|
exit();
|
|
}
|
|
|
|
|
|
// Ensure that only valid user types have access to this module
|
|
$AllowedUserTypes = array('SuperUser','System Administrator','Application Volunteer','Schedule Volunteer','Administration Team','Schedule Team');
|
|
if (checkPermission($AllowedUserTypes) != 1) {
|
|
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED') . ": $action";
|
|
header("Location: /?error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
|
|
//
|
|
// Get parameters
|
|
//
|
|
if (array_key_exists('userid',$_GET) && strlen($_GET['userid']) > 0) $detail_userid = $_GET['userid'];
|
|
if (array_key_exists('activity_time',$_GET) && strlen($_GET['activity_time']) > 0) $detail_activity_time = $_GET['activity_time'];
|
|
if (array_key_exists('prev_query',$_GET) && strlen($_GET['prev_query']) > 0) $prev_query = $_GET['prev_query'];
|
|
|
|
if (!isset($detail_userid) || !isset($detail_activity_time)) return;
|
|
|
|
|
|
//
|
|
// Get log entry
|
|
//
|
|
$d_userid = db_escape_string($detail_userid);
|
|
$d_time = db_escape_string($detail_activity_time);
|
|
$results = db_query("SELECT * FROM activity_log WHERE school_num = $school_num AND userid = '$d_userid' AND activity_time = $d_time");
|
|
if (db_num_rows($results) == 0) return;
|
|
|
|
$row = db_fetch_assoc($results);
|
|
extract($row);
|
|
|
|
if ($_SESSION['UserInfo']['type'] != "SuperUser") {
|
|
$information = preg_replace("/login_password => .*\n/","login_password => ******\n",$information);
|
|
$information = preg_replace("/old_password => .*\n/","old_password => ******\n",$information);
|
|
$information = preg_replace("/password1 => .*\n/","password1 => ******\n",$information);
|
|
$information = preg_replace("/password2 => .*\n/","password2 => ******\n",$information);
|
|
$information = preg_replace("/password => .*\n/","password => ******\n",$information);
|
|
}
|
|
|
|
?>
|
|
<table width='90%' cellpadding='2' cellspacing='2' border='0' class='content-table'>
|
|
<tr>
|
|
<td align='right'><?php displayLanguageText('TEXT-USER-ID'); ?> :: </td>
|
|
<td align='left'><?php echo($userid) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><?php displayLanguageText('TEXT-ACTIVITY-TIME'); ?> :: </td>
|
|
<td align='left'><?php echo($activity_datetime) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><?php displayLanguageText('TEXT-IP-ADDRESS'); ?> :: </td>
|
|
<td align='left'><?php echo($user_ip) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><?php displayLanguageText('TEXT-ACTIVITY'); ?> :: </td>
|
|
<td align='left'><?php echo($activity) ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right' valign='top'><?php displayLanguageText('TEXT-ACTIVITY-DETAILS'); ?> :: </td>
|
|
<td align='left'>
|
|
<pre>
|
|
<?php echo($information) ?>
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|