737 lines
43 KiB
PHP
737 lines
43 KiB
PHP
<?php
|
||
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
|
||
|
||
if(!$_SESSION['id']) {
|
||
header("location:index.php");
|
||
die("Доступ запрещён!");
|
||
}
|
||
|
||
$sqlForNeedNb = "SELECT COUNT(blocks.id) as count
|
||
FROM `blocks`
|
||
INNER JOIN regions r on r.id = blocks.region_id
|
||
INNER JOIN rf_regions rr on rr.id = r.rf_region_id
|
||
WHERE rr.id = $user->region_rf_id
|
||
";
|
||
$rezForNeedNb = mysql_query($sqlForNeedNb);
|
||
|
||
|
||
$showNewbuildings = false;
|
||
|
||
$countResult = mysql_fetch_assoc($rezForNeedNb);
|
||
|
||
if ($countResult['count'] != '0') {
|
||
$showNewbuildings = true;
|
||
}
|
||
if ($showNewbuildings == false) {
|
||
header("location:/index.php");
|
||
die("Доступ запрещён!");
|
||
}
|
||
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/ImportRecord.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/document/target/DocTarget.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/Block.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/RoomType.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/DecorationType.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/Apartment.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/obj/Building.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/helper/Date.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/Clock/Clock.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/Clock/RealtimeClock.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/state/IReservationState.php';
|
||
include $_SERVER['DOCUMENT_ROOT'] . '/import/reservation/Reservation.php';
|
||
|
||
$get = clearInputData($_GET);
|
||
|
||
if (!isset($get['blockId'])) {
|
||
header("location:/newbuildings.php");
|
||
exit();
|
||
}
|
||
|
||
$block = new Block();
|
||
|
||
if ($get['blockId'] > 0) {
|
||
$block = Block::findOne($get['blockId']);
|
||
}
|
||
|
||
require($_SERVER['DOCUMENT_ROOT']."/templates/new-header.php");
|
||
?>
|
||
<style>
|
||
.jw__layout-content .main-title {
|
||
padding: 20px 0 22px 35px;
|
||
position: relative;
|
||
z-index: 99;
|
||
border-bottom: 1px solid #dedede;
|
||
background: #fff;
|
||
}
|
||
.search__tabs {
|
||
padding: 0 35px !important;
|
||
position: relative;
|
||
z-index: 99;
|
||
background: #fff;
|
||
}
|
||
.jw__layout .content-top {
|
||
z-index: 100;
|
||
}
|
||
.show_form {
|
||
padding: 12px 35px 15px;
|
||
margin: 0;
|
||
text-align: center;
|
||
font-size: 15px;
|
||
color: #757575;
|
||
cursor: pointer;
|
||
background: -moz-linear-gradient(top, #f8f8f8, #fff);
|
||
background: -webkit-linear-gradient(top, #f8f8f8, #fff);
|
||
background: -o-linear-gradient(top, #f8f8f8, #fff);
|
||
background: -ms-linear-gradient(top, #f8f8f8, #fff);
|
||
background: linear-gradient(top, #f8f8f8, #fff);
|
||
border-bottom: 1px solid #dedede;
|
||
}
|
||
.show_form i {
|
||
position: relative;
|
||
top: 2px;
|
||
margin-left: 5px;
|
||
font-size: 17px;
|
||
opacity: .7;
|
||
}
|
||
.show_form:hover i {
|
||
opacity: 1;
|
||
}
|
||
</style>
|
||
<script type="text/javascript" src="/js/fotorama.js"></script>
|
||
<script type="text/javascript" src="https://api-maps.yandex.ru/2.0/?load=package.standard&lang=ru-RU"></script>
|
||
<script type="text/javascript" src="/js/jquery.multiselect.js"></script>
|
||
|
||
<div class="content-right new">
|
||
<div class="inner">
|
||
<div class="main-title">
|
||
<h1>«<?php echo $block->name;?>»</h1>
|
||
</div>
|
||
<div class="show_form" id="show_form" <?php if($_GET['hide_form']) echo 'style="display: block"'; else echo 'style="display: none"'; ?>>Развернуть форму<i class="ti-angle-double-down"></i></div>
|
||
<div class="main-form" style="border-bottom: 1px solid #dedede; border-top: none;<?php if($_GET['hide_form']) echo 'display: none;'; ?>">
|
||
<form id="f-system-search-form" action="/blockApartments.php">
|
||
<div class="control-group" style="padding-top: 25px;">
|
||
<div class="control">
|
||
<div class="form-search__main-label small-label"><span>Площадь:</span></div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<input type="number" class="text small-input no-mrg-left" min="0" max="1000" name="sq_all_ot" placeholder="от" value="<?php if (isset($get['sq_all_ot']) && $get['sq_all_ot']) { echo $get['sq_all_ot']; } ?>">
|
||
<input type="number" class="text small-input" min="0" max="1000" name="sq_all_do" placeholder="до" value="<?php if (isset($get['sq_all_do']) && $get['sq_all_do']) { echo $get['sq_all_do']; } ?>">
|
||
<span class="form-label with-pad"> м<sup>2</sup></span>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="control-group" style="padding-top: 0; padding-bottom: 0;">
|
||
<div class="control">
|
||
<div class="form-search__main-label small-label">
|
||
<span>Цена:</span>
|
||
</div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<div class="fr-input fr-price">
|
||
<input type="text" id="stoim_ot" class="text price medium-input no-mrg-left money-format" name="stoim_ot" placeholder="от" value="<?php if (isset($get['stoim_ot'])) { echo $get['stoim_ot']; } ?>">
|
||
<div class="fr-ui-slider slider_newbuiding1" id="e-form-slider"></div>
|
||
</div>
|
||
<div class="fr-input fr-price second">
|
||
<input type="text" id="stoim_do" class="text price medium-input money-format" name="stoim_do" placeholder="до" value="<?php if (isset($get['stoim_do'])) { echo $get['stoim_do']; } ?>">
|
||
<div class="fr-ui-slider slider_newbuiding2" id="e-form-slider"></div>
|
||
</div>
|
||
<span class="form-label with-pad"> <span class="rub">p</span></span>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<?php
|
||
|
||
$mas_url_add = [];
|
||
|
||
$mas_url_add[] = "blockId=" . $block->id . '&hide_form=1';
|
||
|
||
if (isset($get['type'])) {
|
||
foreach($get['type'] as $type) {
|
||
$mas_url_add[] = "type[]=" . $type;
|
||
}
|
||
}
|
||
if (isset($get['obj_type'])) {
|
||
foreach($get['obj_type'] as $type) {
|
||
$mas_url_add[] = "obj_type[]=" . $type;
|
||
}
|
||
}
|
||
if (isset($get['dec_type'])) {
|
||
$mas_url_add[] = "dec_type=" . $get['dec_type'];
|
||
}
|
||
if (isset($get['period'])) {
|
||
$mas_url_add[] = "period=" . $get['period'];
|
||
}
|
||
if (isset($get['stoim_ot'])) {
|
||
$mas_url_add[] = "stoim_ot=" . $get['stoim_ot'];
|
||
}
|
||
if (isset($get['stoim_do'])) {
|
||
$mas_url_add[] = "stoim_do=" . $get['stoim_do'];
|
||
}
|
||
if (isset($get['sq_all_ot'])) {
|
||
$mas_url_add[] = "sq_all_ot=" . $get['sq_all_ot'];
|
||
}
|
||
if (isset($get['sq_all_do'])) {
|
||
$mas_url_add[] = "sq_all_do=" . $get['sq_all_do'];
|
||
}
|
||
if (isset($get['flat_floor_ot'])) {
|
||
$mas_url_add[] = "flat_floor_ot=" . $get['flat_floor_ot'];
|
||
}
|
||
if (isset($get['flat_floor_do'])) {
|
||
$mas_url_add[] = "flat_floor_do=" . $get['flat_floor_do'];
|
||
}
|
||
|
||
if($mas_url_add) {
|
||
$str_url_add = implode("&", $mas_url_add);
|
||
}
|
||
|
||
$roomTypes = array();
|
||
$decorationTypes = array();
|
||
$periods = array();
|
||
|
||
if ($block->id) {
|
||
$roomTypes = RoomType::findByBlockId($block->id);
|
||
$decorationTypes = DecorationType::getListForBlock($block->id);
|
||
$periods = Building::getPeriodsByBlock($block->id);
|
||
} else {
|
||
$roomTypes = RoomType::getElementsList();
|
||
$decorationTypes = DecorationType::getElementsList();
|
||
$periods = Building::getUniquePeriods();
|
||
}
|
||
|
||
if (count($periods) > 1) {
|
||
$num = 0;
|
||
echo '<div class="control-group" style="padding-top: 0;padding-bottom: 0;"><div class="switch__filter button-row" style="padding-top:20px;margin-right:10px;"><div class="form-search__main-label small-label"><span>Период по:</span></div>';
|
||
foreach ($periods as $k => $item) {
|
||
|
||
?>
|
||
<input type="radio" class="hidden--radio" id="field_dt<?php echo $k;?>" name="period" value="<?php echo $k;?>" <? if (isset($get['period']) && $get['period'] == $k) echo "checked"; ?>>
|
||
<div class="selector-button typeCategory <?php if(isset($get['period']) && $get['period'] == $k) echo "selected"; if ($num == 0) { echo " button-left"; } else { if (($num +1) == count($periods)) { echo " button-right"; } else { echo " button-center"; }} ?>">
|
||
|
||
<span><?php echo $item;?></span>
|
||
|
||
<label for="field_dt<?php echo $k;?>" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
<?php
|
||
$num++;
|
||
}
|
||
echo '<div class="clear"></div></div></div>';
|
||
}
|
||
|
||
if (count($decorationTypes) > 1) {
|
||
$num = 0;
|
||
echo '<div class="control-group" style="padding-top: 0;padding-bottom: 0;"><div class="switch__filter button-row" style="padding-top:20px;margin-right:10px;"><div class="form-search__main-label small-label"><span>Отделка:</span></div>';
|
||
foreach ($decorationTypes as $item) {
|
||
|
||
?>
|
||
<input type="radio" class="hidden--radio" id="field_dt<?php echo $item->id;?>" name="dec_type" value="<?php echo $item->id;?>" <? if (isset($get['dec_type']) && $get['dec_type'] == $item->id) echo "checked"; ?>>
|
||
<div class="selector-button operation_type <?php if(isset($get['dec_type']) && $get['dec_type'] == $item->id) echo "selected"; if ($num == 0) { echo " button-left"; } else { if (($num +1) == count($decorationTypes)) { echo " button-right"; } else { echo " button-center"; }} ?>">
|
||
|
||
<span><?php echo $item->name;?></span>
|
||
|
||
<label for="field_dt<?php echo $item->id;?>" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
<?php
|
||
$num++;
|
||
}
|
||
echo '<div class="clear"></div></div></div>';
|
||
}
|
||
|
||
$num = 0;
|
||
echo '<div class="control-group" style="padding-top: 0;padding-bottom: 0px;"><div class="switch__filter button-row" style="padding-top:20px;margin-right:10px;"><div class="form-search__main-label small-label"><span>Тип:</span></div>';
|
||
foreach ($roomTypes as $item) {
|
||
|
||
?>
|
||
<input type="checkbox" class="hidden--radio" id="field_rt<?php echo $item->id;?>" name="obj_type[]" value="<?php echo $item->id;?>" <? if (isset($get['obj_type']) && in_array($item->id, $get['obj_type'])) echo "checked"; ?>>
|
||
<div class="selector-button obj-type <?php if(isset($get['obj_type']) && in_array($item->id, $get['obj_type'])) echo "selected"; if ($num == 0) { echo " button-left"; } else { if (($num +1) == count($roomTypes)) { echo " button-right"; } else { echo " button-center"; }} ?>">
|
||
|
||
<span><?php echo $item->name;?></span>
|
||
|
||
<label for="field_rt<?php echo $item->id;?>" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
<?php
|
||
$num++;
|
||
}
|
||
echo '<div class="clear"></div></div></div>';
|
||
?>
|
||
<div class="control-group" style="padding-top: 25px; padding-bottom: 30px;">
|
||
<div class="control">
|
||
<div class="form-search__main-label small-label"><span>Этаж:</span></div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<input type="number" class="text small-input no-mrg-left" min="0" max="100" name="flat_floor_ot" placeholder="от" value="<?php if (isset($get['flat_floor_ot']) && $get['flat_floor_ot']) { echo $get['flat_floor_ot']; } ?>">
|
||
<input type="number" class="text small-input" min="0" max="100" name="flat_floor_do" placeholder="до" value="<?php if (isset($get['flat_floor_do']) && $get['flat_floor_do']) { echo $get['flat_floor_do']; } ?>">
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="control-group last-level" style="margin-top: 0;">
|
||
<input type="hidden" name="hide_form" value="1">
|
||
<input type="hidden" name="blockId" value="<?php echo $block->id; ?>">
|
||
<input type="hidden" name="do_search" value="1">
|
||
<?php if($_SESSION['id'] == 93 || $_SESSION['id'] == 1048) echo '<input type=checkbox name=dev value=1> debug'; ?>
|
||
<button id="search" class="button-fl-left big-button" type="submit">Найти</button>
|
||
<div class="load-bar hidden" style="top: auto !important;">
|
||
<div class="bar"></div>
|
||
<div class="bar"></div>
|
||
<div class="bar"></div>
|
||
<div class="load-bar__center">
|
||
<span class="load-bar__loading">Поиск...</span>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</form>
|
||
</div>
|
||
<div class="jw__NB">
|
||
<div style="padding-left: 35px;font-size: 18px; font-weight: bold;">
|
||
<a href="/newbuildings.php<?php if (isset($_SESSION['lastNewbuildingsSearchUrl'])) { echo "?" . $_SESSION['lastNewbuildingsSearchUrl']; }?>">Вернуться к списку комплексов</a>
|
||
</div>
|
||
<div class="jw__NB__flat-list">
|
||
<table>
|
||
<?php
|
||
|
||
$kol_on_page = 20;
|
||
|
||
$vsego = Apartment::count($block->id,
|
||
isset($get['obj_type']) ? $get['obj_type'] : [],
|
||
isset($get['dec_type']) ? $get['dec_type'] : null,
|
||
isset($get['period']) ? $get['period'] : null,
|
||
isset($get['stoim_ot']) ? $get['stoim_ot'] : null,
|
||
isset($get['stoim_do']) ? $get['stoim_do'] : null,
|
||
isset($get['sq_all_ot']) ? $get['sq_all_ot'] : null,
|
||
isset($get['sq_all_do']) ? $get['sq_all_do'] : null,
|
||
isset($get['flat_floor_ot']) ? $get['flat_floor_ot'] : null,
|
||
isset($get['flat_floor_do']) ? $get['flat_floor_do'] : null
|
||
);
|
||
|
||
$all_pages = ceil($vsego/$kol_on_page);
|
||
|
||
if(isset($_GET['page'])) {
|
||
$page = $_GET['page'];
|
||
} else {
|
||
$page = 1;
|
||
}
|
||
|
||
$ot = ($page-1)*$kol_on_page;
|
||
|
||
if($vsego > 0) {
|
||
|
||
$sql = "SELECT a.*, b.number as building_number, b.corp as building_corp, b.floors as building_floors,
|
||
b.deadline as building_deadline, b.line as building_line,
|
||
r.name as room_type_name, d.name as decoration_type_name FROM apartments a, buildings b, room_types r, decoration_types d ";
|
||
// $wherePart = "WHERE a.block_id = '" . $block->id . "' ";
|
||
$wherePart = "WHERE d.id = a.decoration_id AND b.id = a.building_id AND r.id = a.room_type_id AND a.block_id = '" . $block->id . "' ";
|
||
|
||
if (isset($get['type']) && $get['type']) {
|
||
$wherePart = $wherePart . " AND a.room_type_id in (" . implode(",", $get['type']) . ")";
|
||
}
|
||
|
||
if (isset($get['obj_type']) && $get['obj_type']) {
|
||
$wherePart = $wherePart . " AND a.room_type_id in (" . implode(",", $get['obj_type']) . ")";
|
||
}
|
||
|
||
if (isset($get['dec_type']) && $get['dec_type']) {
|
||
$wherePart = $wherePart . " AND a.decoration_id = " . $get['dec_type'] . "";
|
||
}
|
||
|
||
if (isset($get['stoim_ot']) && $get['stoim_ot']) {
|
||
$stoim_ot = intval(str_replace(' ', '', $get['stoim_ot']));
|
||
$wherePart = $wherePart . " AND price >= " . $stoim_ot . "";
|
||
}
|
||
if (isset($get['stoim_do']) && $get['stoim_do']) {
|
||
$stoim_do = intval(str_replace(' ', '', $get['stoim_do']));
|
||
$wherePart = $wherePart . " AND price <= " . $stoim_do . "";
|
||
}
|
||
if (isset($get['sq_all_ot']) && $get['sq_all_ot']) {
|
||
$wherePart = $wherePart . " AND space_total >= " . $get['sq_all_ot'] . "";
|
||
}
|
||
if (isset($get['sq_all_do']) && $get['sq_all_do']) {
|
||
$wherePart = $wherePart . " AND space_total <= " . $get['sq_all_do'] . "";
|
||
}
|
||
if (isset($get['flat_floor_ot']) && $get['flat_floor_ot']) {
|
||
$wherePart = $wherePart . " AND flat_floor >= " . $get['flat_floor_ot'] . "";
|
||
}
|
||
if (isset($get['flat_floor_do']) && $get['flat_floor_do']) {
|
||
$wherePart = $wherePart . " AND flat_floor <= " . $get['flat_floor_do'] . "";
|
||
}
|
||
|
||
if (isset($get['period']) && $get['period'] && $get['period'] > 0) {
|
||
$wherePart .= " AND a.building_id in (select bds.id from buildings bds where UNIX_TIMESTAMP(bds.deadline) <=" . $get['period'] . ") ";
|
||
}
|
||
|
||
$sqlTop = $sql . $wherePart. " ORDER BY a.discount_price LIMIT $ot, $kol_on_page";
|
||
|
||
$rez = mysql_query($sqlTop);
|
||
|
||
if (isset($get['dev'])) {
|
||
echo $sqlTop;
|
||
}
|
||
|
||
$num = 1;
|
||
$objects = [];
|
||
while ($object = mysql_fetch_assoc($rez)) {
|
||
$objects[] = $object;
|
||
}
|
||
|
||
function hasEmptyAll($array, $column) {
|
||
foreach ($array as $subArray) {
|
||
if (!empty($subArray[$column])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
|
||
$showOrderColumn = !hasEmptyAll($objects, 'building_line');
|
||
$showBuildingNumber = !hasEmptyAll($objects, 'building_number');
|
||
// var_dump($showBuildingNumber);
|
||
$firstColSpan = 6;
|
||
if ( $showOrderColumn) {
|
||
$firstColSpan += 1;
|
||
}
|
||
if ( $showBuildingNumber) {
|
||
$firstColSpan += 1;
|
||
}
|
||
}
|
||
?>
|
||
<thead>
|
||
<tr>
|
||
<th colspan="<?php echo $firstColSpan; ?>">Квартиры в комплексе</th>
|
||
<!-- <th colspan="1">Площадь</th>
|
||
<th colspan="2">Стоимость</th> -->
|
||
<th colspan="1"></th>
|
||
<th colspan="1"></th>
|
||
<th colspan="1"></th>
|
||
</tr>
|
||
<tr>
|
||
<th class="flat__pdf">PDF</th>
|
||
<th>Корпус</th>
|
||
<?php if ($showBuildingNumber) { ?>
|
||
<th>Корпус</th>
|
||
<?php }?>
|
||
<th class="flat__srok">Срок сдачи</th>
|
||
<?php if ($showOrderColumn) { ?>
|
||
<th>Очередь</th>
|
||
<?php }?>
|
||
<th class="flat__num">№</th>
|
||
<th class="flat__type">Тип</th>
|
||
<th>Этаж</th>
|
||
<!-- <th>Подъезд</th> -->
|
||
<th class="flat__with-border">Общая Площадь</th>
|
||
<!-- <th>Комнат</th>
|
||
<th>Кухни</th> -->
|
||
<th class="flat__with-border">Стоимость</th>
|
||
<!-- <th>Базовая</th> -->
|
||
<th class="flat__with-border">Отделка</th>
|
||
</tr>
|
||
</thead>
|
||
|
||
<tbody>
|
||
<?php foreach ($objects as $obj) { ?>
|
||
<script>console.log(<?= json_encode($obj) ?> )</script>
|
||
<tr class="flat" data-FlatId="<?php echo $obj['id']; ?>" data-FlatNum="<?php echo $obj['number']; ?>">
|
||
<td class="flat__pdf">
|
||
<input type="checkbox" class="form-control to_send_input" id="to_send<?php echo $obj['id']; ?>">
|
||
<div class="action-button sendPDF to_send_newbuilding <?php if(@in_array($obj['id'],$_SESSION['to_send_newbuilding'])) echo "active"; ?>" id="to_send_button<?php echo $obj['id']; ?>" data-id="<?php echo $obj['id']; ?>">
|
||
<span class="get_pdf" title="К отправке">pdf</span>
|
||
</div>
|
||
</td>
|
||
<?php if ($showBuildingNumber) { ?>
|
||
<td><?php echo $obj['building_number']; ?></td>
|
||
<?php }?>
|
||
<td><?php echo $obj['building_corp']; ?></td>
|
||
<td class="flat__srok"><?php echo Date::getFormatedEndingPeriod($obj['building_deadline']); ?></td>
|
||
<?php if ($showOrderColumn) { ?>
|
||
<td><?php echo $obj['building_line']; ?></td>
|
||
<?php }?>
|
||
<td class="flat__num"><?php echo $obj['number']; ?></td>
|
||
<td class="flat__type"><?php echo $obj['room_type_name']; ?></td>
|
||
<td><?php echo $obj['flat_floor'] . '/ ' . $obj['building_floors']; ?></td>
|
||
<!-- <td><?php echo $obj['section']; ?></td> -->
|
||
<td class="flat__with-border"><?php echo $obj['space_total']; ?></td>
|
||
<!-- <td><?php // if ($obj['space_room']) { echo str_replace("+", " + ", $obj['space_room']); } else { echo $obj['space_room']; } ?></td>
|
||
<td><?php // echo $obj['space_kitchen']; ?></td> -->
|
||
<td style="white-space: nowrap;" class="flat__with-border"><?php echo number_format($obj['discount_price'], 0, ',', ' '); ?></td>
|
||
<!-- <td style="white-space: nowrap;"><?php echo number_format($obj['base_price'], 0, ',', ' ')?></td> -->
|
||
<td class="flat__with-border"><?php echo $obj['decoration_type_name']; ?></td>
|
||
</tr>
|
||
<?php }?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<?php
|
||
|
||
echo '<div class="f-system_pagination" style="margin-top: 15px;"><ul class="pagination">';
|
||
|
||
if($all_pages > 1) {
|
||
num_of_pages($page, $all_pages, $str_url_add);
|
||
}
|
||
|
||
echo '</ul><div class="clear"></div></div>';
|
||
|
||
// echo "<p style=\"font-size: 9px;float: right;padding-right: 10px;\">На портале используется дополненная и переработанная информация из системы ABC недвижимость</p>";
|
||
|
||
?>
|
||
</div>
|
||
|
||
|
||
<div class="full_modal-bg" id="flat__bg" style="display: none;">
|
||
<span class="pseudo-link closer event-modal-closer">
|
||
<i class="ti-close"></i>
|
||
</span>
|
||
<div class="full_modal flat__modal" id="flat" style="display: none;">
|
||
<div class="flat__inner">
|
||
<div class="flat__top">
|
||
<h2 id="flat_modal_title">Квартира №2562</h2>
|
||
<!-- <button class="booking JWbutton button" data-id="" data-FlatNum="" id="bookingWindowButton">Забронировать</button> -->
|
||
<!-- <a class="print button" id="print_newbuilding_link" href="#" target="_blank" style="margin-right: 15px;">Распечатать</a> -->
|
||
<button class="sendPDF button" data-id="" id="to_send_window_button">PDF</button>
|
||
</div>
|
||
<div class="jw-tabs" id="flatModalTabs">
|
||
<ul class="tabs__caption">
|
||
<li><span>Квартира</span></li>
|
||
<li><span>О комплексе</span></li>
|
||
<!-- <li><span>Ипотека</span></li>
|
||
<li><span>Документы</span></li>
|
||
<li><span>Условия покупки</span></li> -->
|
||
</ul>
|
||
<div>
|
||
<div class="tabs__content" style="display: none;" id="flat_info_tab">
|
||
|
||
</div>
|
||
<div class="tabs__content" style="display: block;" id="block_info_tab">
|
||
|
||
</div>
|
||
<!-- <div class="tabs__content" style="display: none;" id="banks_info_tab">
|
||
|
||
</div>
|
||
<div class="tabs__content" style="display: none;" id="docs_info_tab">
|
||
|
||
</div>
|
||
<div class="tabs__content" style="display: none;" id="conditions_info_tab">
|
||
|
||
</div> -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="full_modal-bg" id="flat-booking__bg" style="z-index: 99998; display: none;">
|
||
<span class="pseudo-link closer-flat event-modal-closer"
|
||
style="z-index: 999999" onclick="$('#flat-booking').hide(10); $('#flat-booking__bg').hide(10);">
|
||
<i class="ti-close"></i>
|
||
</span>
|
||
<div class="full_modal flat__modal flat-booking" id="flat-booking" style="display: none;">
|
||
<div class="flat__inner">
|
||
<div class="flat__top">
|
||
<h2 id="flat_booking_modal_title">Бронирование квартиры №2562</h2>
|
||
</div>
|
||
<div class="flat__top" id="reservationObjectDescription" style="border-top: 1px solid #dedede;padding-top: 25px;">
|
||
|
||
</div>
|
||
<div class="flat-booking__form">
|
||
<form method="post" onsubmit="$('#reservationSaveLoader').css('display', 'inline-block'); $('#reservationSaveButton').prop('disabled', true);" enctype="multipart/form-data" action="/ajax/storeReservation.php" target="submit-frame" class="JW-form">
|
||
<div class="form-block" style="padding-top: 14px; color: red;" id="errorBlock">
|
||
</div>
|
||
<h3>Клиент</h3>
|
||
<div class="form-block">
|
||
<div class="label">Фамилия</div>
|
||
<div class="inputs">
|
||
<input type="text" maxlength="30" required class="text required" name="secondname" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Имя</div>
|
||
<div class="inputs">
|
||
<input type="text" maxlength="30" required class="text required" name="firstname" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Отчество</div>
|
||
<div class="inputs">
|
||
<input type="text" maxlength="30" required class="text required" name="surname" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Дата рождения</div>
|
||
<div class="inputs">
|
||
<input type="text" required class="datepicker-here2 text required" id="reservation_birth_date" name="birth_date" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Номер телефона</div>
|
||
<div class="inputs">
|
||
<input type="text" required class="text required phoneMask" name="phone" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<h3>Оплата</h3>
|
||
<div class="form-block">
|
||
<div class="label">Вид</div>
|
||
<div class="inputs">
|
||
<div class="button-row">
|
||
<input type="radio" class="hidden--radio" id="pay_1" name="payment" value="<?php echo Reservation::PAYMENT_FULL_PRICE; ?>" checked>
|
||
<input type="radio" class="hidden--radio" id="pay_2" name="payment" value="<?php echo Reservation::PAYMENT_FULL_SUBSIDY; ?>">
|
||
<input type="radio" class="hidden--radio" id="pay_3" name="payment" value="<?php echo Reservation::PAYMENT_MORTGAGE; ?>">
|
||
<input type="radio" class="hidden--radio" id="pay_4" name="payment" value="<?php echo Reservation::PAYMENT_MILITARY_MORTGAGE; ?>">
|
||
<div class="selector-button button-left pay selected">
|
||
<span>100% стоимости</span>
|
||
<label for="pay_1" class="label-overlay"> </label>
|
||
</div>
|
||
<div class="selector-button button-center pay">
|
||
<span>Рассрочка</span>
|
||
<label for="pay_2" class="label-overlay"> </label>
|
||
</div>
|
||
<div class="selector-button button-center pay">
|
||
<span>Ипотека</span>
|
||
<label for="pay_3" class="label-overlay"> </label>
|
||
</div>
|
||
<div class="selector-button button-right pay">
|
||
<span>Военная ипотека</span>
|
||
<label for="pay_4" class="label-overlay"> </label>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Банк</div>
|
||
<div class="inputs">
|
||
<input type="text" maxlength="1000" class="text" name="bank" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<h3>Паспорт</h3>
|
||
<div class="form-block">
|
||
<div class="label">Серия</div>
|
||
<div class="inputs">
|
||
<input type="text" required class="text required" id="reservation_passport_series" name="passport_series" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Номер</div>
|
||
<div class="inputs">
|
||
<input type="text" required class="text required" id="reservation_passport_num" name="passport_num" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Дата выдачи</div>
|
||
<div class="inputs">
|
||
<input type="text" required class="datepicker-here2 text required" id="reservation_passport_date" name="passport_date" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Кем выдан</div>
|
||
<div class="inputs">
|
||
<input type="text" maxlength="1000" required class="text required" name="passport_place" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Адрес регистрации</div>
|
||
<div class="inputs">
|
||
<input type="text" maxlength="1000" required class="text required" name="passport_address" value="">
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<h3>Изображения паспорта</h3>
|
||
<div class="form-desc">Изображения паспорта можно приложить позже. Начать бронирование можно без них.</div>
|
||
<div class="form-block">
|
||
<div class="label">Главный разворот</div>
|
||
<div>
|
||
<input type="hidden" name="MAX_FILE_SIZE" value="8388608"/>
|
||
<input class="fr-btn steel small" type="file" name="passport_main" accept="image/jpeg,image/jpg,image/png"><span class="form-label">до 8 мб</span>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block">
|
||
<div class="label">Страница прописки</div>
|
||
<div>
|
||
<input class="fr-btn steel small" type="file" name="passport_prop" accept="image/jpeg,image/jpg,image/png"><span class="form-label">до 8 мб</span>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<h3>Дополнительно</h3>
|
||
<div class="form-block">
|
||
<div class="label">Комментарий</div>
|
||
<div class="inputs">
|
||
<textarea class="text" name="info"></textarea>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="form-block form-submit">
|
||
<div class="label"></div>
|
||
<div class="inputs">
|
||
<input type="hidden" id="reservationObjectId" name="object_id" value=""/>
|
||
<button type="submit" class="JWbutton button" id="reservationSaveButton">Забронировать</button>
|
||
<span id="reservationSaveLoader" style="display:none; width: 26px; height: 26px; background:url(/images/ajax_preloader.gif) no-repeat center center; background-size: 26px 26px;"></span>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<iframe name="submit-frame" style="width: 0; height:0;opacity:0;"></iframe>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="f__modal-bg" id="after_reservation_bg" style="display: none;">
|
||
<span class="pseudo-link closer"><i class="ti-close"></i></span>
|
||
<div class="f__modal sign" id="after_reservation" style="display: none;padding-bottom: 0;">
|
||
|
||
<div class="f-col">
|
||
|
||
<div class="f-col-3"> </div>
|
||
|
||
<div class="f-col-6">
|
||
|
||
<div class="bg-danger" style="font-size:1.2em; border-radius:5px; text-align:center;">
|
||
Бронь успешно добавлена. Мы рассмотрим бронь в течение 5 минут, после чего вам перезвонит сотрудник отдела бронирования.
|
||
</div>
|
||
<div style="width:240px; margin:20px auto;text-align: center;"><a href="#" onclick="closeAfterReservation();" class="fr-btn medium-button">Закрыть</a></div>
|
||
</div>
|
||
|
||
<div class="f-col-3"> </div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<script type="text/javascript">
|
||
$('.datepicker-here2').datepicker({
|
||
autoClose: 'true'
|
||
});
|
||
$("#reservation_passport_series").mask("9999");
|
||
$("#reservation_passport_num").mask("999999");
|
||
$("#reservation_passport_date").mask("99.99.9999");
|
||
$("#reservation_birth_date").mask("99.99.9999");
|
||
|
||
function successReservation() {
|
||
hideReservationAndOpenSuccess();
|
||
}
|
||
</script>
|
||
|
||
</div>
|
||
<?php require($_SERVER['DOCUMENT_ROOT']."/templates/footer.php"); ?>
|