change spaces to tabs

This commit is contained in:
slawkens 2023-02-16 08:43:21 +01:00
parent d04e44f52f
commit 58598742e8
3 changed files with 326 additions and 326 deletions

View File

@ -14,17 +14,17 @@ $title = 'Houses';
$errors = array();
if(!$db->hasColumn('houses', 'name')) {
$errors[] = 'Houses list is not available on this server.';
$errors[] = 'Houses list is not available on this server.';
$twig->display('houses.html.twig', array(
'errors' => $errors
));
$twig->display('houses.html.twig', array(
'errors' => $errors
));
return;
}
$rentType = trim(strtolower($config['lua']['houseRentPeriod']));
if($rentType != 'yearly' && $rentType != 'monthly' && $rentType != 'weekly' && $rentType != 'daily')
$rentType = 'never';
$rentType = 'never';
$state = '';
$order = '';
@ -32,116 +32,116 @@ $type = '';
if(isset($_GET['page']) && $_GET['page'] == 'view' && isset($_REQUEST['house']))
{
$beds = array("", "one", "two", "three", "fourth", "fifth");
$houseName = $_REQUEST['house'];
$houseId = (Validator::number($_REQUEST['house']) ? $_REQUEST['house'] : -1);
$selectHouse = $db->query('SELECT * FROM ' . $db->tableName('houses') . ' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($houseName) . ' OR `id` = ' . $db->quote($houseId));
$beds = array("", "one", "two", "three", "fourth", "fifth");
$houseName = $_REQUEST['house'];
$houseId = (Validator::number($_REQUEST['house']) ? $_REQUEST['house'] : -1);
$selectHouse = $db->query('SELECT * FROM ' . $db->tableName('houses') . ' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($houseName) . ' OR `id` = ' . $db->quote($houseId));
$house = array();
if($selectHouse->rowCount() > 0)
{
$house = $selectHouse->fetch();
$houseId = $house['id'];
$house = array();
if($selectHouse->rowCount() > 0)
{
$house = $selectHouse->fetch();
$houseId = $house['id'];
$title = $house['name'] . ' - ' . $title;
$title = $house['name'] . ' - ' . $title;
$imgPath = 'images/houses/' . $houseId . '.gif';
if(!file_exists($imgPath)) {
$imgPath = 'images/houses/default.jpg';
}
$imgPath = 'images/houses/' . $houseId . '.gif';
if(!file_exists($imgPath)) {
$imgPath = 'images/houses/default.jpg';
}
$bedsMessage = null;
$houseBeds = $house['beds'];
if($houseBeds > 0)
$bedsMessage = 'House have ' . (isset($beds[$houseBeds]) ? $beds[$houseBeds] : $houseBeds) . ' bed' . ($houseBeds > 1 ? 's' : '');
else
$bedsMessage = 'This house dont have any beds';
$bedsMessage = null;
$houseBeds = $house['beds'];
if($houseBeds > 0)
$bedsMessage = 'House have ' . (isset($beds[$houseBeds]) ? $beds[$houseBeds] : $houseBeds) . ' bed' . ($houseBeds > 1 ? 's' : '');
else
$bedsMessage = 'This house dont have any beds';
$houseOwner = $house['owner'];
if($houseOwner > 0)
{
$guild = NULL;
$owner = null;
if(isset($house['guild']) && $house['guild'] == 1)
{
$guild = new OTS_Guild();
$guild->load($houseOwner);
$owner = getGuildLink($guild->getName());
}
else
$owner = getCreatureName($houseOwner);
$houseOwner = $house['owner'];
if($houseOwner > 0)
{
$guild = NULL;
$owner = null;
if(isset($house['guild']) && $house['guild'] == 1)
{
$guild = new OTS_Guild();
$guild->load($houseOwner);
$owner = getGuildLink($guild->getName());
}
else
$owner = getCreatureName($houseOwner);
if($rentType != 'never' && $house['paid'] > 0)
{
$who = '';
if($guild)
$who = $guild->getName();
else
{
$player = new OTS_Player();
$player->load($houseOwner);
if($player->isLoaded())
{
$sexs = array('She', 'He');
$who = $sexs[$player->getSex()];
}
}
$owner .= ' ' . $who . ' has paid the rent until ' . date("M d Y, H:i:s", $house['paid']) . ' CEST.';
}
}
}
else
$errors[] = 'House with name ' . $houseName . ' does not exists.';
if($rentType != 'never' && $house['paid'] > 0)
{
$who = '';
if($guild)
$who = $guild->getName();
else
{
$player = new OTS_Player();
$player->load($houseOwner);
if($player->isLoaded())
{
$sexs = array('She', 'He');
$who = $sexs[$player->getSex()];
}
}
$owner .= ' ' . $who . ' has paid the rent until ' . date("M d Y, H:i:s", $house['paid']) . ' CEST.';
}
}
}
else
$errors[] = 'House with name ' . $houseName . ' does not exists.';
$twig->display('houses.view.html.twig', array(
'errors' => $errors,
'imgPath' => isset($imgPath) ? $imgPath : null,
'houseName' => isset($house['name']) ? $house['name'] : null,
'bedsMessage' => isset($bedsMessage) ? $bedsMessage : null,
'houseSize' => isset($house['size']) ? $house['size'] : null,
'houseRent' => isset($house['rent']) ? $house['rent'] : null,
'owner' => isset($owner) ? $owner : null,
'rentType' => isset($rentType) ? $rentType : null
));
$twig->display('houses.view.html.twig', array(
'errors' => $errors,
'imgPath' => isset($imgPath) ? $imgPath : null,
'houseName' => isset($house['name']) ? $house['name'] : null,
'bedsMessage' => isset($bedsMessage) ? $bedsMessage : null,
'houseSize' => isset($house['size']) ? $house['size'] : null,
'houseRent' => isset($house['rent']) ? $house['rent'] : null,
'owner' => isset($owner) ? $owner : null,
'rentType' => isset($rentType) ? $rentType : null
));
if (count($errors) > 0) {
return;
}
if (count($errors) > 0) {
return;
}
}
$cleanOldHouse = null;
if(isset($config['lua']['houseCleanOld'])) {
$cleanOldHouse = (int)(eval('return ' . $config['lua']['houseCleanOld'] . ';') / (24 * 60 * 60));
$cleanOldHouse = (int)(eval('return ' . $config['lua']['houseCleanOld'] . ';') / (24 * 60 * 60));
}
$housesSearch = false;
if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) && (isset($_POST['type']) || !$db->hasColumn('houses', 'guild')))
{
$townName = $config['towns'][$_POST['town']];
$order = $_POST['order'];
$orderby = '`name`';
if(!empty($order))
{
if($order == 'size')
$orderby = '`size`';
else if($order == 'rent')
$orderby = '`rent`';
}
$townName = $config['towns'][$_POST['town']];
$order = $_POST['order'];
$orderby = '`name`';
if(!empty($order))
{
if($order == 'size')
$orderby = '`size`';
else if($order == 'rent')
$orderby = '`rent`';
}
$town = 'town';
if($db->hasColumn('houses', 'town_id'))
$town = 'town_id';
else if($db->hasColumn('houses', 'townid'))
$town = 'townid';
$town = 'town';
if($db->hasColumn('houses', 'town_id'))
$town = 'town_id';
else if($db->hasColumn('houses', 'townid'))
$town = 'townid';
$whereby = '`' . $town . '` = ' .(int)$_POST['town'];
$state = $_POST['state'];
if(!empty($state))
$whereby .= ' AND `owner` ' . ($state == 'free' ? '' : '!'). '= 0';
$whereby = '`' . $town . '` = ' .(int)$_POST['town'];
$state = $_POST['state'];
if(!empty($state))
$whereby .= ' AND `owner` ' . ($state == 'free' ? '' : '!'). '= 0';
$type = isset($_POST['type']) ? $_POST['type'] : NULL;
if($type == 'guildhalls' && !$db->hasColumn('houses', 'guild'))
$type = 'all';
$type = isset($_POST['type']) ? $_POST['type'] : NULL;
if($type == 'guildhalls' && !$db->hasColumn('houses', 'guild'))
$type = 'all';
if (!empty($type) && $type != 'all')
{
@ -158,49 +158,49 @@ if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) &&
}
}
$houses_info = $db->query('SELECT * FROM `houses` WHERE ' . $whereby. ' ORDER BY ' . $orderby);
$houses_info = $db->query('SELECT * FROM `houses` WHERE ' . $whereby. ' ORDER BY ' . $orderby);
$players_info = $db->query("SELECT `houses`.`id` AS `houseid` , `players`.`name` AS `ownername` FROM `houses` , `players` , `accounts` WHERE `players`.`id` = `houses`.`owner` AND `accounts`.`id` = `players`.`account_id`");
$players = array();
foreach($players_info->fetchAll() as $player)
$players[$player['houseid']] = array('name' => $player['ownername']);
$players_info = $db->query("SELECT `houses`.`id` AS `houseid` , `players`.`name` AS `ownername` FROM `houses` , `players` , `accounts` WHERE `players`.`id` = `houses`.`owner` AND `accounts`.`id` = `players`.`account_id`");
$players = array();
foreach($players_info->fetchAll() as $player)
$players[$player['houseid']] = array('name' => $player['ownername']);
$houses = array();
foreach($houses_info->fetchAll() as $house)
{
$owner = isset($players[$house['id']]) ? $players[$house['id']] : array();
$houses = array();
foreach($houses_info->fetchAll() as $house)
{
$owner = isset($players[$house['id']]) ? $players[$house['id']] : array();
$houseRent = null;
if($db->hasColumn('houses', 'guild') && $house['guild'] == 1 && $house['owner'] != 0)
{
$guild = new OTS_Guild();
$guild->load($house['owner']);
$houseRent = 'Rented by ' . getGuildLink($guild->getName());
}
else
{
if(!empty($owner['name']))
$houseRent = 'Rented by ' . getPlayerLink($owner['name']);
else
$houseRent = 'Free';
}
$houseRent = null;
if($db->hasColumn('houses', 'guild') && $house['guild'] == 1 && $house['owner'] != 0)
{
$guild = new OTS_Guild();
$guild->load($house['owner']);
$houseRent = 'Rented by ' . getGuildLink($guild->getName());
}
else
{
if(!empty($owner['name']))
$houseRent = 'Rented by ' . getPlayerLink($owner['name']);
else
$houseRent = 'Free';
}
$houses[] = array('owner' => $owner, 'name' => $house['name'], 'size' => $house['size'], 'rent' => $house['rent'], 'rentedBy' => $houseRent);
}
$houses[] = array('owner' => $owner, 'name' => $house['name'], 'size' => $house['size'], 'rent' => $house['rent'], 'rentedBy' => $houseRent);
}
$housesSearch = true;
$housesSearch = true;
}
$guild = $db->hasColumn('houses', 'guild') ? ' or guildhall' : '';
$twig->display('houses.html.twig', array(
'state' => $state,
'order' => $order,
'type' => $type,
'houseType' => $type == 'guildhalls' ? 'Guildhalls' : 'Houses and Flats',
'townName' => isset($townName) ? $townName : null,
'townId' => isset($_POST['town']) ? $_POST['town'] : null,
'guild' => $guild,
'cleanOldHouse' => isset($cleanOld) ? $cleanOld : null,
'housesSearch' => $housesSearch,
'houses' => isset($houses) ? $houses : null
));
'state' => $state,
'order' => $order,
'type' => $type,
'houseType' => $type == 'guildhalls' ? 'Guildhalls' : 'Houses and Flats',
'townName' => isset($townName) ? $townName : null,
'townId' => isset($_POST['town']) ? $_POST['town'] : null,
'guild' => $guild,
'cleanOldHouse' => isset($cleanOld) ? $cleanOld : null,
'housesSearch' => $housesSearch,
'houses' => isset($houses) ? $houses : null
));

