<?php if (!defined('FLUX_ROOT')) exit; ?>
<div style="border:none; height:110px; width:180px; position:absolute; margin-left:68px; margin-top:15px;">
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:2px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][1]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][1]; ?></font></td>
  </tr>
</table>
</div>
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:0px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][2]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][2]; ?></font></td>
  </tr>
</table>
</div>
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:0px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][3]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][3]; ?></font></td>
  </tr>
</table>
</div>
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:2px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][4]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][4]; ?></font></td>
  </tr>
</table>
</div>
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:0px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][5]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][5]; ?></font></td>
  </tr>
</table>
</div>
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:1px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][6]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][6]; ?></font></td>
  </tr>
</table>
</div>
<div style="border:none; position:relative; float:left; width:100%; height:15px; padding-top:1px; margin-left:0px;">
<table border="0" cellpadding="3">
  <tr>
    <td align="center" width="70"><font class="gof"><?php echo $PlugandPlay['woe-day'][7]; ?></font></td>
	<td align="left" width="100"><font class="gof"><?php echo $PlugandPlay['woe-time'][7]; ?></font></td>
  </tr>
</table>
</div>



</div>





<!-- do not touch below codes -->
<?php
if (!defined('FLUX_ROOT')) exit;

	if($params->get('action') == 'login')
    {
        
        $castles = array();
    }  else {
	
$title = 'Castles';

$castleNames = Flux::config('CastleNames')->toArray();
$ids = implode(',', array_fill(0, count($castleNames), '?'));

$sql  = "SELECT castles.castle_id, castles.guild_id, guild.name AS guild_name, guild.emblem_len FROM {$server->charMapDatabase}.guild_castle AS castles ";
$sql .= "LEFT JOIN guild ON guild.guild_id = castles.guild_id ";
$sql .= "WHERE castles.castle_id IN ($ids)";
$sql .= "ORDER BY castles.castle_id ASC LIMIT 3";
$sth  = $server->connection->getStatement($sql);
$sth->execute(array_keys($castleNames));

$castles = $sth->fetchAll();
}
?>
<div style="border:none; position:absolute float:left; height:100px; width:35px; margin-left:19px; margin-top:20px">

<table width="100%" height="100%" border="0" cellpadding="3" align="center">
<?php  if ($castles): ?>
		<?php  foreach ($castles as $castle): ?>
  <tr>
    <td align="center"><img src="<?php  echo $this->emblem($castle->guild_id) ?>" title="<?php  echo htmlspecialchars($castleNames[$castle->castle_id]) ?><br /><?php echo htmlspecialchars($castle->guild_name) ?>" /></td>
  </tr>
	   <?php  endforeach ?>
<?php  endif ?>
</table>
</div>
