| ... | ... |
@@ -166,7 +166,7 @@ $confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
| 166 | 166 |
} |
| 167 | 167 |
else if (isset($_POST['submit'])) {
|
| 168 | 168 |
if(preg_match("!^[a-z0-9_ ]{3,30}$!i", $_POST['penname'])) {
|
| 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())");
|
|
| 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', '" . time() . "')");
|
|
| 170 | 170 |
$newuid = dbinsertid( ); |
| 171 | 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. "', INET6_ATON('".$_SERVER['REMOTE_ADDR']."'), 'RG', " . time() . ")");
|
| 172 | 172 |
if(!$skin) {
|
| ... | ... |
@@ -41,7 +41,7 @@ if($nid) {
|
| 41 | 41 |
{
|
| 42 | 42 |
$comment = escapestring(format_story(replace_naughty(strip_tags($_POST['comment'], $allowed_tags)))); |
| 43 | 43 |
if(!$cid && USERUID) {
|
| 44 |
- $insert = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_comments (nid, uid, comment, time) VALUES ('$nid', '".(USERUID ? USERUID : 0)."', '$comment', now())");
|
|
| 44 |
+ $insert = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_comments (nid, uid, comment, time) VALUES ('$nid', '".(USERUID ? USERUID : 0)."', '$comment', '" . time() . "')");
|
|
| 45 | 45 |
if($insert) dbquery("UPDATE ".TABLEPREFIX."fanfiction_news SET comments = comments + 1 WHERE nid = '$nid' LIMIT 1");
|
| 46 | 46 |
} |
| 47 | 47 |
else if($cid) {
|
| ... | ... |
@@ -149,4 +149,4 @@ else {
|
| 149 | 149 |
|
| 150 | 150 |
$tpl->printToScreen(); |
| 151 | 151 |
dbclose( ); |
| 152 |
-?> |
|
| 153 | 152 |
\ No newline at end of file |
| 153 |
+?> |
| ... | ... |
@@ -141,7 +141,7 @@ else if($action == "edit" || $action == "add") {
|
| 141 | 141 |
} |
| 142 | 142 |
else if($type == "ST") {
|
| 143 | 143 |
if(isset($_POST['chapid']) && isNumber($_POST['chapid'])) $chapid = $_POST['chapid']; |
| 144 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_reviews (item, type, reviewer, review, rating, date, uid, chapid) VALUES ('$item', 'ST', '$reviewer', '$review', '$rating', now(), '".(USERUID && isNumber(USERUID) ? USERUID : 0)."', '$chapid')");
|
|
| 144 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_reviews (item, type, reviewer, review, rating, date, uid, chapid) VALUES ('$item', 'ST', '$reviewer', '$review', '$rating', '" . time() . "', '".(USERUID && isNumber(USERUID) ? USERUID : 0)."', '$chapid')");
|
|
| 145 | 145 |
$count = dbquery("SELECT AVG(rating) as totalcount FROM ".TABLEPREFIX."fanfiction_reviews WHERE item = '$item' AND type = 'ST' AND rating != '-1'");
|
| 146 | 146 |
list($totalcount) = dbrow($count); |
| 147 | 147 |
if($totalcount) $update = dbquery("UPDATE ".TABLEPREFIX."fanfiction_stories SET rating = '".round($totalcount)."' WHERE sid = '$item'");
|
| ... | ... |
@@ -172,7 +172,7 @@ else if($action == "edit" || $action == "add") {
|
| 172 | 172 |
} |
| 173 | 173 |
} |
| 174 | 174 |
else if($type == "SE"){
|
| 175 |
- dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_reviews (item, type, reviewer, review, rating, date, uid) VALUES ('$item', 'SE', '$reviewer', '$review', '$rating', now(), '".(USERUID && isNumber(USERUID) ? USERUID : 0)."')");
|
|
| 175 |
+ dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_reviews (item, type, reviewer, review, rating, date, uid) VALUES ('$item', 'SE', '$reviewer', '$review', '$rating', '" . time() . "', '".(USERUID && isNumber(USERUID) ? USERUID : 0)."')");
|
|
| 176 | 176 |
$thisseries = $item; |
| 177 | 177 |
seriesreview($item); |
| 178 | 178 |
$uidquery = dbquery("SELECT uid as uid,title FROM ".TABLEPREFIX."fanfiction_series WHERE seriesid = '$item'");
|