0){$_GET['p'] = $_GET['p'] - 1;} $begin = $_GET['p'] * 15; $viewthread = 1; $clany = 0;$f1 = 0;$f2 = 0;$f3 = 0; $id = (int)(abs($_GET['id'])); $val1 = mysql_query("SELECT * FROM `F_threads` WHERE `id` = '$id'"); $thread = mysql_fetch_object($val1); if($thread->id < 1){ echo Message("This thread does not exist.

[Forums]"); include 'footer.php'; die(); } if($thread->clan != 0){ #Clan Forums if($thread->clan != $user->clan){ echo Message("This thread does not exist.

[Forums]"); include 'footer.php'; die(); } $clanx = mysql_query("SELECT * FROM `clans` WHERE `id` = '$user->clan'"); $clan = mysql_fetch_object($clanx); $clanpowerx = mysql_query("SELECT * FROM `clanrank` WHERE `rank` = '$user->clanrank' AND `clanid` = '$user->clan'"); $clanpower = mysql_fetch_object($clanpowerx); if($clan->id > 0){ if($clan->forum == 0){ echo Message("Your clan doesn't have a forums!"); include 'footer.php'; die(); } $f1 = $clanpower->f1; $f2 = $clanpower->f2; $f3 = $clanpower->f3; $clany = $clan->id; if($clan->leader == $user->username){ $f1 =1; $f2 =1; $f3 = 1; } } else{ echo Message("You are not in any clan!"); include 'footer.php'; die(); } } $threadlock = $thread->stat; $tid = $thread->id; $powers1 = mysql_query("SELECT * FROM `F_perm` WHERE `fid` = '$thread->forumid' AND `gid` = '$user->adm'"); $power = mysql_fetch_object($powers1); //if($thread->forumid < 4){$threadlock = 2;} if($thread->forumid == 2 && $thread->views < 150){ $rand = rand(1,12); mysql_query("UPDATE `F_threads` SET `views` = `views` WHERE `id` = '".$thread->id."'"); } if($thread->forumid == 3 && $thread->views < 150) { mysql_query("UPDATE `F_threads` SET `views` = `views` + 1 WHERE `id` = '".$thread->id."'"); } else{ mysql_query("UPDATE `F_threads` SET `views` = `views` + 1 WHERE `id` = '".$thread->id."'"); } $forum1 = mysql_query("SELECT * FROM `F_forums` WHERE `id`='".$thread->forumid."'"); $forum = mysql_fetch_object($forum1); //start total $count = mysql_query("SELECT id FROM `F_posts` WHERE `tid` = '$thread->id' AND `delete`='0'"); $total2 = mysql_num_rows($count); $total2++; $total = ceil(($total2) / 15); if($total < 1){$total = 1;} if($_GET['last'] == 1){$op = $total;$begin = ($op - 1) * 15;} //end total if($begin < 1 && $thread->uname == $user->username || $power->m1 == 1){ $edit = 1; } if(($power->m1 > 0 || $f1 == 1 || $f2 == 1) && $_GET['lock'] == 'l'){ mysql_query("UPDATE `F_threads` SET `stat` = '$user->id' WHERE `id` = '".$thread->id."'"); echo Message("Thread locked successfully.

[".$forum->name."]"); $threadlock = $user->id; } if(($power->m1 > 0 || $f1 == 1 || $f2 == 1) && $_GET['unlock'] == 'l'){ mysql_query("UPDATE `F_threads` SET `stat` = '0' WHERE `id` = '".$thread->id."'"); echo Message("Thread unlocked successfully.

[".$forum->name."]"); $threadlock = 0; } if(($power->m5 > 0 || $f1 == 1) && $_GET['sticky'] == 'l'){ if($user->adm == 1 && $user->id == 1){$picz = "Rayquaza";} if($user->adm == 1 && $user->id == 3){$picz = "Groudon";} if($user->adm == 1 && $user->id == 2){$picz = "Kyogre";} if($user->adm == 1 && $user->id > 3){$picz = "Rayquaza";} else if($user->adm == 3){$picz = "Groudon";} else if($user->adm == 2){$picz = "Kyogre";} else { $picz = "Lugia";} mysql_query("UPDATE `F_threads` SET `stick` = '1' ,`stickpic` = '".$picz."' WHERE `id` = '".$thread->id."'"); echo Message("Thread stickied successfully.

[".$forum->name."]"); $threadlock = 0; } if(($power->m5 > 0 || $f1 == 1) && $_GET['unsticky'] == 'l'){ mysql_query("UPDATE `F_threads` SET `stick` = '2' WHERE `id` = '".$thread->id."'"); echo Message("Thread unstickied successfully.

[".$forum->name."]"); $threadlock = 0; } ?> Pokemon Legion Forums < name; ?> < subject); ?>
topic); ?>
m5 ||$f1 == 1 ) > 0 && $thread->stick == 2){?>[Sticky Thread] |--| m5 ||$f1 == 1 ) > 0 && $thread->stick == 1){?>[Unsticky Thread] |--| m1 ||$f1 == 1 || $f2 == 1) > 0){?>[Lock Thread] Post Reply m1 ||$f1 == 1 || $f2 == 1) > 0){?>[Unlock Thread] Thread Locked
topic); ?>
uname."'"); $post = mysql_fetch_object($post1); $post12 = mysql_query("SELECT * FROM `F_users` WHERE `username`='".$thread->uname."'"); $post2 = mysql_fetch_object($post12); $post->totalthreads = $post2->totalthreads; $post->totalpost = $post2->totalpost; $post->lastthread= $post2->lastthread; $post->lastpost= $post2->lastpost; $post->lastip= $post2->lastip; $post->lastpostip= $post2->lastpostip; $post->sig= $post2->sig; $post->rep= $post2->rep; $post->forumban= $post2->forumban; if($post->rep > 0){$what="positive";} if($post->rep == 0){$what="neutral";} if($post->rep < 0){$what="negative";} $timef = time(); if($post->forumban == -1 ||$post->forumban > $timef ){$post->rank = "1000";} ?>
time); ?> lastedittime > 0){?> (This post was last modified: lastedittime); ?> by lasteditby; ?>.)
rank; ?>  rank2 > 0){ echo $post->rank2;}?>  Post: # 
[-]
adm'"); $bar1 = mysql_fetch_object($bar12); if($post->ubar2 != ""){ $bar22 = mysql_query("SELECT * FROM `userbar2` WHERE `pic` = '$post->ubar2'"); $bar2 = mysql_fetch_object($bar22); } ?>
subject); ?>
html == 1){ ?>
Warning: Undefined variable $thread in /home/u445312533/domains/pokemonevolved.com/public_html/forums/viewthread.php on line 304

Warning: Attempt to read property "msgtext" on null in /home/u445312533/domains/pokemonevolved.com/public_html/forums/viewthread.php on line 304
msgtext); } ?>
sig != "" || $g == 1){ ?>
sig); ?>
username == $thread->uname)||($power->m1 > 0 )||($f1 == 1 || $f2 ==1)){ ?> Edit this post m2 > 0)||($user->username == $thread->uname)||($f1 == 1 || $f2 == 1)){?> Delete this post Quote this message in a reply

[-]
Quick Reply
Message
Type your reply to this message here.

Post Reply Thread Locked