View File

@ -1,171 +1,171 @@
<div class="TableContainer">
{% if errors is not empty %}
{% for error in errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% else %}
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >House Search</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
{% if errors is not empty %}
{% for error in errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% else %}
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >House Search</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
Here you can see the list of all available houses, flats{{ guildString }}.
Click on any view button to get more information about a house or adjust
the search criteria and start a new search.
<br><br>
{% if cleanOldHouse is not empty or rentType != 'never' %}
Every morning during global server save there is automatic house cleaning. Server delete house owners who have not logged in last {{ cleanOldHouse }} days{% if rentType != 'never' %} or have not paid {{ rentType }} house rent. Remember to leave money for a rent in {% if config.lua.bankSystem is not empty %}your house bank or {% else %}depo in same city where you have house!{% endif %}{% else %}.{% endif %}
<br><br>
{% endif %}
<tr>
<td>
<div class="InnerTableContainer">
Here you can see the list of all available houses, flats{{ guildString }}.
Click on any view button to get more information about a house or adjust
the search criteria and start a new search.
<br><br>
{% if cleanOldHouse is not empty or rentType != 'never' %}
Every morning during global server save there is automatic house cleaning. Server delete house owners who have not logged in last {{ cleanOldHouse }} days{% if rentType != 'never' %} or have not paid {{ rentType }} house rent. Remember to leave money for a rent in {% if config.lua.bankSystem is not empty %}your house bank or {% else %}depo in same city where you have house!{% endif %}{% else %}.{% endif %}
<br><br>
{% endif %}
{% if houses is not empty or housesSearch %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tbody>
<tr bgcolor="{{ config.vdarkborder }}">
<td colspan="6" class="white"><b>Available {{ houseType }}{% if townName is not empty %} in {{ townName }}{% endif %} on <b>{{ config.lua.serverName }}</b></b></td>
</tr>
{% if houses is not empty or housesSearch %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tbody>
<tr bgcolor="{{ config.vdarkborder }}">
<td colspan="6" class="white"><b>Available {{ houseType }}{% if townName is not empty %} in {{ townName }}{% endif %} on <b>{{ config.lua.serverName }}</b></b></td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
{% if houses is not empty %}
<td width="40%"><b>Name</b></td>
<td width="10%"><b>Size</b></td>
<td width="10%"><b>Rent</b></td>
<tr bgcolor="{{ config.darkborder }}">
{% if houses is not empty %}
<td width="40%"><b>Name</b></td>
<td width="10%"><b>Size</b></td>
<td width="10%"><b>Rent</b></td>
<td width="40%"><b>Status</b></td>
<td>&nbsp;</td>
{% elseif housesSearch %}
<td>No {{ houseType }} with specified criterias.</td>
{% endif %}
</tr>
<td width="40%"><b>Status</b></td>
<td>&nbsp;</td>
{% elseif housesSearch %}
<td>No {{ houseType }} with specified criterias.</td>
{% endif %}
</tr>
{% if houses is not empty %}
{% set i = 0 %}
{% for house in houses %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
<td width="40%">
{{ house.name }}
</td>
{% if houses is not empty %}
{% set i = 0 %}
{% for house in houses %}
{% set i = i + 1 %}
<tr bgcolor="{{ getStyle(i) }}">
<td width="40%">
{{ house.name }}
</td>
<td width="10%">
{{ house.size }}
</td>
<td width="10%">
{{ house.size }}
</td>
<td width="10%">
{{ house.rent }} golds
</td>
<td width="10%">
{{ house.rent }} golds
</td>
<td width="40%">
{{ house.rentedBy|raw }}
</td>
<td width="40%">
{{ house.rentedBy|raw }}
</td>
<td>
<form action="{{ getLink('houses/view') }}" method="post">
<input type="hidden" name="house" value="{{ house.name }}">
{{ include('buttons.view.html.twig') }}
</form>
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
<br>
{% endif %}
<td>
<form action="{{ getLink('houses/view') }}" method="post">
<input type="hidden" name="house" value="{{ house.name }}">
{{ include('buttons.view.html.twig') }}
</form>
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
<br>
{% endif %}
<form action="{{ getLink('houses') }}" method="post">
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tbody>
<tr bgcolor="{{ config.vdarkborder }}">
<td colspan="4" class="white"><b>House Search</b></td>
</tr>
<form action="{{ getLink('houses') }}" method="post">
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tbody>
<tr bgcolor="{{ config.vdarkborder }}">
<td colspan="4" class="white"><b>House Search</b></td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
<td width="25%"><b>Town</b></td>
<td width="25%"><b>Status</b></td>
<td width="25%"><b>Order</b></td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
<td width="25%"><b>Town</b></td>
<td width="25%"><b>Status</b></td>
<td width="25%"><b>Order</b></td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
<td valign="top" rowspan="2">
{% set checked = false %}
{% for id, name in config.towns if id > 0 %}
{% if ((townId is empty and name is not empty) or id == townId) and not checked %}
{% set variable = "checked" %}
{% set checked = true %}
{% else %}
{% set variable = "" %}
{% endif %}
<tr bgcolor="{{ config.darkborder }}">
<td valign="top" rowspan="2">
{% set checked = false %}
{% for id, name in config.towns if id > 0 %}
{% if ((townId is empty and name is not empty) or id == townId) and not checked %}
{% set variable = "checked" %}
{% set checked = true %}
{% else %}
{% set variable = "" %}
{% endif %}
<input type="radio" name="town" id="town_{{ id }}" value="{{ id }}"{% if variable is defined %} {{ variable }}{% endif %}>
<label for="town_{{ id }}"> {{ name }}</label>
<br>
{% endfor %}
</td>
<input type="radio" name="town" id="town_{{ id }}" value="{{ id }}"{% if variable is defined %} {{ variable }}{% endif %}>
<label for="town_{{ id }}"> {{ name }}</label>
<br>
{% endfor %}
</td>
<td valign="top">
<input type="radio" name="state" id="state_all" value=""{% if state is empty %} checked{% endif %}>
<label for="state_all">all states</label><br>
<td valign="top">
<input type="radio" name="state" id="state_all" value=""{% if state is empty %} checked{% endif %}>
<label for="state_all">all states</label><br>
<input type="radio" name="state" id="state_free" value="free"{% if state == 'free' %} checked{% endif %}>
<label for="state_free">free</label><br>
<input type="radio" name="state" id="state_free" value="free"{% if state == 'free' %} checked{% endif %}>
<label for="state_free">free</label><br>
<input type="radio" name="state" id="state_rented" value="rented"{% if state == 'rented' %} checked{% endif %}>
<label for="state_rented">rented</label><br>
</td>
<input type="radio" name="state" id="state_rented" value="rented"{% if state == 'rented' %} checked{% endif %}>
<label for="state_rented">rented</label><br>
</td>
<td valign="top" rowspan="2">
<input type="radio" name="order" id="order_name" value=""{% if order is empty %} checked{% endif %}>
<label for="order_name"> by name</label><br>
<td valign="top" rowspan="2">
<input type="radio" name="order" id="order_name" value=""{% if order is empty %} checked{% endif %}>
<label for="order_name"> by name</label><br>
<input type="radio" name="order" id="order_size" value="size"{% if order == 'size' %} checked{% endif %}>
<label for="order_size"> by size</label><br>
<input type="radio" name="order" id="order_size" value="size"{% if order == 'size' %} checked{% endif %}>
<label for="order_size"> by size</label><br>
<input type="radio" name="order" id="order_rent" value="rent"{% if order == 'rent' %} checked{% endif %}>
<label for="order_rent"> by rent</label><br>
</td>
</tr>
<input type="radio" name="order" id="order_rent" value="rent"{% if order == 'rent' %} checked{% endif %}>
<label for="order_rent"> by rent</label><br>
</td>
</tr>
<tr bgcolor="{{ config.darkborder }}">
<td valign="top">
<input type="radio" name="type" id="type_all" value=""{% if type is empty %} checked{% endif %}>
<label for="type"> all</label><br>
<input type="radio" name="type" id="type_houses" value="houses"{% if type == 'houses' %} checked{% endif %}>
<label for="type_houses"> houses and flats</label><br>
<input type="radio" name="type" id="type_guildhalls" value="guildhalls"{% if type == 'guildhalls' %} checked{% endif %}>
<label for="type_guildhalls"> guildhalls</label><br>
</td>
</tr>
</tbody>
</table>
<br>
<tr bgcolor="{{ config.darkborder }}">
<td valign="top">
<input type="radio" name="type" id="type_all" value=""{% if type is empty %} checked{% endif %}>
<label for="type"> all</label><br>
<input type="radio" name="type" id="type_houses" value="houses"{% if type == 'houses' %} checked{% endif %}>
<label for="type_houses"> houses and flats</label><br>
<input type="radio" name="type" id="type_guildhalls" value="guildhalls"{% if type == 'guildhalls' %} checked{% endif %}>
<label for="type_guildhalls"> guildhalls</label><br>
</td>
</tr>
</tbody>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr align="center">
<td>
{{ include('buttons.submit.html.twig') }}
</td>
</tr>
</tbody>
</table>
</form>
</div>
</td>
</tr>
</table>
{% endif %}
</div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr align="center">
<td>
{{ include('buttons.submit.html.twig') }}
</td>
</tr>
</tbody>
</table>
</form>
</div>
</td>
</tr>
</table>
{% endif %}
</div>

View File

@ -1,51 +1,51 @@
<div class="TableContainer">
{% if errors is not empty %}
{% for error in errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% else %}
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >{{ houseName }}</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
{% if errors is not empty %}
{% for error in errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% else %}
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
<div class="CaptionContainer">
<div class="CaptionInnerContainer">
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionBorderTop" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<div class="Text" >{{ houseName }}</div>
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
<span class="CaptionBorderBottom" style="background-image:url({{ template_path }}/images/content/table-headline-border.gif);"></span>
<span class="CaptionEdgeLeftBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
</div>
</div>
<tr>
<td>
<div class="InnerTableContainer">
<table border="0" cellpadding="4" cellspacing="1" width="100%">
<tr style="display: inline-flex;">
<td><img src="{{ imgPath }}"></td>
<td>
{{ bedsMessage }} and has a size of <b>{{ houseSize }} square meters</b>.
<tr>
<td>
<div class="InnerTableContainer">
<table border="0" cellpadding="4" cellspacing="1" width="100%">
<tr style="display: inline-flex;">
<td><img src="{{ imgPath }}"></td>
<td>
{{ bedsMessage }} and has a size of <b>{{ houseSize }} square meters</b>.
{% if rentType != 'never' %}
The {{ rentType }} is <b>{{ houseRent }} gold</b> and will be debited to the bank account on <b>{{ config.lua.serverName }}</b>.
{% endif %}
<br>
{% if rentType != 'never' %}
The {{ rentType }} is <b>{{ houseRent }} gold</b> and will be debited to the bank account on <b>{{ config.lua.serverName }}</b>.
{% endif %}
<br>
{% if owner is not empty %}
The house has been rented by <b>{{ owner|raw }}</b>.
{% else %}
No one has bought this house yet.
{% endif %}
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
{% endif %}
{% if owner is not empty %}
The house has been rented by <b>{{ owner|raw }}</b>.
{% else %}
No one has bought this house yet.
{% endif %}
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
{% endif %}
</div>
<br><br>
<br><br>