| ... | ... |
@@ -78,7 +78,7 @@ function datadump ($table) {
|
| 78 | 78 |
datadump(current($table)); |
| 79 | 79 |
} |
| 80 | 80 |
|
| 81 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_BACKUP, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM')");
|
|
| 81 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_BACKUP, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM', " . time() . ")");
|
|
| 82 | 82 |
exit( ); |
| 83 | 83 |
|
| 84 | 84 |
?> |
| 85 | 85 |
\ No newline at end of file |
| ... | ... |
@@ -79,7 +79,7 @@ function datadump ($table) {
|
| 79 | 79 |
datadump(current($table)); |
| 80 | 80 |
} |
| 81 | 81 |
|
| 82 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_BACKUP, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM')");
|
|
| 82 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_BACKUP, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM', " . time() . ")");
|
|
| 83 | 83 |
exit( ); |
| 84 | 84 |
|
| 85 | 85 |
?> |
| 86 | 86 |
\ No newline at end of file |
| ... | ... |
@@ -59,7 +59,7 @@ if($maint == "reviews") {
|
| 59 | 59 |
while($code = dbassoc($codequery)) {
|
| 60 | 60 |
$eval($code['code_text']); |
| 61 | 61 |
} |
| 62 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_RECALCREVIEWS, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM')");
|
|
| 62 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_RECALCREVIEWS, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM', " . time() . ")");
|
|
| 63 | 63 |
$output .= write_message(_ACTIONSUCCESSFUL); |
| 64 | 64 |
} |
| 65 | 65 |
else if($maint == "stories") {
|
| ... | ... |
@@ -97,7 +97,7 @@ else if($maint == "categories") {
|
| 97 | 97 |
list($count) = dbrow($countquery); |
| 98 | 98 |
dbquery("UPDATE ".TABLEPREFIX."fanfiction_categories SET numitems = $count WHERE catid = $cat[0]");
|
| 99 | 99 |
} |
| 100 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_CATCOUNTS, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM')");
|
|
| 100 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_CATCOUNTS, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM', " . time() . ")");
|
|
| 101 | 101 |
$output .= write_message(_CATCOUNTSUPDATED); |
| 102 | 102 |
} |
| 103 | 103 |
else if($maint == "categories2") {
|
| ... | ... |
@@ -192,7 +192,7 @@ else if($maint == "optimize") {
|
| 192 | 192 |
dbquery("OPTIMIZE TABLE `".$tablename."`");
|
| 193 | 193 |
} |
| 194 | 194 |
} |
| 195 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_OPTIMIZE, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM')");
|
|
| 195 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_OPTIMIZE, USERPENNAME, USERUID))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'AM', " . time() . ")");
|
|
| 196 | 196 |
$output .= write_message(_ACTIONSUCCESSFUL); |
| 197 | 197 |
} |
| 198 | 198 |
else if($maint == "backup") {
|
| ... | ... |
@@ -168,7 +168,7 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 168 | 168 |
if(preg_match("!^[a-z0-9_ ]{3,30}$!i", $_POST['penname'])) {
|
| 169 | 169 |
dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))."(penname, realname, email, admincreated, date) VALUES ('".escapestring(descript($_POST['penname']))."', '".escapestring(descript($_POST['realname']))."', '".escapestring(descript($_POST['email']))."', '1', now())");
|
| 170 | 170 |
$newuid = dbinsertid( ); |
| 171 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_REG, descript($_POST['penname']), $newuid, USERPENNAME, USERUID, $_SERVER['REMOTE_ADDR']))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG')");
|
|
| 171 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_REG, descript($_POST['penname']), $newuid, USERPENNAME, USERUID, $_SERVER['REMOTE_ADDR']))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG', " . time() . ")");
|
|
| 172 | 172 |
if(!$skin) {
|
| 173 | 173 |
$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
| 174 | 174 |
list($skin) = dbrow($skinquery); |
| ... | ... |
@@ -42,7 +42,7 @@ $chapid = isset($_GET['chapid']) && isNumber($_GET['chapid']) ? $_GET['chapid'] |
| 42 | 42 |
if($logging) {
|
| 43 | 43 |
$storyquery = dbquery("SELECT story.title, chapter.title as chapter, author.email, author.penname, chapter.uid, chapter.inorder FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter, ".TABLEPREFIX."fanfiction_authors as author WHERE chapter.uid = author.uid AND chapter.chapid = '$chapid' AND chapter.sid = story.sid LIMIT 1");
|
| 44 | 44 |
$story = dbassoc($storyquery); |
| 45 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REJECTION, USERPENNAME, USERUID, $title, $sid, $uid, $penname, $inorder, $letter))."', '".USERUID."', INET_ATON('".$_ENV['REMOTE_ADDR']."'), 'RJ')");
|
|
| 45 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REJECTION, USERPENNAME, USERUID, $title, $sid, $uid, $penname, $inorder, $letter))."', '".USERUID."', INET_ATON('".$_ENV['REMOTE_ADDR']."'), 'RJ', ". time() . ")");
|
|
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 | 48 |
} |
| ... | ... |
@@ -108,7 +108,7 @@ function preview_story($stories) {
|
| 108 | 108 |
sendemail($favuser['penname'], $favuser['email'], $sitename, $siteemail, $subject, $mailtext, "html"); |
| 109 | 109 |
} |
| 110 | 110 |
} |
| 111 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_VALIDATE_STORY, USERPENNAME, USERUID, $title, $sid, $author, $authoruid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'VS')");
|
|
| 111 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_VALIDATE_STORY, USERPENNAME, USERUID, $title, $sid, $author, $authoruid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'VS', " . time() . ")");
|
|
| 112 | 112 |
dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET stories = stories + 1");
|
| 113 | 113 |
} |
| 114 | 114 |
else if($alertson) {
|
| ... | ... |
@@ -122,7 +122,7 @@ function preview_story($stories) {
|
| 122 | 122 |
while($favuser = dbassoc($favorites)) {
|
| 123 | 123 |
sendemail($favuser['penname'], $favuser['email'], $sitename, $siteemail, $subject, $mailtext, "html"); |
| 124 | 124 |
} |
| 125 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_VALIDATE_CHAPTER, USERPENNAME, USERUID, $title, $sid, $author, $authoruid, $inorder))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'VS')");
|
|
| 125 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_VALIDATE_CHAPTER, USERPENNAME, USERUID, $title, $sid, $author, $authoruid, $inorder))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'VS', " . time() . ")");
|
|
| 126 | 126 |
} |
| 127 | 127 |
dbquery("UPDATE ".TABLEPREFIX."fanfiction_chapters SET validated = '1' WHERE chapid = '$_GET[chapid]'");
|
| 128 | 128 |
dbquery("UPDATE ".TABLEPREFIX."fanfiction_stories SET updated = NOW( ) WHERE sid = '$sid'");
|
| ... | ... |
@@ -82,7 +82,7 @@ function random_string ($charset_string, $length) |
| 82 | 82 |
} |
| 83 | 83 |
dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." (penname, realname, bio, email, date, password) VALUES ('".escapestring($penname)."', '".escapestring(strip_tags($_POST['realname']))."', '".strip_tags(escapestring($_POST['bio']), $allowed_tags)."', '$email', now(), '$encryppass')");
|
| 84 | 84 |
$useruid = dbinsertid( ); |
| 85 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, USERUID, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG')");
|
|
| 85 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, USERUID, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG', " . time() . ")");
|
|
| 86 | 86 |
if(empty($siteskin)) {
|
| 87 | 87 |
$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey ='".SITEKEY."'");
|
| 88 | 88 |
list($skin) = dbrow($skinquery); |
| ... | ... |
@@ -134,7 +134,7 @@ function random_string ($charset_string, $length) |
| 134 | 134 |
} |
| 135 | 135 |
else {
|
| 136 | 136 |
dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
|
| 137 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB')");
|
|
| 137 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB', " . time() . ")");
|
|
| 138 | 138 |
} |
| 139 | 139 |
} |
| 140 | 140 |
/* This section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */ |
| ... | ... |
@@ -65,7 +65,7 @@ if($loggedin) accessDenied( ); |
| 65 | 65 |
} |
| 66 | 66 |
else $output .= write_message(_EMAILFAILED); |
| 67 | 67 |
if($logging) |
| 68 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_LOST_PASSWORD, $penname, $uid, ($result ? _YES : _NO)))."', '$uid', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'LP')");
|
|
| 68 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_LOST_PASSWORD, $penname, $uid, ($result ? _YES : _NO)))."', '$uid', INET_ATON('".$_SERVER['REMOTE_ADDR']. "'), 'LP', " . time() . ")");
|
|
| 69 | 69 |
|
| 70 | 70 |
} |
| 71 | 71 |
} |
| ... | ... |
@@ -40,7 +40,7 @@ function deleteStory($story) {
|
| 40 | 40 |
if($logging) {
|
| 41 | 41 |
$authorquery = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '".$story['uid']."' LIMIT 1");
|
| 42 | 42 |
list($penname) = dbrow($authorquery); |
| 43 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_DEL, USERPENNAME, USERUID, $story['title'], $sid, $penname, $story['uid']))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'DL')");
|
|
| 43 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_DEL, USERPENNAME, USERUID, $story['title'], $sid, $penname, $story['uid']))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'DL')");
|
|
| 44 | 44 |
} |
| 45 | 45 |
dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_stories WHERE sid = '$sid' LIMIT 1");
|
| 46 | 46 |
dbquery("DELETE FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '$sid'");
|
| ... | ... |
@@ -188,7 +188,7 @@ function deleteSeries($seriesid) {
|
| 188 | 188 |
eval($code['code_text']); |
| 189 | 189 |
} |
| 190 | 190 |
if($logging && isADMIN) {
|
| 191 |
- if($uid != USERUID) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_DEL_SERIES, USERPENNAME, USERUID, $title))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'DL')");
|
|
| 191 |
+ if($uid != USERUID) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_DEL_SERIES, USERPENNAME, USERUID, $title))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'DL', " . time() . ")");
|
|
| 192 | 192 |
} |
| 193 | 193 |
} |
| 194 | 194 |
?> |
| 195 | 195 |
\ No newline at end of file |
| ... | ... |
@@ -219,8 +219,8 @@ else if($action == "edit" || $action == "add") {
|
| 219 | 219 |
} |
| 220 | 220 |
} |
| 221 | 221 |
$reviewname = $reviewer."(".$_SERVER['REMOTE_ADDR'].")";
|
| 222 |
- if($action == "add") dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REVIEW, $reviewname, truncate_text($review), $title))."', '0', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RE')");
|
|
| 223 |
- else dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_EDIT_REVIEW, USERPENNAME, USERUID, $title, $reviewid))."', '0', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RE')");
|
|
| 222 |
+ if($action == "add") dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REVIEW, $reviewname, truncate_text($review), $title))."', '0', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RE', " . time() . ")");
|
|
| 223 |
+ else dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_EDIT_REVIEW, USERPENNAME, USERUID, $title, $reviewid))."', '0', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RE', " . time() . ")");
|
|
| 224 | 224 |
} |
| 225 | 225 |
} |
| 226 | 226 |
} |
| ... | ... |
@@ -121,7 +121,7 @@ if($add == "series" || ($action == "add" && !$add) || $action == "edit") {
|
| 121 | 121 |
if($logging && $admin) {
|
| 122 | 122 |
$seriesinfo = dbquery("SELECT title, uid FROM ".TABLEPREFIX."fanfiction_series WHERE seriesid = '$seriesid'");
|
| 123 | 123 |
list($title, $uid) = dbrow($seriesinfo); |
| 124 |
- if($uid != USERUID) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT_SERIES, USERPENNAME, USERUID, $title, $seriesid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED')");
|
|
| 124 |
+ if($uid != USERUID) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT_SERIES, USERPENNAME, USERUID, $title, $seriesid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED', " . time() . ")");
|
|
| 125 | 125 |
} |
| 126 | 126 |
$output = write_message(_ACTIONSUCCESSFUL."<br />"._BACK2ACCT); |
| 127 | 127 |
} |
| ... | ... |
@@ -554,7 +554,7 @@ function editchapter( $chapid ) {
|
| 554 | 554 |
if($admin && $logging && USERUID != $uid) {
|
| 555 | 555 |
$storyinfo = dbquery("SELECT story.title, story.sid, chapter.uid, chapter.inorder, "._PENNAMEFIELD." as penname FROM ".TABLEPREFIX."fanfiction_stories as story, ".TABLEPREFIX."fanfiction_chapters as chapter, "._AUTHORTABLE." WHERE "._UIDFIELD." = chapter.uid AND story.sid = chapter.sid AND chapter.chapid = $chapid");
|
| 556 | 556 |
list($title, $sid, $chapuid, $inorder, $chappenname) = dbrow($storyinfo); |
| 557 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT_CHAPTER, USERPENNAME, USERUID, $title, $sid, $chappenname, $chapuid, $inorder))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED')");
|
|
| 557 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT_CHAPTER, USERPENNAME, USERUID, $title, $sid, $chappenname, $chapuid, $inorder))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED', " . time() . ")");
|
|
| 558 | 558 |
} |
| 559 | 559 |
unset($_POST['submit']); |
| 560 | 560 |
$output = write_message(_STORYUPDATED).editstory($sid); |
| ... | ... |
@@ -694,7 +694,7 @@ function editstory($sid) {
|
| 694 | 694 |
list($oldpenname) = dbrow($authorquery); |
| 695 | 695 |
$author2query = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
| 696 | 696 |
list($newpenname) = dbrow($author2query); |
| 697 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT_AUTHOR, USERPENNAME, USERUID, $title, $sid, $newpenname, $uid, $oldpenname, $olduid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED')");
|
|
| 697 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT_AUTHOR, USERPENNAME, USERUID, $title, $sid, $newpenname, $uid, $oldpenname, $olduid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED', " . time() . ")");
|
|
| 698 | 698 |
} |
| 699 | 699 |
} |
| 700 | 700 |
|
| ... | ... |
@@ -814,7 +814,7 @@ function editstory($sid) {
|
| 814 | 814 |
if(USERUID != $uid) { // If you're editing your own story, don't log it.
|
| 815 | 815 |
$authorquery = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
| 816 | 816 |
list($penname) = dbrow($authorquery); |
| 817 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT, USERPENNAME, USERUID, $title, $sid, $penname, $uid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED')");
|
|
| 817 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_EDIT, USERPENNAME, USERUID, $title, $sid, $penname, $uid))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'ED', " . time() . ")");
|
|
| 818 | 818 |
} |
| 819 | 819 |
} |
| 820 | 820 |
$output .= write_message(_STORYUPDATED." ".($admin ? _BACK2ADMIN : _BACK2ACCT)); |
| ... | ... |
@@ -926,7 +926,7 @@ function delete( ) {
|
| 926 | 926 |
if($logging && $admin) {
|
| 927 | 927 |
$authorquery = dbquery("SELECT "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
|
| 928 | 928 |
list($penname) = dbrow($authorquery); |
| 929 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_ADMIN_DEL_CHAPTER, USERPENNAME, USERUID, $story['title'], $sid, $penname, $uid, $inorder))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'DL')");
|
|
| 929 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_ADMIN_DEL_CHAPTER, USERPENNAME, USERUID, $story['title'], $sid, $penname, $uid, $inorder))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'DL', " . time() . ")");
|
|
| 930 | 930 |
} |
| 931 | 931 |
return "<center>"._ACTIONSUCCESSFUL."</center>".editstory( $sid ); |
| 932 | 932 |
} |
| ... | ... |
@@ -82,7 +82,7 @@ function random_string ($charset_string, $length) |
| 82 | 82 |
} |
| 83 | 83 |
dbquery("INSERT INTO ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." (penname, realname, bio, email, date, password) VALUES ('".escapestring($penname)."', '".escapestring(strip_tags($_POST['realname']))."', '".strip_tags(escapestring($_POST['bio']), $allowed_tags)."', '$email', now(), '$encryppass')");
|
| 84 | 84 |
$useruid = dbinsertid(); |
| 85 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, $useruid, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG')");
|
|
| 85 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_REGISTER, $penname, $useruid, $_SERVER['REMOTE_ADDR']))."', '".$useruid."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG', " . time() . ")");
|
|
| 86 | 86 |
if(empty($siteskin)) {
|
| 87 | 87 |
$skinquery = dbquery("SELECT skin FROM ".$settingsprefix."fanfiction_settings WHERE sitekey = '".SITEKEY."'");
|
| 88 | 88 |
list($skin) = dbrow($skinquery); |
| ... | ... |
@@ -132,7 +132,7 @@ function random_string ($charset_string, $length) |
| 132 | 132 |
} |
| 133 | 133 |
else {
|
| 134 | 134 |
dbquery("UPDATE "._AUTHORTABLE." SET penname = '".escapestring($penname)."' WHERE uid = '$_POST[uid]'");
|
| 135 |
- if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB')");
|
|
| 135 |
+ if($logging) dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_NEWPEN, USERPENNAME, USERUID, $_POST[oldpenname], $uid, $penname))."', '".USERUID."', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'EB', " . time() . ")");
|
|
| 136 | 136 |
} |
| 137 | 137 |
} |
| 138 | 138 |
/* The section adds fields from the authorfields table to the authorinfo table allowing dynamic additions to the bio/registration page */ |
| ... | ... |
@@ -66,7 +66,7 @@ if(isMEMBER) accessDenied( ); |
| 66 | 66 |
} |
| 67 | 67 |
else $output .= write_message(_EMAILFAILED); |
| 68 | 68 |
if($logging) |
| 69 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`) VALUES('".escapestring(sprintf(_LOG_LOST_PASSWORD, $penname, $uid, ($result ? _YES : _NO)))."', '$uid', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'LP')");
|
|
| 69 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_log (`log_action`, `log_uid`, `log_ip`, `log_type`, `log_timestamp`) VALUES('".escapestring(sprintf(_LOG_LOST_PASSWORD, $penname, $uid, ($result ? _YES : _NO)))."', '$uid', INET_ATON('".$_SERVER['REMOTE_ADDR']."'), 'LP', " . time() . ")");
|
|
| 70 | 70 |
} |
| 71 | 71 |
|
| 72 | 72 |
} |