include 'header.php';
$op = $_GET['p'];
$_GET['p'] = abs((int) $_GET['p']);
if($_GET['p'] > 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 < echo $forum->name; ?> < echo stripslashes($thread->subject); ?>
echo stripslashes($thread->topic); ?>
echo stripslashes($thread->topic); ?>
|
echo date(F." ".d.", ".Y." ".g.":".i.":".sa,$thread->time); ?> lastedittime > 0){?> (This post was last modified: echo date(F." ".d.", ".Y." ".g.":".i.":".sa,$thread->lastedittime); ?> by echo $thread->lasteditby; ?>.)}?>
echo $post->rank; ?> rank2 > 0){ echo $post->rank2;}?> Post: # $g++; echo $g; ?>
![]() |
||
|
||
echo stripslashes($thread->subject); ?>
if($thread->html == 1){
?>
if($post->sig != "" || $g == 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 } else{ include_once 'bbcode.php'; echo bb($thread->msgtext); } ?>
#here we can add that ad thingy
if($g == 0){
?>
}
?>
sig); ?>
|
||