mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 08:40:21 -07:00
Cleaning up dead code
This commit is contained in:
parent
6ec2907a62
commit
85625b90ca
22
newreply.php
22
newreply.php
@ -53,7 +53,6 @@
|
|||||||
$header = "$header
|
$header = "$header
|
||||||
$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forumid>$forum[title]</a> - $thread[title]<form action=newreply.php name=replier method=post autocomplete=\"off\"> $tblstart";
|
$fonttag<a href=index.php>$boardname</a> - <a href=forum.php?id=$forumid>$forum[title]</a> - $thread[title]<form action=newreply.php name=replier method=post autocomplete=\"off\"> $tblstart";
|
||||||
|
|
||||||
if($log) activitycheck($loguserid);
|
|
||||||
// Post preview
|
// Post preview
|
||||||
if (($power>=$forum['minpowerreply'] || $forum['minpowerreply']<1) && $id>0) {
|
if (($power>=$forum['minpowerreply'] || $forum['minpowerreply']<1) && $id>0) {
|
||||||
$postlist="<tr>$tccellh colspan=2 style=\"font-weight:bold;\">Thread history</tr><tr>$tccellh width=150>User</td>$tccellh width=*>Post</tr>";
|
$postlist="<tr>$tccellh colspan=2 style=\"font-weight:bold;\">Thread history</tr><tr>$tccellh width=150>User</td>$tccellh width=*>Post</tr>";
|
||||||
@ -150,22 +149,12 @@
|
|||||||
else
|
else
|
||||||
$userid = checkuser($username,$password);
|
$userid = checkuser($username,$password);
|
||||||
|
|
||||||
/*
|
|
||||||
if (stripos($message, "i hate metal man!!") !== false) {
|
|
||||||
xk_ircsend("1|". xk(4) ."NO BONUS!". xk() ." Seems that ". xk(11) ."'$username'". xk() ." is another rereg, so I've banned his account (". xk(11) ."$userid". xk() .") and IP (". xk(11) ."$userip". xk() .").");
|
|
||||||
$sql -> query("UPDATE `users` SET `power` = '-1', `title` = 'Get out.' WHERE `id` = '$userid'");
|
|
||||||
$sql -> query("INSERT INTO `ipbans` SET `ip` = '". $_SERVER['REMOTE_ADDR'] ."', `date` = '". ctime() ."', `reason` = 'NO BONUS'");
|
|
||||||
die("Winners don't do drugs!");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
$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['lastposter']==$userid && $user['powerlevel']<=2)
|
|
||||||
// $error='You already have the last reply in this thread.';
|
|
||||||
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'])
|
||||||
@ -175,7 +164,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
activitycheck($userid);
|
|
||||||
|
|
||||||
$sign =$user['signature'];
|
$sign =$user['signature'];
|
||||||
$head =$user['postheader'];
|
$head =$user['postheader'];
|
||||||
@ -342,13 +330,3 @@
|
|||||||
print $footer;
|
print $footer;
|
||||||
printtimedif($startingtime);
|
printtimedif($startingtime);
|
||||||
|
|
||||||
function activitycheck($userid){
|
|
||||||
global $id,$thread,$header,$tblstart,$tccell1,$tblend,$footer,$loguser,$sql;
|
|
||||||
$activity=$sql->resultq("SELECT count(*) FROM posts WHERE user=$userid AND thread=$id AND date>".(ctime()-86400),0,0);
|
|
||||||
// if($activity>=(stristr($thread['title'],'ACS ')?5:5000))
|
|
||||||
// die("$tblstart$tccell1>You have posted enough in this thread today. Come back later!$tblend$footer");
|
|
||||||
$activity=$sql->resultq("SELECT count(*) FROM posts WHERE user=$userid AND date>".(ctime()-300),0,0);
|
|
||||||
if($activity && $userid == 1079)
|
|
||||||
die("$header$tblstart$tccell1>You can only post once every five minutes! Make it count!$tblend$footer");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user