Quote more array keys

This commit is contained in:
Xkeeper 2018-01-24 21:36:18 -08:00
parent f7ea4c15f4
commit cd6ec44aba
2 changed files with 15 additions and 26 deletions

View File

@ -75,7 +75,7 @@
$inpc=\"nosmilies\" id=\"nosmilies\" value=\"1\" $chks[0]><label for=\"nosmilies\">Disable Smilies</label> -
$inpc=\"nohtml\" id=\"nohtml\" value=\"1\" $chks[1]><label for=\"nohtml\">Disable HTML</label></td></tr>
</FORM>
$tblend$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forum[id]>".$forum[title]."</a> - $thread[title]
$tblend$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forum[id]>".$forum['title']."</a> - $thread[title]
";
}
elseif (!$action) {

View File

@ -117,7 +117,7 @@
$inpc=\"nohtml\" id=\"nohtml\" value=\"1\"$nohtmlchk><label for=\"nohtml\">Disable HTML</label></td></tr><tr>
<!-- </FORM> -->
");
if(!$_POST[action] or $_POST[paction]) {
if(!$_POST['action'] or $_POST['paction']) {
print "
$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forumid>".$forum[title]."</a>
<form action=newthread.php name=replier method=post autocomplete=\"off\">
@ -163,7 +163,7 @@
$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forumid>".$forum[title]."</a>
".replytoolbar(4);
}
if($_POST[action]=='postthread' and !$_POST[paction]) {
if($_POST['action']=='postthread' and !$_POST['paction']) {
print "<br>$tblstart";
if ($log && !$password)
$userid = $loguserid;
@ -171,25 +171,14 @@
$userid = checkuser($username,$password);
$user=$sql->fetchq("SELECT * FROM users WHERE id=$userid");
if($user[powerlevel]<0) $userid=-1;
if($user['powerlevel']<0) $userid=-1;
// can't be posting too fast now
$limithit = $user[lastposttime] < (ctime()-30);
$limithit = $user['lastposttime'] < (ctime()-30);
// can they post in this forum?
$authorized = $user[powerlevel] >= $forum[minpowerthread];
$authorized = $user['powerlevel'] >= $forum['minpowerthread'];
// does the forum exist?
$forumexists = $forum[title];
// ---
// lol i'm eminem
if (strpos($message , '[Verse ') !== FALSE) {
$authorized = false;
@$sql->query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'Listen to some good music for a change.'");
if ($_COOKIE['loguserid'] > 0)
@$sql->query("UPDATE `users` SET `powerlevel` = '-2' WHERE `id` = {$_COOKIE['loguserid']}");
xk_ircsend("1|". xk(7) ."Auto-banned another Eminem wannabe with IP ". xk(8) . $_SERVER['REMOTE_ADDR'] . xk(7) .".");
}
// ---
$forumexists = $forum['title'];
if($userid!=-1 && $subject && $message && $forumexists && $authorized && $limithit) {
$msg=$message;
@ -203,8 +192,8 @@
$sign = "$sign</td></table>";
}
$numposts = $user[posts] + 1;
$numdays = (ctime()-$user[regdate])/86400;
$numposts = $user['posts'] + 1;
$numdays = (ctime()-$user['regdate'])/86400;
$tags = array();
$msg = doreplace($msg, $numposts, $numdays, $username, $tags);
$rsign = doreplace($sign, $numposts, $numdays, $username);