mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-08-06 23:22:02 -07:00
Newreply is now (more or less) error free, hopefully
This commit is contained in:
39
newreply.php
39
newreply.php
@@ -114,8 +114,8 @@
|
|||||||
<b>Password:</b> $inpp=password SIZE=13 MAXLENGTH=64 autocomplete=\"off\">
|
<b>Password:</b> $inpp=password SIZE=13 MAXLENGTH=64 autocomplete=\"off\">
|
||||||
</span><tr>
|
</span><tr>
|
||||||
$tccell1><b>Reply:</td>
|
$tccell1><b>Reply:</td>
|
||||||
$tccell2l width=800px valign=top>".replytoolbar(2)."
|
$tccell2l width=800px valign=top>
|
||||||
$txta=message ROWS=21 COLS=$numcols style=\"width: 100%; max-width: 800px; resize:vertical;\" ".replytoolbar(3).">". htmlspecialchars($quotemsg, ENT_QUOTES) ."</TEXTAREA></td>
|
$txta=message ROWS=21 COLS=$numcols style=\"width: 100%; max-width: 800px; resize:vertical;\">". htmlspecialchars($quotemsg, ENT_QUOTES) ."</TEXTAREA></td>
|
||||||
$tccell2l width=*>".moodlist(filter_int($moodid))."</td><tr>
|
$tccell2l width=*>".moodlist(filter_int($moodid))."</td><tr>
|
||||||
<tr>
|
<tr>
|
||||||
$tccell1> </td>$tccell2l colspan=2>
|
$tccell1> </td>$tccell2l colspan=2>
|
||||||
@@ -134,8 +134,7 @@
|
|||||||
$tblstart$postlist$tblend
|
$tblstart$postlist$tblend
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forumid>$forum[title]</a> - $thread[title]
|
$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forumid>$forum[title]</a> - $thread[title]";
|
||||||
".replytoolbar(4);
|
|
||||||
} elseif(!$_POST['action']) {
|
} elseif(!$_POST['action']) {
|
||||||
print $header;
|
print $header;
|
||||||
print "$tccell1>You are not allowed to post in this thread.
|
print "$tccell1>You are not allowed to post in this thread.
|
||||||
@@ -151,10 +150,11 @@
|
|||||||
|
|
||||||
|
|
||||||
$error='';
|
$error='';
|
||||||
if($userid==-1)
|
|
||||||
|
if ($userid == -1) {
|
||||||
$error = "Either you didn't enter an existing username, or you haven't entered the right password for the username.";
|
$error = "Either you didn't enter an existing username, or you haven't entered the right password for the username.";
|
||||||
else{
|
} else {
|
||||||
$user=@$sql->fetchq("SELECT * FROM users WHERE id=$userid");
|
$user = @$sql->fetchq("SELECT * FROM users WHERE id='$userid'");
|
||||||
if ($thread['closed'])
|
if ($thread['closed'])
|
||||||
$error = 'The thread is closed and no more replies can be posted.';
|
$error = 'The thread is closed and no more replies can be posted.';
|
||||||
if ($user['powerlevel']<$forum['minpowerreply'])
|
if ($user['powerlevel']<$forum['minpowerreply'])
|
||||||
@@ -167,6 +167,7 @@
|
|||||||
|
|
||||||
$sign = $user['signature'];
|
$sign = $user['signature'];
|
||||||
$head = $user['postheader'];
|
$head = $user['postheader'];
|
||||||
|
// @TODO: Remove this code
|
||||||
if($user['postbg']) $head="<div style=background:url($user[postbg]);height=100%>$head";
|
if($user['postbg']) $head="<div style=background:url($user[postbg]);height=100%>$head";
|
||||||
|
|
||||||
$numposts = $user['posts']+ 1;
|
$numposts = $user['posts']+ 1;
|
||||||
@@ -180,11 +181,9 @@
|
|||||||
$currenttime = ctime();
|
$currenttime = ctime();
|
||||||
if (filter_string($_POST['submit'])) {
|
if (filter_string($_POST['submit'])) {
|
||||||
|
|
||||||
if (!(!$x_hacks['host'] && $userid == 715) || true) {
|
|
||||||
|
|
||||||
$sql->query("UPDATE `users` SET `posts` = $numposts, `lastposttime` = '$currenttime' WHERE `id` = '$userid'");
|
$sql->query("UPDATE `users` SET `posts` = $numposts, `lastposttime` = '$currenttime' WHERE `id` = '$userid'");
|
||||||
|
|
||||||
if ($nolayout) {
|
if (filter_bool($nolayout)) {
|
||||||
$headid = 0;
|
$headid = 0;
|
||||||
$signid = 0;
|
$signid = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -193,6 +192,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$close = "";
|
||||||
|
$stick = "";
|
||||||
if ($ismod) {
|
if ($ismod) {
|
||||||
if ($close) $close = "`closed` = '1',";
|
if ($close) $close = "`closed` = '1',";
|
||||||
else $close = "`closed` = '0',";
|
else $close = "`closed` = '0',";
|
||||||
@@ -203,7 +204,7 @@
|
|||||||
$sql->query("INSERT INTO posts (thread,user,date,ip,num,headid,signid,moodid) VALUES ($id,$userid,$currenttime,'$userip',$numposts,$headid,$signid,'". $_POST['moodid'] ."')");
|
$sql->query("INSERT INTO posts (thread,user,date,ip,num,headid,signid,moodid) VALUES ($id,$userid,$currenttime,'$userip',$numposts,$headid,$signid,'". $_POST['moodid'] ."')");
|
||||||
$pid=mysql_insert_id();
|
$pid=mysql_insert_id();
|
||||||
|
|
||||||
$options = intval($nosmilies) . "|" . intval($nohtml);
|
$options = filter_int($nosmilies) . "|" . filter_int($nohtml);
|
||||||
|
|
||||||
if($pid) $sql->query("INSERT INTO `posts_text` (`pid`,`text`,`tagval`, `options`) VALUES ('$pid','$message','$tagval', '$options')");
|
if($pid) $sql->query("INSERT INTO `posts_text` (`pid`,`text`,`tagval`, `options`) VALUES ('$pid','$message','$tagval', '$options')");
|
||||||
|
|
||||||
@@ -225,11 +226,7 @@
|
|||||||
return header("Location: thread.php?pid=$pid#$pid");
|
return header("Location: thread.php?pid=$pid#$pid");
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
print "
|
|
||||||
$tccell1>Reply posted successfully!
|
|
||||||
<br>".redirect("thread.php?id=$id", $thread['title'], 0) .$tblend;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
loadtlayout();
|
loadtlayout();
|
||||||
@@ -290,18 +287,20 @@
|
|||||||
</td></FORM>
|
</td></FORM>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
}else
|
} else {
|
||||||
print "$header$tccell1>Couldn't enter the post. $error<br>".redirect("thread.php?id=$id", $thread['title'], 0);
|
print "$header$tccell1>Couldn't enter the post. $error<br>".redirect("thread.php?id=$id", $thread['title'], 0);
|
||||||
}
|
}
|
||||||
if($thread['closed'])
|
}
|
||||||
|
|
||||||
|
if ($thread['closed']) {
|
||||||
print "
|
print "
|
||||||
$tccell1>Sorry, but this thread is closed, and no more replies can be posted in it.
|
$tccell1>Sorry, but this thread is closed, and no more replies can be posted in it.
|
||||||
<br>".redirect("thread.php?id=$id",$thread['title'],0);
|
<br>".redirect("thread.php?id=$id",$thread['title'],0);
|
||||||
if($banned and $log)
|
} elseif($banned and $log) {
|
||||||
print "
|
print "
|
||||||
$tccell1>Sorry, but you are banned from the board, and can not post.
|
$tccell1>Sorry, but you are banned from the board, and can not post.
|
||||||
<br>".redirect("thread.php?id=$id",$thread['title'],0);
|
<br>".redirect("thread.php?id=$id",$thread['title'],0);
|
||||||
|
}
|
||||||
print $footer;
|
print $footer;
|
||||||
printtimedif($startingtime);
|
printtimedif($startingtime);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user