mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00
change spaces to tabs
This commit is contained in:
parent
d04e44f52f
commit
58598742e8
@ -14,17 +14,17 @@ $title = 'Houses';
|
|||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
if(!$db->hasColumn('houses', 'name')) {
|
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(
|
$twig->display('houses.html.twig', array(
|
||||||
'errors' => $errors
|
'errors' => $errors
|
||||||
));
|
));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$rentType = trim(strtolower($config['lua']['houseRentPeriod']));
|
$rentType = trim(strtolower($config['lua']['houseRentPeriod']));
|
||||||
if($rentType != 'yearly' && $rentType != 'monthly' && $rentType != 'weekly' && $rentType != 'daily')
|
if($rentType != 'yearly' && $rentType != 'monthly' && $rentType != 'weekly' && $rentType != 'daily')
|
||||||
$rentType = 'never';
|
$rentType = 'never';
|
||||||
|
|
||||||
$state = '';
|
$state = '';
|
||||||
$order = '';
|
$order = '';
|
||||||
@ -32,116 +32,116 @@ $type = '';
|
|||||||
|
|
||||||
if(isset($_GET['page']) && $_GET['page'] == 'view' && isset($_REQUEST['house']))
|
if(isset($_GET['page']) && $_GET['page'] == 'view' && isset($_REQUEST['house']))
|
||||||
{
|
{
|
||||||
$beds = array("", "one", "two", "three", "fourth", "fifth");
|
$beds = array("", "one", "two", "three", "fourth", "fifth");
|
||||||
$houseName = $_REQUEST['house'];
|
$houseName = $_REQUEST['house'];
|
||||||
$houseId = (Validator::number($_REQUEST['house']) ? $_REQUEST['house'] : -1);
|
$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));
|
$selectHouse = $db->query('SELECT * FROM ' . $db->tableName('houses') . ' WHERE ' . $db->fieldName('name') . ' LIKE ' . $db->quote($houseName) . ' OR `id` = ' . $db->quote($houseId));
|
||||||
|
|
||||||
$house = array();
|
$house = array();
|
||||||
if($selectHouse->rowCount() > 0)
|
if($selectHouse->rowCount() > 0)
|
||||||
{
|
{
|
||||||
$house = $selectHouse->fetch();
|
$house = $selectHouse->fetch();
|
||||||
$houseId = $house['id'];
|
$houseId = $house['id'];
|
||||||
|
|
||||||
$title = $house['name'] . ' - ' . $title;
|
$title = $house['name'] . ' - ' . $title;
|
||||||
|
|
||||||
$imgPath = 'images/houses/' . $houseId . '.gif';
|
$imgPath = 'images/houses/' . $houseId . '.gif';
|
||||||
if(!file_exists($imgPath)) {
|
if(!file_exists($imgPath)) {
|
||||||
$imgPath = 'images/houses/default.jpg';
|
$imgPath = 'images/houses/default.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
$bedsMessage = null;
|
$bedsMessage = null;
|
||||||
$houseBeds = $house['beds'];
|
$houseBeds = $house['beds'];
|
||||||
if($houseBeds > 0)
|
if($houseBeds > 0)
|
||||||
$bedsMessage = 'House have ' . (isset($beds[$houseBeds]) ? $beds[$houseBeds] : $houseBeds) . ' bed' . ($houseBeds > 1 ? 's' : '');
|
$bedsMessage = 'House have ' . (isset($beds[$houseBeds]) ? $beds[$houseBeds] : $houseBeds) . ' bed' . ($houseBeds > 1 ? 's' : '');
|
||||||
else
|
else
|
||||||
$bedsMessage = 'This house dont have any beds';
|
$bedsMessage = 'This house dont have any beds';
|
||||||
|
|
||||||
$houseOwner = $house['owner'];
|
$houseOwner = $house['owner'];
|
||||||
if($houseOwner > 0)
|
if($houseOwner > 0)
|
||||||
{
|
{
|
||||||
$guild = NULL;
|
$guild = NULL;
|
||||||
$owner = null;
|
$owner = null;
|
||||||
if(isset($house['guild']) && $house['guild'] == 1)
|
if(isset($house['guild']) && $house['guild'] == 1)
|
||||||
{
|
{
|
||||||
$guild = new OTS_Guild();
|
$guild = new OTS_Guild();
|
||||||
$guild->load($houseOwner);
|
$guild->load($houseOwner);
|
||||||
$owner = getGuildLink($guild->getName());
|
$owner = getGuildLink($guild->getName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$owner = getCreatureName($houseOwner);
|
$owner = getCreatureName($houseOwner);
|
||||||
|
|
||||||
if($rentType != 'never' && $house['paid'] > 0)
|
if($rentType != 'never' && $house['paid'] > 0)
|
||||||
{
|
{
|
||||||
$who = '';
|
$who = '';
|
||||||
if($guild)
|
if($guild)
|
||||||
$who = $guild->getName();
|
$who = $guild->getName();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$player = new OTS_Player();
|
$player = new OTS_Player();
|
||||||
$player->load($houseOwner);
|
$player->load($houseOwner);
|
||||||
if($player->isLoaded())
|
if($player->isLoaded())
|
||||||
{
|
{
|
||||||
$sexs = array('She', 'He');
|
$sexs = array('She', 'He');
|
||||||
$who = $sexs[$player->getSex()];
|
$who = $sexs[$player->getSex()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$owner .= ' ' . $who . ' has paid the rent until ' . date("M d Y, H:i:s", $house['paid']) . ' CEST.';
|
$owner .= ' ' . $who . ' has paid the rent until ' . date("M d Y, H:i:s", $house['paid']) . ' CEST.';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$errors[] = 'House with name ' . $houseName . ' does not exists.';
|
$errors[] = 'House with name ' . $houseName . ' does not exists.';
|
||||||
|
|
||||||
$twig->display('houses.view.html.twig', array(
|
$twig->display('houses.view.html.twig', array(
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'imgPath' => isset($imgPath) ? $imgPath : null,
|
'imgPath' => isset($imgPath) ? $imgPath : null,
|
||||||
'houseName' => isset($house['name']) ? $house['name'] : null,
|
'houseName' => isset($house['name']) ? $house['name'] : null,
|
||||||
'bedsMessage' => isset($bedsMessage) ? $bedsMessage : null,
|
'bedsMessage' => isset($bedsMessage) ? $bedsMessage : null,
|
||||||
'houseSize' => isset($house['size']) ? $house['size'] : null,
|
'houseSize' => isset($house['size']) ? $house['size'] : null,
|
||||||
'houseRent' => isset($house['rent']) ? $house['rent'] : null,
|
'houseRent' => isset($house['rent']) ? $house['rent'] : null,
|
||||||
'owner' => isset($owner) ? $owner : null,
|
'owner' => isset($owner) ? $owner : null,
|
||||||
'rentType' => isset($rentType) ? $rentType : null
|
'rentType' => isset($rentType) ? $rentType : null
|
||||||
));
|
));
|
||||||
|
|
||||||
if (count($errors) > 0) {
|
if (count($errors) > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cleanOldHouse = null;
|
$cleanOldHouse = null;
|
||||||
if(isset($config['lua']['houseCleanOld'])) {
|
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;
|
$housesSearch = false;
|
||||||
if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) && (isset($_POST['type']) || !$db->hasColumn('houses', 'guild')))
|
if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) && (isset($_POST['type']) || !$db->hasColumn('houses', 'guild')))
|
||||||
{
|
{
|
||||||
$townName = $config['towns'][$_POST['town']];
|
$townName = $config['towns'][$_POST['town']];
|
||||||
$order = $_POST['order'];
|
$order = $_POST['order'];
|
||||||
$orderby = '`name`';
|
$orderby = '`name`';
|
||||||
if(!empty($order))
|
if(!empty($order))
|
||||||
{
|
{
|
||||||
if($order == 'size')
|
if($order == 'size')
|
||||||
$orderby = '`size`';
|
$orderby = '`size`';
|
||||||
else if($order == 'rent')
|
else if($order == 'rent')
|
||||||
$orderby = '`rent`';
|
$orderby = '`rent`';
|
||||||
}
|
}
|
||||||
|
|
||||||
$town = 'town';
|
$town = 'town';
|
||||||
if($db->hasColumn('houses', 'town_id'))
|
if($db->hasColumn('houses', 'town_id'))
|
||||||
$town = 'town_id';
|
$town = 'town_id';
|
||||||
else if($db->hasColumn('houses', 'townid'))
|
else if($db->hasColumn('houses', 'townid'))
|
||||||
$town = 'townid';
|
$town = 'townid';
|
||||||
|
|
||||||
$whereby = '`' . $town . '` = ' .(int)$_POST['town'];
|
$whereby = '`' . $town . '` = ' .(int)$_POST['town'];
|
||||||
$state = $_POST['state'];
|
$state = $_POST['state'];
|
||||||
if(!empty($state))
|
if(!empty($state))
|
||||||
$whereby .= ' AND `owner` ' . ($state == 'free' ? '' : '!'). '= 0';
|
$whereby .= ' AND `owner` ' . ($state == 'free' ? '' : '!'). '= 0';
|
||||||
|
|
||||||
$type = isset($_POST['type']) ? $_POST['type'] : NULL;
|
$type = isset($_POST['type']) ? $_POST['type'] : NULL;
|
||||||
if($type == 'guildhalls' && !$db->hasColumn('houses', 'guild'))
|
if($type == 'guildhalls' && !$db->hasColumn('houses', 'guild'))
|
||||||
$type = 'all';
|
$type = 'all';
|
||||||
|
|
||||||
if (!empty($type) && $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_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();
|
$players = array();
|
||||||
foreach($players_info->fetchAll() as $player)
|
foreach($players_info->fetchAll() as $player)
|
||||||
$players[$player['houseid']] = array('name' => $player['ownername']);
|
$players[$player['houseid']] = array('name' => $player['ownername']);
|
||||||
|
|
||||||
$houses = array();
|
$houses = array();
|
||||||
foreach($houses_info->fetchAll() as $house)
|
foreach($houses_info->fetchAll() as $house)
|
||||||
{
|
{
|
||||||
$owner = isset($players[$house['id']]) ? $players[$house['id']] : array();
|
$owner = isset($players[$house['id']]) ? $players[$house['id']] : array();
|
||||||
|
|
||||||
$houseRent = null;
|
$houseRent = null;
|
||||||
if($db->hasColumn('houses', 'guild') && $house['guild'] == 1 && $house['owner'] != 0)
|
if($db->hasColumn('houses', 'guild') && $house['guild'] == 1 && $house['owner'] != 0)
|
||||||
{
|
{
|
||||||
$guild = new OTS_Guild();
|
$guild = new OTS_Guild();
|
||||||
$guild->load($house['owner']);
|
$guild->load($house['owner']);
|
||||||
$houseRent = 'Rented by ' . getGuildLink($guild->getName());
|
$houseRent = 'Rented by ' . getGuildLink($guild->getName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!empty($owner['name']))
|
if(!empty($owner['name']))
|
||||||
$houseRent = 'Rented by ' . getPlayerLink($owner['name']);
|
$houseRent = 'Rented by ' . getPlayerLink($owner['name']);
|
||||||
else
|
else
|
||||||
$houseRent = 'Free';
|
$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' : '';
|
$guild = $db->hasColumn('houses', 'guild') ? ' or guildhall' : '';
|
||||||
$twig->display('houses.html.twig', array(
|
$twig->display('houses.html.twig', array(
|
||||||
'state' => $state,
|
'state' => $state,
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'houseType' => $type == 'guildhalls' ? 'Guildhalls' : 'Houses and Flats',
|
'houseType' => $type == 'guildhalls' ? 'Guildhalls' : 'Houses and Flats',
|
||||||
'townName' => isset($townName) ? $townName : null,
|
'townName' => isset($townName) ? $townName : null,
|
||||||
'townId' => isset($_POST['town']) ? $_POST['town'] : null,
|
'townId' => isset($_POST['town']) ? $_POST['town'] : null,
|
||||||
'guild' => $guild,
|
'guild' => $guild,
|
||||||
'cleanOldHouse' => isset($cleanOld) ? $cleanOld : null,
|
'cleanOldHouse' => isset($cleanOld) ? $cleanOld : null,
|
||||||
'housesSearch' => $housesSearch,
|
'housesSearch' => $housesSearch,
|
||||||
'houses' => isset($houses) ? $houses : null
|
'houses' => isset($houses) ? $houses : null
|
||||||
));
|
));
|
@ -1,171 +1,171 @@
|
|||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
{% if errors is not empty %}
|
{% if errors is not empty %}
|
||||||
{% for error in errors %}
|
{% for error in errors %}
|
||||||
<p class="error">{{ error }}</p>
|
<p class="error">{{ error }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
|
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
|
||||||
<div class="CaptionContainer">
|
<div class="CaptionContainer">
|
||||||
<div class="CaptionInnerContainer">
|
<div class="CaptionInnerContainer">
|
||||||
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
<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="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="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>
|
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
||||||
<div class="Text" >House Search</div>
|
<div class="Text" >House Search</div>
|
||||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
<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="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="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>
|
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="InnerTableContainer">
|
<div class="InnerTableContainer">
|
||||||
Here you can see the list of all available houses, flats{{ guildString }}.
|
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
|
Click on any view button to get more information about a house or adjust
|
||||||
the search criteria and start a new search.
|
the search criteria and start a new search.
|
||||||
<br><br>
|
<br><br>
|
||||||
{% if cleanOldHouse is not empty or rentType != 'never' %}
|
{% 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 %}
|
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>
|
<br><br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if houses is not empty or housesSearch %}
|
{% if houses is not empty or housesSearch %}
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<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>
|
<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>
|
||||||
|
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
{% if houses is not empty %}
|
{% if houses is not empty %}
|
||||||
<td width="40%"><b>Name</b></td>
|
<td width="40%"><b>Name</b></td>
|
||||||
<td width="10%"><b>Size</b></td>
|
<td width="10%"><b>Size</b></td>
|
||||||
<td width="10%"><b>Rent</b></td>
|
<td width="10%"><b>Rent</b></td>
|
||||||
|
|
||||||
<td width="40%"><b>Status</b></td>
|
<td width="40%"><b>Status</b></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
{% elseif housesSearch %}
|
{% elseif housesSearch %}
|
||||||
<td>No {{ houseType }} with specified criterias.</td>
|
<td>No {{ houseType }} with specified criterias.</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% if houses is not empty %}
|
{% if houses is not empty %}
|
||||||
{% set i = 0 %}
|
{% set i = 0 %}
|
||||||
{% for house in houses %}
|
{% for house in houses %}
|
||||||
{% set i = i + 1 %}
|
{% set i = i + 1 %}
|
||||||
<tr bgcolor="{{ getStyle(i) }}">
|
<tr bgcolor="{{ getStyle(i) }}">
|
||||||
<td width="40%">
|
<td width="40%">
|
||||||
{{ house.name }}
|
{{ house.name }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td width="10%">
|
<td width="10%">
|
||||||
{{ house.size }}
|
{{ house.size }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td width="10%">
|
<td width="10%">
|
||||||
{{ house.rent }} golds
|
{{ house.rent }} golds
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td width="40%">
|
<td width="40%">
|
||||||
{{ house.rentedBy|raw }}
|
{{ house.rentedBy|raw }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ getLink('houses/view') }}" method="post">
|
<form action="{{ getLink('houses/view') }}" method="post">
|
||||||
<input type="hidden" name="house" value="{{ house.name }}">
|
<input type="hidden" name="house" value="{{ house.name }}">
|
||||||
{{ include('buttons.view.html.twig') }}
|
{{ include('buttons.view.html.twig') }}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form action="{{ getLink('houses') }}" method="post">
|
<form action="{{ getLink('houses') }}" method="post">
|
||||||
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
<table border="0" cellspacing="1" cellpadding="4" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr bgcolor="{{ config.vdarkborder }}">
|
<tr bgcolor="{{ config.vdarkborder }}">
|
||||||
<td colspan="4" class="white"><b>House Search</b></td>
|
<td colspan="4" class="white"><b>House Search</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
<td width="25%"><b>Town</b></td>
|
<td width="25%"><b>Town</b></td>
|
||||||
<td width="25%"><b>Status</b></td>
|
<td width="25%"><b>Status</b></td>
|
||||||
<td width="25%"><b>Order</b></td>
|
<td width="25%"><b>Order</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
<td valign="top" rowspan="2">
|
<td valign="top" rowspan="2">
|
||||||
{% set checked = false %}
|
{% set checked = false %}
|
||||||
{% for id, name in config.towns if id > 0 %}
|
{% for id, name in config.towns if id > 0 %}
|
||||||
{% if ((townId is empty and name is not empty) or id == townId) and not checked %}
|
{% if ((townId is empty and name is not empty) or id == townId) and not checked %}
|
||||||
{% set variable = "checked" %}
|
{% set variable = "checked" %}
|
||||||
{% set checked = true %}
|
{% set checked = true %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set variable = "" %}
|
{% set variable = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<input type="radio" name="town" id="town_{{ id }}" value="{{ id }}"{% if variable is defined %} {{ variable }}{% endif %}>
|
<input type="radio" name="town" id="town_{{ id }}" value="{{ id }}"{% if variable is defined %} {{ variable }}{% endif %}>
|
||||||
<label for="town_{{ id }}"> {{ name }}</label>
|
<label for="town_{{ id }}"> {{ name }}</label>
|
||||||
<br>
|
<br>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<input type="radio" name="state" id="state_all" value=""{% if state is empty %} checked{% endif %}>
|
<input type="radio" name="state" id="state_all" value=""{% if state is empty %} checked{% endif %}>
|
||||||
<label for="state_all">all states</label><br>
|
<label for="state_all">all states</label><br>
|
||||||
|
|
||||||
<input type="radio" name="state" id="state_free" value="free"{% if state == 'free' %} checked{% endif %}>
|
<input type="radio" name="state" id="state_free" value="free"{% if state == 'free' %} checked{% endif %}>
|
||||||
<label for="state_free">free</label><br>
|
<label for="state_free">free</label><br>
|
||||||
|
|
||||||
<input type="radio" name="state" id="state_rented" value="rented"{% if state == 'rented' %} checked{% endif %}>
|
<input type="radio" name="state" id="state_rented" value="rented"{% if state == 'rented' %} checked{% endif %}>
|
||||||
<label for="state_rented">rented</label><br>
|
<label for="state_rented">rented</label><br>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td valign="top" rowspan="2">
|
<td valign="top" rowspan="2">
|
||||||
<input type="radio" name="order" id="order_name" value=""{% if order is empty %} checked{% endif %}>
|
<input type="radio" name="order" id="order_name" value=""{% if order is empty %} checked{% endif %}>
|
||||||
<label for="order_name"> by name</label><br>
|
<label for="order_name"> by name</label><br>
|
||||||
|
|
||||||
<input type="radio" name="order" id="order_size" value="size"{% if order == 'size' %} checked{% endif %}>
|
<input type="radio" name="order" id="order_size" value="size"{% if order == 'size' %} checked{% endif %}>
|
||||||
<label for="order_size"> by size</label><br>
|
<label for="order_size"> by size</label><br>
|
||||||
|
|
||||||
<input type="radio" name="order" id="order_rent" value="rent"{% if order == 'rent' %} checked{% endif %}>
|
<input type="radio" name="order" id="order_rent" value="rent"{% if order == 'rent' %} checked{% endif %}>
|
||||||
<label for="order_rent"> by rent</label><br>
|
<label for="order_rent"> by rent</label><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="{{ config.darkborder }}">
|
<tr bgcolor="{{ config.darkborder }}">
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<input type="radio" name="type" id="type_all" value=""{% if type is empty %} checked{% endif %}>
|
<input type="radio" name="type" id="type_all" value=""{% if type is empty %} checked{% endif %}>
|
||||||
<label for="type"> all</label><br>
|
<label for="type"> all</label><br>
|
||||||
<input type="radio" name="type" id="type_houses" value="houses"{% if type == 'houses' %} checked{% endif %}>
|
<input type="radio" name="type" id="type_houses" value="houses"{% if type == 'houses' %} checked{% endif %}>
|
||||||
<label for="type_houses"> houses and flats</label><br>
|
<label for="type_houses"> houses and flats</label><br>
|
||||||
<input type="radio" name="type" id="type_guildhalls" value="guildhalls"{% if type == 'guildhalls' %} checked{% endif %}>
|
<input type="radio" name="type" id="type_guildhalls" value="guildhalls"{% if type == 'guildhalls' %} checked{% endif %}>
|
||||||
<label for="type_guildhalls"> guildhalls</label><br>
|
<label for="type_guildhalls"> guildhalls</label><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr align="center">
|
<tr align="center">
|
||||||
<td>
|
<td>
|
||||||
{{ include('buttons.submit.html.twig') }}
|
{{ include('buttons.submit.html.twig') }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
@ -1,51 +1,51 @@
|
|||||||
<div class="TableContainer">
|
<div class="TableContainer">
|
||||||
{% if errors is not empty %}
|
{% if errors is not empty %}
|
||||||
{% for error in errors %}
|
{% for error in errors %}
|
||||||
<p class="error">{{ error }}</p>
|
<p class="error">{{ error }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
|
<table class="Table1" cellpadding="0" cellspacing="0" style="background-color: {{ config.lightborder }}">
|
||||||
<div class="CaptionContainer">
|
<div class="CaptionContainer">
|
||||||
<div class="CaptionInnerContainer">
|
<div class="CaptionInnerContainer">
|
||||||
<span class="CaptionEdgeLeftTop" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
<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="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="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>
|
<span class="CaptionVerticalLeft" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
||||||
<div class="Text" >{{ houseName }}</div>
|
<div class="Text" >{{ houseName }}</div>
|
||||||
<span class="CaptionVerticalRight" style="background-image:url({{ template_path }}/images/content/box-frame-vertical.gif);"></span>
|
<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="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="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>
|
<span class="CaptionEdgeRightBottom" style="background-image:url({{ template_path }}/images/content/box-frame-edge.gif);"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="InnerTableContainer">
|
<div class="InnerTableContainer">
|
||||||
<table border="0" cellpadding="4" cellspacing="1" width="100%">
|
<table border="0" cellpadding="4" cellspacing="1" width="100%">
|
||||||
<tr style="display: inline-flex;">
|
<tr style="display: inline-flex;">
|
||||||
<td><img src="{{ imgPath }}"></td>
|
<td><img src="{{ imgPath }}"></td>
|
||||||
<td>
|
<td>
|
||||||
{{ bedsMessage }} and has a size of <b>{{ houseSize }} square meters</b>.
|
{{ bedsMessage }} and has a size of <b>{{ houseSize }} square meters</b>.
|
||||||
|
|
||||||
{% if rentType != 'never' %}
|
{% if rentType != 'never' %}
|
||||||
The {{ rentType }} is <b>{{ houseRent }} gold</b> and will be debited to the bank account on <b>{{ config.lua.serverName }}</b>.
|
The {{ rentType }} is <b>{{ houseRent }} gold</b> and will be debited to the bank account on <b>{{ config.lua.serverName }}</b>.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
{% if owner is not empty %}
|
{% if owner is not empty %}
|
||||||
The house has been rented by <b>{{ owner|raw }}</b>.
|
The house has been rented by <b>{{ owner|raw }}</b>.
|
||||||
{% else %}
|
{% else %}
|
||||||
No one has bought this house yet.
|
No one has bought this house yet.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br><br>
|
<br><br>
|
Loading…
x
Reference in New Issue
Block a user