<?php
if(isset($_GET['id']) && $charname!='empty'){
	$charid=$_GET['id'];
	$char = getCharacter($charid);
	$char = $char[0];
	$main=0;
	$sub=1;
	$ranged=2;
	$ammo=3;
	$head=4;
	$body=5;
	$hands=6;
	$legs=7;
	$feet=8;
	$neck=9;
	$waist=10;
	$ear1=11;
	$ear2=12;
	$ring1=13;
	$ring2=14;
	$back=15;
	$chars = getCharacterList($users['id']);
	if ($chars != 'empty' && getCharacterGM($users['id']) >= 2){
		echo '<div class="table-responsive"><table class="table table-sm"><tr class="table-info">
		<td><a data-bs-toggle="collapse" href="#collapseGM">Account Info</a></td>
		<td><a data-bs-toggle="collapse" href="#collapseVars">Player Vars</a></td>
		<td><a data-bs-toggle="collapse" href="#collapseKI">Player Key Items</a></td>
		<td><a data-bs-toggle="collapse" href="#collapseQuests">Player Quests</a></td>
		<td><a data-bs-toggle="collapse" href="#collapseInventory">Player Inventory</a></td>
		<td><a data-bs-toggle="collapse" href="#collapsePoints">Player Points</a></td>
		</tr></table></div>';
		
		
		echo '<div class="collapse" id="collapseGM">';
		require_once("gm.php");
		echo '</div>';
		echo '<div class="collapse" id="collapseVars">';
		require_once("vars.php");
		echo '</div>';
		echo '<div class="collapse" id="collapseKI">';
		require_once("ki.php");
		echo '</div>';
		echo '<div class="collapse" id="collapseQuests">';
		require_once("quests.php");
		echo '</div>';
		echo '<div class="collapse" id="collapseInventory">';
		require_once("inventory.php");
		echo '</div>';
		echo '<div class="collapse" id="collapsePoints">';
		require_once("points.php");
		echo '</div>';
	}
	require_once("profile.php");
	require_once("stats.php");
	require_once("missions.php");
	require_once("crafts.php");
	echo'<td>';
	require_once("equip.php");
	require_once("fame.php");
	echo '</tr><tr><td width=75%><table class="table table-hover">
<tr class="table-success"><td><strong>Jobs</strong></td></tr>';
	require_once("jobs.php");
	echo '</td></tr>';
	require_once("auction.php");
	require_once("bazaar.php");
	echo '</table></div>';
}
else
{
	require_once("home.php");	
}
?>