<?php

$chars = getCharacterList($users['id']);

if ($chars == 'error')
{
echo getPanel("warning","Warning","Could not get Characters.");
}
elseif ($chars == 'empty')
{
echo getPanel("warning","Warning","You have no Characters.");
}
else
{
 foreach($chars as $char) {
	 
  echo '
        <div class="row"><table class="table table-hover"><tr class="table-success"><td colspan=2><center><strong><a href="?p=characters&id='.$char['charid'].'"><h5 class="card-title">'.$char['charname'].'</h5></strong></center></td></tr>';
$vars=getPlayerVariable($char['charid']);
if($vars!='empty'){
	foreach($vars as $var){
		if(str_starts_with($var['varname'],'[CW]')){
		echo '<tr><td>'.$var['varname'].'</td><td>'.$var['value'].'</td></tr>';
		}
	}
}
echo '</table>'; 
                        echo '</div>
        </div>
        ';
 }
};


?>



</div>


<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8 col-xl-8 col-xxl-8">
 <div class="container p-3" >
 </div>
</div>
</div>
