Location: PHPKode > projects > H-tracker > forum.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//

define('IN_PORTAL', true);

require_once "backend/functions.php";
require "backend/TTBridge.php";
dbconn();
loggedinonly();
$site_config['LEFTNAV'] = false; //Left Column Enable/Disable
$site_config['RIGHTNAV'] = false; // Right Column Enable/Disable
$forumbanned = $CURUSER["forumbanned"];
if ($forumbanned == "yes") {
    stdhead("Banned");
    begin_frame("Notice", center);
    echo '<BR><b>Unfortunately, you have been banned from the Forum.To find the reason, contact a member of staff.</b><BR><BR>';
    end_frame();
    stdfoot();
    exit();  
}//end ban check 

if ($activate_phpbb2_forum==true)
{
	require_once "./".$phpbb2_folder."/config.php";
}
define("basefile", "./".$phpbb2_basefile."?"); 
define("relativebasefile", "../".$phpbb2_basefile."?");
// -------------- Page not included inside TT template -------------------
// Visual confirmation (display a security png in register page)
if ($page=="profile" && $mode=="confirm")
{
	include "./".$phpbb2_folder."/profile.php";
	exit;
}

// Topic review
if ($page=="posting" && $mode=="topicreview")
{
	include "./".$phpbb2_folder."/posting.php";
	exit;
}

// More smilies
if ($page=="posting" && $mode=="smilies")
{
	include "./".$phpbb2_folder."/posting.php";
	exit;
}

// Search username
if($page=="search" && $mode=="searchuser")
{
	include "./".$phpbb2_folder."/search.php";
	exit;
}

// New private message
if ($page=="privmsg" && $mode=="newpm")
{
	include "./".$phpbb2_folder."/privmsg.php";
	exit;
}

// Login to the admin panel
if ($page=="login" && $redirect == "admin/index.php")
{
	include "./".$phpbb2_folder."/login.php";
	exit;
}
 

// -------------- Page nested inside TT template -------------------
if ($activate_phpbb2_forum!=true){
stdhead("Warning");
if ($CURUSER["control_panel"]=="yes"){
		if(!file_exists("./".$phpbb2_folder."/config.php"))
		{  
	begin_frame("Notice", center);
			echo "<div align=center>Hello $CURUSER[username]<br><form method=\"post\" action=\"./".$phpbb2_folder."/install/install.php\">";
			echo "<input type=\"hidden\" name=\"dbhost\" value=\"".$mysql_host."\" />";
			echo "<input type=\"hidden\" name=\"dbname\" value=\"".$mysql_db."\" />";
			echo "<input type=\"hidden\" name=\"dbuser\" value=\"".$mysql_user."\" />";
			echo "<input type=\"hidden\" name=\"dbpasswd\" value=\"".$mysql_pass."\" />";
			echo "<input type=\"hidden\" name=\"admin_name\" value=\"".$CURUSER[username]."\" />";
			echo "<input type=\"hidden\" name=\"board_email\" value=\"".$CURUSER[email]."\" />";
			echo "<input type=\"submit\" value=\"phpBB not installed: INSTALL NOW!\">";
			echo "</form></div>";
	end_frame();
		}
	if(file_exists("./".$phpbb2_folder."/config.php"))
		{
	begin_frame("<div class='shoutbox_error'>Warning<div>", center);
                  echo "<div align=center><b>The Forum is disabled</b>";
                  echo "<br>Open your <b><i>config.php</i></b> from <b>backend</b> folder";
                  echo "<br><b>Find this line:</b>";
                  echo "<br><div class='shoutbox_error'><b>&#36;activate_phpbb2_forum = false;</b></div>";
                  echo "<br><b>Replace with this:</b>";
                  echo "<br><div class='error'><b>&#36;activate_phpbb2_forum = true;</b></div>";
     if(file_exists("./".$phpbb2_folder."/install/install.php")) {
                  echo "<br><br><b>Delete also:</b>";
                  echo "<br><div class='error'><b>install & contrib</div> sub-folders from <div class='success'>forum</div> folder</b>";
     }  
                  echo "<br><br><br><b>phpBB forum integrated by <a href=http://h-tracker.org>hack346</a>&nbsp;&reg;</b>";
			echo "</div>";
	end_frame();
		}
}else{
show_error_msg("Error", "Hello $CURUSER[username]<br>The Forum is closed");
    }
	
	stdfoot();
	exit();
}  
switch ($page)
{
	case "faq":
	include "./".$phpbb2_folder."/faq.php";
	break;

	
	case "modcp":
	include "./".$phpbb2_folder."/modcp.php";
	break;


	case "viewforum":
	include "./".$phpbb2_folder."/viewforum.php";
	break;

	
	case "viewonline":
	include "./".$phpbb2_folder."/viewonline.php";
	break;


	case "viewtopic":
	include "./".$phpbb2_folder."/viewtopic.php";
	break;
	
	
	case "search":
	include "./".$phpbb2_folder."/search.php";
	break;

	
	case "privmsg":
	include "./".$phpbb2_folder."/privmsg.php";
	break;
	
	
	case "posting":
	include "./".$phpbb2_folder."/posting.php";
	break;


	case "profile":
	if ($mode=="register" && $share_phpbb2_users_with_TT==true)
	{
		header('Location: account-signup.php');
		break;
	}
	if ($mode=="sendpassword" && $share_phpbb2_users_with_TT==true)
	{
		header('Location: account-recover.php');
		break;
	}
	include "./".$phpbb2_folder."/profile.php";
	break;
	
	
	case "memberlist":
	include "./".$phpbb2_folder."/memberlist.php";
	break;
	

	case "groupcp":
	include "./".$phpbb2_folder."/groupcp.php";
	break;

	
	case "login":
	if ($share_phpbb2_users_with_TT==true)
	{
		if ($logout==true)
		{
			header('Location: account-logout.php');
		}
		else
		{
			header('Location: account-login.php');
		}
	}
	else
	{
		include "./".$phpbb2_folder."/login.php";
	}
	break;

	
	default:
	include "./".$phpbb2_folder."/index.php";
	break;
}
stdfoot(); 
?>
Return current item: H-tracker