| ... | ... |
@@ -24,7 +24,7 @@ |
| 24 | 24 |
|
| 25 | 25 |
if(!defined("_CHARSET")) exit( );
|
| 26 | 26 |
|
| 27 |
-$logtypes = array("RG" => _NEWREG, "ED" => _ADMINEDIT, "DL" => _ADMINDELETE, "VS" => _VALIDATESTORY, "LP"=> _LOSTPASSWORD, "BL" => _BADLOGIN, "RE" => "Reviews", "AM" => "Admin Maintenance", "EB" => "Edit Bio");
|
|
| 27 |
+$logtypes = array("RG" => _NEWREG, "ED" => _ADMINEDIT, "DL" => _ADMINDELETE, "VS" => _VALIDATESTORY, "LP"=> _LOSTPASSWORD, "BL" => _BADLOGIN, "RE" => _ADMINREVIEWS, "AM" => _ADMINMAINT, "EB" => _ADMINEDITBIO);
|
|
| 28 | 28 |
$typequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'logtype'");
|
| 29 | 29 |
while($code = dbassoc($typequery)) {
|
| 30 | 30 |
eval($code['code_text']); |
| ... | ... |
@@ -46,7 +46,7 @@ $output .= "</select></form></div>"; |
| 46 | 46 |
$countquery = dbquery("SELECT COUNT(log_id) FROM ".TABLEPREFIX."fanfiction_log".($type ? " WHERE log_type = '$type'" : ""));
|
| 47 | 47 |
list($count) = dbrow($countquery); |
| 48 | 48 |
if($count > 0) {
|
| 49 |
- $result = dbquery("SELECT log_action, INET_NTOA(log_ip) as log_ip, log_timestamp as log_timestamp FROM ".TABLEPREFIX."fanfiction_log".($type ? " WHERE log_type = '$type'" : "")." ORDER BY log_timestamp DESC LIMIT $offset, $itemsperpage");
|
|
| 49 |
+ $result = dbquery("SELECT log_action, INET6_NTOA(log_ip) as log_ip, log_timestamp as log_timestamp FROM ".TABLEPREFIX."fanfiction_log".($type ? " WHERE log_type = '$type'" : "")." ORDER BY log_timestamp DESC LIMIT $offset, $itemsperpage");
|
|
| 50 | 50 |
$output .= "<table class=\"tblborder\" cellspacing=\"0\" cellpadding=\"3\" style=\"width: 90%; margin: 0 auto;\"><tr class=\"tblborder\"><th>"._ACTION."</th><th>"._IP."</th><th>"._DATE."</th></tr>"; |
| 51 | 51 |
while ($item = dbassoc($result)) {
|
| 52 | 52 |
$output .= "<tr class=\"tblborder\"> |
| ... | ... |
@@ -61,4 +61,4 @@ if($count > 0) {
|
| 61 | 61 |
} |
| 62 | 62 |
else $output .= write_message(_NORESULTS); |
| 63 | 63 |
$output .= write_message("<a href='admin.php?action=viewlog&purge=1'>"._PURGELOG."</a>");
|
| 64 |
-?> |
|
| 65 | 64 |
\ No newline at end of file |
| 65 |
+?> |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,64 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// eFiction 3.0 |
|
| 4 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 5 |
+// Valid HTML 4.01 Transitional |
|
| 6 |
+// Based on eFiction 1.1 |
|
| 7 |
+// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 8 |
+// http://efiction.sourceforge.net/ |
|
| 9 |
+// ---------------------------------------------------------------------- |
|
| 10 |
+// LICENSE |
|
| 11 |
+// |
|
| 12 |
+// This program is free software; you can redistribute it and/or |
|
| 13 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 14 |
+// as published by the Free Software Foundation; either version 2 |
|
| 15 |
+// of the License, or (at your option) any later version. |
|
| 16 |
+// |
|
| 17 |
+// This program is distributed in the hope that it will be useful, |
|
| 18 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 19 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 20 |
+// GNU General Public License for more details. |
|
| 21 |
+// |
|
| 22 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 23 |
+// ---------------------------------------------------------------------- |
|
| 24 |
+ |
|
| 25 |
+if(!defined("_CHARSET")) exit( );
|
|
| 26 |
+ |
|
| 27 |
+$logtypes = array("RG" => _NEWREG, "ED" => _ADMINEDIT, "DL" => _ADMINDELETE, "VS" => _VALIDATESTORY, "LP"=> _LOSTPASSWORD, "BL" => _BADLOGIN, "RE" => "Reviews", "AM" => "Admin Maintenance", "EB" => "Edit Bio");
|
|
| 28 |
+$typequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'logtype'");
|
|
| 29 |
+while($code = dbassoc($typequery)) {
|
|
| 30 |
+ eval($code['code_text']); |
|
| 31 |
+} |
|
| 32 |
+ |
|
| 33 |
+$type = isset($_GET['type']) ? $_GET['type'] : false; |
|
| 34 |
+if(isset($_GET['purge'])) {
|
|
| 35 |
+ $result = dbquery("TRUNCATE ".TABLEPREFIX."fanfiction_log");
|
|
| 36 |
+ if($result) $output .= write_message(_ACTIONSUCCESSFUL); |
|
| 37 |
+} |
|
| 38 |
+$output .= "<div id=\"pagetitle\">"._VIEWLOG."</div>"; |
|
| 39 |
+$output .= "<div style='text-align: center; margin: 1ex;'><form name=\"list\" action=\"\"><select name=\"list\" onchange=\"if(this.selectedIndex.value != 'false') document.location = document.list.list.options[document.list.list.selectedIndex].value\">"; |
|
| 40 |
+$logtypelist = dbquery("SELECT DISTINCT log_type FROM ".TABLEPREFIX."fanfiction_log ORDER BY log_type");
|
|
| 41 |
+$output .= "<option value=\"admin.php?action=viewlog\">"._ALL."</option>"; |
|
| 42 |
+while($t = dbrow($logtypelist)) {
|
|
| 43 |
+ $output .= "<option value='admin.php?action=viewlog&type=$t[0]'".($type == $t[0] ? " selected" : "").">$t[0] - ".(isset($logtypes[$t[0]]) ? $logtypes[$t[0]] : "???")."</option>"; |
|
| 44 |
+} |
|
| 45 |
+$output .= "</select></form></div>"; |
|
| 46 |
+$countquery = dbquery("SELECT COUNT(log_id) FROM ".TABLEPREFIX."fanfiction_log".($type ? " WHERE log_type = '$type'" : ""));
|
|
| 47 |
+list($count) = dbrow($countquery); |
|
| 48 |
+if($count > 0) {
|
|
| 49 |
+ $result = dbquery("SELECT log_action, INET_NTOA(log_ip) as log_ip, log_timestamp as log_timestamp FROM ".TABLEPREFIX."fanfiction_log".($type ? " WHERE log_type = '$type'" : "")." ORDER BY log_timestamp DESC LIMIT $offset, $itemsperpage");
|
|
| 50 |
+ $output .= "<table class=\"tblborder\" cellspacing=\"0\" cellpadding=\"3\" style=\"width: 90%; margin: 0 auto;\"><tr class=\"tblborder\"><th>"._ACTION."</th><th>"._IP."</th><th>"._DATE."</th></tr>"; |
|
| 51 |
+ while ($item = dbassoc($result)) {
|
|
| 52 |
+ $output .= "<tr class=\"tblborder\"> |
|
| 53 |
+ <td class=\"tblborder\">".stripslashes($item['log_action'])."</td> |
|
| 54 |
+ <td class=\"tblborder\">".$item['log_ip']."</td> |
|
| 55 |
+ <td class=\"tblborder\">".date("$dateformat", $item['log_timestamp'])."</td>
|
|
| 56 |
+ |
|
| 57 |
+ </tr>"; |
|
| 58 |
+ } |
|
| 59 |
+ $output .= "</table>"; |
|
| 60 |
+ if($count > $itemsperpage) $output .= build_pagelinks("admin.php?action=viewlog".($type ? "&type=$type&" : "&"), $count, $offset);
|
|
| 61 |
+} |
|
| 62 |
+else $output .= write_message(_NORESULTS); |
|
| 63 |
+$output .= write_message("<a href='admin.php?action=viewlog&purge=1'>"._PURGELOG."</a>");
|
|
| 64 |
+?> |
|
| 0 | 65 |
\ No newline at end of file |