function admin_display_watchdog_entry
Search API
7.x admin.module | admin_display_watchdog_entry($wid) |
6.x admin.module | admin_display_watchdog_entry($wid) |
4.x admin.module | admin_display_watchdog_entry($wid) |
5.x admin.module | admin_display_watchdog_entry($wid) |
Display the details of a particular watchdog entry, specified by its table id.
File
- modules/
admin/ admin.module, line 1233 - The administrative configurations for FlightPath.
Code
function admin_display_watchdog_entry($wid) {
$rtn = "";
fp_add_css(fp_get_module_path("admin") . '/css/admin.css');
$severity_array = array(
5 => "notice",
1 => "alert",
3 => "error",
7 => "debug",
);
$res = db_query("SELECT * FROM watchdog WHERE wid = '?' ", $wid);
$cur = db_fetch_object($res);
$msg = t($cur->message, unserialize($cur->variables));
$severity = $severity_array [$cur->severity];
$when = format_date($cur->timestamp, "short");
// Display
$rtn .= "
<br>
<div class='watchdog-entry'>
<div class='watchdog-field'>
<label>ID:</label>
$cur->wid
</div>
<div class='watchdog-field'>
<label>Type:</label>
$cur->type
</div>
<div class='watchdog-field'>
<label>Time:</label>
$when ($cur->timestamp)
</div>
<div class='watchdog-field'>
<label>Severity:</label>
$severity
</div>
<div class='watchdog-field'>
<label>User:</label>
$cur->user_name | id: $cur->user_id | cwid: $cur->cwid | is_student: $cur->is_student | is_faculty: $cur->is_faculty
</div>
<div class='watchdog-field'>
<label>IP:</label>
$cur->ip
</div>
<div class='watchdog-field'>
<label>Location:</label>
$cur->location
</div>
<div class='watchdog-field'>
<label>Ref:</label>
$cur->referer
</div>
<hr>
<div class='watchdog-field'>
<label class='block'>Message:</label>
$msg
</div>
<div class='watchdog-field'>
<label class='block'>Extra:</label>
$cur->extra_data
</div>
</div>
";
return $rtn;
}