username; } $op = $_GET['p']; if($op < 1){$op = 1;} if($_GET['p'] > 0){$_GET['p'] = $_GET['p'] - 1;} $begin = $_GET['p'] * 20; $forum1 = mysql_query("SELECT * FROM `F_forums` WHERE `id`='".$_GET['id']."'"); $forum = mysql_fetch_object($forum1); if($forum->id < 1){ $_GET['id'] = 1; $forum1 = mysql_query("SELECT * FROM `F_forums` WHERE `id`='1'"); $forum = mysql_fetch_object($forum1); } $total = ceil($forum->totalthreads / 30); if($_GET['today'] == 1){$total = 0;$forum->name = "Pokemon Legion - Today's Posts (Last 30)";} else if($_POST['forum']){$total = 0;$forum->name = "Pokemon Legion - Forum Search";} else if($_GET['user'] != ""){$total = 0;$forum->name = "Pokemon Legion - Forum Search : ".$_POST['user'];} else { if($forum->id != 16){ if(check_power($user->adm,$forum->id,"p1") && check_power($user->adm,$forum->id,"p5")){$yes = 1;} if($yes != 1){ echo Message("You are not supposed to view this!"); include 'footer.php'; } } if($forum->id == 16){ #Clan Forums $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) { $clany = $clan->id; $preview = 1; $forum->name = $clan->name." Clan Forum"; $forum->description = "The official forums of your clan ".$clan->name; $forum->totalposts = $clan->totalposts; $forum->totalthreads = $clan->totalthreads; $forum->lastpostid = $clan->lastpostid; $forum->lastpostn = $clan->lastpostn; if($clan->lastposttime == ""){ $forum->lastposttime = 0; } else{ $forum->lastposttime = $clan->lastposttime; } $forum->lastpostu = $clan->lastpostu; } } } ?> Pokemon Legion Forums < name; ?>
name; ?>
Post Thread
'$time2' ORDER BY `lasttime` DESC LIMIT $begin,30")or die(mysql_error()); }elseif($_POST['forum']){ if($_POST['forum'] > 0){ $last1 = mysql_query("SELECT * FROM `F_threads` WHERE `topic` LIKE '%".$_POST['search']."%' AND `forumid` = '".$_POST['forum']."' AND `clan` = '$clany' ORDER BY stick ASC,lasttime DESC LIMIT 0,30")or die(mysql_error()); }else{ $last1 = mysql_query("SELECT * FROM `F_threads` WHERE `topic` LIKE '%".$_POST['search']."%' ORDER BY stick ASC,lasttime DESC LIMIT 0,30")or die(mysql_error()); } } else if($_GET['user'] != ""){ $last1 = mysql_query("SELECT * FROM `F_threads` WHERE `createname` = '".$_GET['user']."' AND `clan` = '0' ORDER BY stick ASC,lasttime DESC LIMIT $begin,20")or die(mysql_error()); } else{ $last1 = mysql_query("SELECT * FROM `F_threads` WHERE `forumid`='".$_GET['id']."' AND `clan` = '$clany' ORDER BY stick ASC,lasttime DESC LIMIT $begin,20")or die(mysql_error()); } while($last = mysql_fetch_object($last1)){ $user_stick=mysql_fetch_object(mysql_query("SELECT `my_sticky` from `F_users` WHERE `username`='$last->createname'")); if($last->stick != 2){ if($last->stat == 0){$Xyz = "!";} else { $Xyz = "X";} $image = "../img/icon/".$last->stickpic.".gif"; if($last->stickpic == "Giratina" || $last->stickpic == "Kyogre"){$second = "".$Xyz."";} else if($last->stickpic == "Rayquaza" ){$second = "".$Xyz."";} else{$second = "".$Xyz."";} $btop=1; }else{ if($btop == 0){$btop=0;$btops = " style='border-top:1px solid black;'";$btopz="border-top:1px solid black;";}else{$btops="";$btopz="";} $image = "../img/icon/Pikachu.gif";$second = " "; if($last->stat > 0){$image = "../img/icon/Electrode.gif";$second = "X";} } $pagez = ""; $end = ""; $total = 0; if($last->replies > 15){ $last->replies++; $total = ceil(($last->replies) / 15); if($total > 12){$total = 12;$end="... Last Page ";} for ($i=1; $i<=$total; $i++) { $pagez .= " ".$i." "; } $pagez .= $end; } $creater1 = mysql_query("SELECT gradient,effect FROM `users` WHERE `username` = '$last->createname'"); $creater = mysql_fetch_object($creater1); if($creater->gradient != ""){ $span = "gradient."\"style=\"background: url(../img/grad/".$creater->effect.".gif)\">"; $spend = ""; }else{ $span= "" ; $spend = ""; } ?>
>
topic); ?> 1){?>( )
name; ?>
Thread / Author Replies Views Last Post
> > >posts-1; ?> >views; ?> lasttime); ?>
Last Post: lastpostuname; ?>
Post Thread