<?php
if ($char['nation'] == 0)
{
	$bgcolor = "#FF7777";
	$nation = "San d'Oria";
	$rank = $char['rank_sandoria'];
}
elseif ($char['nation'] == 1)
{
	$bgcolor = "#777BFF";
	$nation = "Bastok";
	$rank = $char['rank_bastok'];
}
elseif ($char['nation'] == 2)
{
	$bgcolor = "#FDFF77";
	$nation = "Windurst";
	$rank = $char['rank_windurst'];
}
else
{
	$rank = 'N/A';
}
if(getCharacterGM($char['accid'])>0){
	$online="gm";
}
elseif(isCharOnline($char['charid'])==true)
{
	$online="online";
}
else
{
	$online="offline";
}
$nameflag=$char['nameflags'];
echo'<table class="table table-hover"><tr><td rowspan="3">
<img src="theme/v1/images/chars/'.$char['race'].'/'.$char['face'].'.jpg" height="100" width="100" alt="Character Model" title="Character Model"></td><td><strong>'.$char['charname'].'</strong></td><td></td><td align=right>';
$cwstatus=getPlayerByVariable($char['charid'],'[CW]STATUS');
if($cwstatus==1){
echo '<img src="theme/v1/images/cw/cw.png" height="25" width="25" alt="CW" title="Crystal Warrior">';
}
if($cwstatus==2){
echo '<img src="theme/v1/images/cw/ucw.png" height="25" width="25" alt="UCW" title="Unbreakable Crystal Warrior">';
}
echo '<img src="theme/v1/images/'.$online.'.PNG" height="25" width="25" alt="'.$online.'" title="'.$online.'"></td></tr>
<tr style="background-color:'.$bgcolor.';"><td colspan="3"><img src="theme/'.$theme.'/images/'.$char['nation'].'.jpg" alt="'.$nation.'" title="'.$nation.'" width="20" height="20"> <strong>'.$nation.' '.$rank.' - '.ucwords(str_replace('_',' ',strtolower($real_title[$char['title']]))).'</strong></td></tr>
<tr><td colspan="2">'.$char['mlvl'].strtoupper($jobs[$char['mjob']]).(!empty($char['sjob']) ? '/'.$char['slvl'].strtoupper($jobs[$char['sjob']]) : '').'</td></tr></table>';
?>
