4221 lines
256 KiB
PHP
4221 lines
256 KiB
PHP
<script type="text/javascript" src="/js/ajax-form.js"></script>
|
||
|
||
<script type="text/javascript" src="/js/core.js?t=15"></script>
|
||
|
||
<script type="text/javascript" src="/js/subway.js"></script>
|
||
|
||
<script type="text/javascript" src="/js/popup.js"></script>
|
||
|
||
<script type="text/javascript" src="/js/fotorama.js"></script>
|
||
|
||
<script type="text/javascript" src="/js/jquery.multiselect.js"></script>
|
||
|
||
<script type="text/javascript" src="/js/jquery.blockui.js"></script>
|
||
<style>
|
||
.rub_small span:nth-child(1) {
|
||
line-height: 18px;
|
||
}
|
||
|
||
.rub__small-col span:nth-child(1) {
|
||
height: 15px;
|
||
line-height: 17px;
|
||
}
|
||
|
||
|
||
.map-redesign .swiper {
|
||
height: 160px;
|
||
}
|
||
.pagination {
|
||
white-space: nowrap;
|
||
max-width: 450px;
|
||
}
|
||
.grid-list {
|
||
min-width: 777px;
|
||
}
|
||
.haveNotes button.lw-btn-xs {
|
||
color: #e18605;
|
||
border-color: #e18605 !important;
|
||
}
|
||
|
||
.haveNotes button.lw-btn-xs svg {
|
||
fill: #e18605;
|
||
}
|
||
svg.sort-changer[data-direction="asc"] {
|
||
transform: scaleY(-1);
|
||
}
|
||
.map-redesign .card__preview-image.no-photo {
|
||
object-fit: contain;
|
||
border: 1px solid #e8e8e8;
|
||
}
|
||
.source-img {
|
||
width: 25px;
|
||
}
|
||
.map-redesign a {
|
||
text-decoration: none;
|
||
border: 0;
|
||
}
|
||
#objects {
|
||
margin: 0 5px 0 0;
|
||
}
|
||
#map {
|
||
width: 97%;
|
||
height: 654px;
|
||
padding: 0;
|
||
float: left;
|
||
margin: 15px 0 0 15px;
|
||
}
|
||
.map_list_wrap {
|
||
width: 330px;
|
||
height: 654px;
|
||
float: left;
|
||
padding: 0 10px;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
position: absolute;
|
||
right: 0;
|
||
margin-top: 15px;
|
||
}
|
||
.show_form_toggle {
|
||
padding: 20px 0;
|
||
background: #ffffff;
|
||
border-top: 1px solid #dedede;
|
||
border-bottom: 1px solid #dedede;
|
||
/* margin: 30px 35px; */
|
||
text-align: center;
|
||
width: 100%;
|
||
}
|
||
.s__room.item{
|
||
position: relative;
|
||
}
|
||
.jw__layout .main-form{
|
||
margin: 0;
|
||
padding-bottom: 35px;
|
||
border: none ;
|
||
box-shadow: none;
|
||
}
|
||
.filterForm{
|
||
}
|
||
.toggleBtn{
|
||
margin: 20px 0 0 20px;
|
||
width: 100%;
|
||
text-align: left;
|
||
}
|
||
.ui-slider-handle {
|
||
position: absolute;
|
||
width: 39px;
|
||
height: 47px;
|
||
z-index: 22;
|
||
margin-left: -19px;
|
||
top: -8px;
|
||
background: url(../images/fr-slider.png) no-repeat;
|
||
border: none;
|
||
outline: none;
|
||
cursor: pointer;
|
||
background-size: contain;
|
||
}
|
||
.jw__object .fotorama{
|
||
height: auto;
|
||
}
|
||
.jw__object .date{
|
||
float: none;
|
||
}
|
||
.object_wrap {
|
||
padding: 7px 10px;
|
||
border-bottom: 1px solid #f3f3f3;
|
||
font-size: 15px;
|
||
background-color: #FFF;
|
||
-webkit-transition: background-color 0.1s;
|
||
transition: background-color 0.1s;
|
||
margin-bottom: 0;
|
||
/* border: 1px solid #dedede; */
|
||
box-shadow: 0 2px 7px rgba(0, 0, 0, 0.13);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
.jw__object .object-content__actions, .row-menu-obj .object-content__actions {
|
||
padding: 0;
|
||
border-bottom: none;
|
||
}
|
||
.jw__object {
|
||
display: block;
|
||
cursor: default;
|
||
position: relative;
|
||
margin-bottom: 0;
|
||
/* border: 1px solid #dedede; */
|
||
box-shadow: none;
|
||
border-radius: 0;
|
||
}
|
||
.jw__object .address {
|
||
font-size:23px;
|
||
padding-bottom: 9px;
|
||
}
|
||
.jw__object .date {
|
||
font-size:13px;
|
||
}
|
||
.jw__object .object-content__info-row .place {
|
||
width: 100%;
|
||
}
|
||
.jw__object .object-content__info-row .features span{
|
||
font-size: 14px;
|
||
}
|
||
.jw__object .object-content__info-row .features .icons span {
|
||
font-size: 24px;
|
||
}
|
||
.hideFilter {
|
||
display: none;
|
||
position: relative;
|
||
/*overflow-y: auto;*/
|
||
margin-bottom: 40px;
|
||
border: 2px solid rgb(67,160,71);
|
||
}
|
||
.relativeForm{
|
||
width: 100%;
|
||
}
|
||
.relative-wrap{
|
||
border: none;
|
||
background: #fff;
|
||
}
|
||
.form-btn-block{
|
||
right: 10px;
|
||
top: 10px;
|
||
width: 100px;
|
||
position: absolute;
|
||
z-index: 1;
|
||
}
|
||
.form-btn-block a{
|
||
text-decoration: none;
|
||
}
|
||
/* .first-level{
|
||
border-bottom: none;
|
||
}
|
||
.control-group.with-line{
|
||
border-top: none;
|
||
}*/
|
||
.fr-input{
|
||
width: 218px;
|
||
}
|
||
.ms-options-wrap > button:focus, .ms-options-wrap > button,
|
||
.main-form .jw-search__multiple-select{
|
||
width:280px;
|
||
}
|
||
.ti-close.closeForm {
|
||
position: absolute;
|
||
z-index: 100;
|
||
right: 11px;
|
||
font-size: 20px;
|
||
top: 8px;
|
||
}
|
||
.price span {
|
||
margin-right: 6px;
|
||
display: inline-block;
|
||
font-size: 18px;
|
||
font-weight: 600;
|
||
white-space: nowrap;
|
||
}
|
||
.ti-heart{
|
||
float: right;
|
||
margin-right: 10px;
|
||
}
|
||
.info .jw__object{
|
||
padding: 7px 0 0;
|
||
}
|
||
.date.srok span{
|
||
font-size: 14px !important;
|
||
}
|
||
.nazv{
|
||
font-size: 14px !important;
|
||
font-weight: bold;
|
||
padding-bottom: 5px;
|
||
}
|
||
.jw__object .address{
|
||
font-size: 14px;
|
||
padding: 5px 0;
|
||
color: #757575;
|
||
}
|
||
.jw__object .date {
|
||
font-size: 12px;
|
||
color: #757575;
|
||
}
|
||
.jw__object .phone {
|
||
padding: 4px 0px;
|
||
}
|
||
.subway{
|
||
padding: 5px 0;
|
||
}
|
||
.info div{
|
||
cursor: pointer;
|
||
pointer-events: auto;
|
||
}
|
||
.jw__object .fotorama{
|
||
max-width: 310px;
|
||
max-height: 200px;
|
||
}
|
||
.load-bar{
|
||
display: none;
|
||
}
|
||
.jw__action-button{
|
||
position: absolute;
|
||
right: 22px;
|
||
top: 10px;
|
||
}
|
||
.jw__object .action-button {
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
width: 21px;
|
||
height: auto;
|
||
float: right;
|
||
padding: 2px 4px;
|
||
line-height: 16px;
|
||
font-size: 14px;
|
||
text-align: center;
|
||
}
|
||
.jw__object .action-button + .action-button {
|
||
margin-right: 8px;
|
||
}
|
||
.get_pdf{
|
||
font-size: 12px !important;
|
||
}
|
||
.nazv:hover{
|
||
color: blue;
|
||
}
|
||
.name {
|
||
position: relative;
|
||
display: inline-block;
|
||
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
|
||
}
|
||
|
||
/* Tooltip text */
|
||
.name .full_name {
|
||
visibility: hidden;
|
||
width: 120px;
|
||
background-color: black;
|
||
color: #fff;
|
||
text-align: center;
|
||
padding: 5px 0;
|
||
border-radius: 6px;
|
||
|
||
/* Position the tooltip text - see examples below! */
|
||
position: absolute;
|
||
z-index: 1;
|
||
bottom: 100%;
|
||
left: 50%;
|
||
margin-left: -60px; /* Use half of the width (120/2 = 60), to center the tooltip */
|
||
|
||
}
|
||
|
||
/* Show the tooltip text when you mouse over the tooltip container */
|
||
.name:hover .full_name {
|
||
visibility: visible;
|
||
}
|
||
|
||
.jw__layout-content .content-right .inner {
|
||
padding-bottom: 0;
|
||
}
|
||
|
||
|
||
.ti-heart:before {
|
||
content: '';
|
||
display: block;
|
||
background-image: url("/assets/img/heart-icon.svg");
|
||
background-size: contain;
|
||
background-repeat: no-repeat;
|
||
width: 14px;
|
||
height: 14px;
|
||
}
|
||
|
||
.map-redesign .ti-heart.active:before {
|
||
background-image: url("/assets/img/heart-icon-filled.svg");
|
||
}
|
||
|
||
.map-redesign .to_send.active .lw-btn-xs--accent {
|
||
border: 1px solid #0a0303;
|
||
background: -webkit-gradient(linear,left top,left bottom,from(#5b5b5b),to(#3d3d3d));
|
||
background: linear-gradient(180deg,#5b5b5b 0,#3d3d3d 100%);
|
||
}
|
||
|
||
.fw {
|
||
width: 100%;
|
||
}
|
||
.map-redesign [style*="pointer"]:hover, .map-redesign .map-balloon address:hover {
|
||
color: blue;
|
||
}
|
||
.crm__filter-input .fstElement{
|
||
width: 380px;
|
||
}
|
||
</style>
|
||
<script src="/assets/plugins/tinysort.jquery.min.js"></script>
|
||
<script type="text/javascript"
|
||
src="https://api-maps.yandex.ru/2.1/?apikey=692f0a05-cb88-4158-88b9-06bc0dc93004&load=package.standard&lang=ru-RU"></script>
|
||
<?php
|
||
|
||
$get=clearInputData($_GET);
|
||
|
||
$countrySelected = 171;
|
||
if(isset($_GET['country']) && $_GET['country'] != 0) {
|
||
$countrySelected = $_GET['country'];
|
||
}
|
||
|
||
if ($hasRestrictedAccess) {
|
||
// при ограничении доступа не ищем по адресу
|
||
$get['adres'] = null;
|
||
// ищем только по агентам
|
||
$get['ok'] = 'ap';
|
||
}
|
||
|
||
if ($_SESSION['temp_region']) {
|
||
$temp_region = $_SESSION['temp_region'];
|
||
} else {
|
||
$user = new User;
|
||
$user->get($_SESSION['id']);
|
||
$temp_region = $user->region_rf_id;
|
||
}
|
||
|
||
if(!empty($get['region']))
|
||
$temp_region = $get['region'];
|
||
|
||
if (empty($temp_region)) {
|
||
$sql_getRegion = "select rf_regions.* from rf_regions as parent
|
||
join rf_regions on rf_regions.parent = parent.id
|
||
left join users on users.region_rf_id = parent.id
|
||
where users.id = " . $_SESSION['id'] . " ORDER BY id ASC";
|
||
$rezRegion = mysql_query($sql_getRegion);
|
||
$region = [];
|
||
while ($row = mysql_fetch_assoc($rezRegion)) {
|
||
$region[] = $row;
|
||
}
|
||
}
|
||
else {
|
||
$sql_getRegion = "select rf_regions.* from rf_regions as parent
|
||
join rf_regions on rf_regions.parent = parent.id
|
||
where parent.id = " . $temp_region . " ORDER BY id ASC";
|
||
$rezRegion = mysql_query($sql_getRegion);
|
||
$region = [];
|
||
while ($row = mysql_fetch_assoc($rezRegion)) {
|
||
$region[] = $row;
|
||
}
|
||
}
|
||
|
||
if($region[0]['parent'] == 0){
|
||
$citySql = "select rf_regions.* from rf_regions where parent = ". $region[0]['id'] ." order by kladr desc limit 1";
|
||
$rezRegion = mysql_query($citySql);
|
||
$city = [];
|
||
while($row = mysql_fetch_assoc($rezRegion)){
|
||
$city[] = $row;
|
||
}
|
||
}else{
|
||
|
||
$citySql = "select rf_regions.* from rf_regions where parent = ". $region[0]['parent'] ." order by kladr desc limit 1";
|
||
$rezRegion = mysql_query($citySql);
|
||
$city = [];
|
||
while($row = mysql_fetch_assoc($rezRegion)){
|
||
$city[] = $row;
|
||
}
|
||
}
|
||
|
||
if(empty($user_region)){
|
||
$sql_getRegion = "select rf_regions.* from rf_regions
|
||
left join users on users.region_rf_id = rf_regions.id
|
||
where users.id = ".$_SESSION['id']." ORDER BY id ASC";
|
||
$rezRegion = mysql_query($sql_getRegion);
|
||
while($row = mysql_fetch_assoc($rezRegion)){
|
||
$region[] = $row;
|
||
}
|
||
}
|
||
|
||
if(empty($region)){
|
||
$region[0] = array(
|
||
'id' => 47,
|
||
'name' => 'Ленинградская обл',
|
||
'kladr' => '4700000000000',
|
||
'parent' => 94,
|
||
'code' => 47
|
||
);
|
||
$region[1] =array(
|
||
'id' => 78,
|
||
'name' => 'Санкт-Петербург',
|
||
'kladr' => '7800000000000',
|
||
'parent' => 94,
|
||
'code' => 78
|
||
);
|
||
}
|
||
$zoom = 10;
|
||
if(isset($_GET['country']) && $_GET['country'] > 0 && $_GET['country'] != 171){
|
||
$idCountry = $_GET['country'];
|
||
$country = mysql_fetch_assoc(mysql_query("SELECT name FROM country_list WHERE id={$idCountry}"));
|
||
$city[0]['name'] = $country['name'];
|
||
$zoom = 10;
|
||
}
|
||
|
||
if (isset($_GET['renovation']) && $_GET['renovation'] != 0) {
|
||
$renovationSelected = array();
|
||
foreach ($_GET['renovation'] as $v) {
|
||
$renovationSelected[$v] = 1;
|
||
}
|
||
}
|
||
|
||
$agencyId = User::getAgencyIdForUser($_SESSION['id']);
|
||
|
||
if ($agencyId == 15019) {
|
||
$city[0]['name'] = "Набережные Челны";
|
||
}
|
||
|
||
|
||
?>
|
||
<script type="text/javascript">
|
||
$(function() {
|
||
$(window).resize(function () {
|
||
$('.grid-side--map').css('width', '')
|
||
$('.grid-side--map').css('width', `${$('.grid-side--map').outerWidth()}px`)
|
||
})
|
||
$(window).resize()
|
||
});
|
||
ymaps.ready(function () {
|
||
var mapList = $('.grid-list');
|
||
var submitBtn = $('.submit');
|
||
var showRightObject = [];
|
||
var inProgress = false;
|
||
var accessScroll = true;
|
||
var filtered = false;
|
||
|
||
var myMap = new ymaps.Map('map', {
|
||
center: ["62.090416", "129.74362"],
|
||
zoom: 10,
|
||
controls: ['fullscreenControl', 'zoomControl']
|
||
}), // ymaps
|
||
objectManager = new ymaps.ObjectManager({
|
||
clusterize: true,
|
||
// gridSize: 80,
|
||
clusterDisableClickZoom: true,
|
||
clusterOpenBalloonOnClick: false,
|
||
geoObjectOpenBalloonOnClick: false,
|
||
clusterIconColor: "#43a047",
|
||
iconColor: "#43a047"
|
||
});
|
||
objectManager.clusters.options.set({
|
||
clusterIconContentLayout: ymaps.templateLayoutFactory.createClass(
|
||
`<div style="
|
||
background-color: white;
|
||
color: black;
|
||
border: 1px solid #43a047;
|
||
font-size: 14px;
|
||
font-weight: bold;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 32px;
|
||
height: 32px;
|
||
border-radius: 50%;
|
||
box-shadow: 0 0 5px rgba(0,0,0,0.5);">
|
||
{{ properties.geoObjects.length }}
|
||
</div>`
|
||
),
|
||
clusterIconShape: {
|
||
type: 'Circle',
|
||
coordinates: [0, 0],
|
||
radius: 20
|
||
},
|
||
clusterIcons: [{
|
||
href: '',
|
||
size: [40, 40],
|
||
offset: [-20, -20]
|
||
}]
|
||
|
||
});
|
||
objectManager.objects.events.add('click', function (e) {
|
||
window.dontTouch = true
|
||
setTimeout(function () {
|
||
window.dontTouch = false
|
||
}, 1000);
|
||
const objectId = e.get('objectId');
|
||
const obj = objectManager.objects.getById(objectId);
|
||
let objId
|
||
if (obj.properties.balloonContent) {
|
||
objId = obj.properties.balloonContent
|
||
let objectInfo = objectsInfo[objId]
|
||
if (!objectInfo.name) {
|
||
const objId = objectInfo.id;
|
||
const data = $.ajax({
|
||
url: `/ajax/getBaloonJson.php?id=${objId}`,
|
||
async: false,
|
||
}).responseText
|
||
if (data && JSON.parse(data)) {
|
||
let objDataTmp = JSON.parse(data)
|
||
if (objDataTmp.length) {
|
||
objDataTmp = objDataTmp[0]
|
||
objectsInfo[objId] = objDataTmp;
|
||
objectsInfo[objId].id = objId;
|
||
objectInfo = objectsInfo[objId]
|
||
}
|
||
}
|
||
}
|
||
if (!objectInfo.price || !objectInfo.name) {
|
||
obj.properties = {
|
||
hintContent: obj.properties.hintContent,
|
||
balloonContentHeader: obj.properties.balloonContentHeader,
|
||
balloonContentBody: `
|
||
<div class="map-balloon">
|
||
Информация по объекту не найдена
|
||
</div>`
|
||
}
|
||
} else {
|
||
obj.properties = {
|
||
hintContent: obj.properties.hintContent,
|
||
balloonContentHeader: obj.properties.balloonContentHeader,
|
||
balloonContentBody: `
|
||
<div class="map-balloon">
|
||
<img style="cursor: pointer;" onclick="window.open('/object.php?id=${objId}')" class="card__preview-image" src="${objectsInfo[objId].photos[0]}" onerror="$(this).attr('src', placeholderImg)" alt="" width="180">
|
||
<div style="cursor: pointer;" onclick="window.open('/object.php?id=${objId}')" class="map-balloon-content">
|
||
<address>${objectsInfo[objId].address}</address><span class="block">${objectsInfo[objId].price}</span><small>${objectsInfo[objId].name}</small>
|
||
</div>
|
||
</div>`
|
||
};
|
||
}
|
||
}
|
||
if (!objectsInfo[objId] && objId) {
|
||
fillObjData($(`.map-redesign [data-obj-id="${objId}"]`))
|
||
}
|
||
objectManager.objects.balloon.setData(obj);
|
||
objectManager.objects.balloon.open(objectId);
|
||
});
|
||
|
||
objectManager.objects.options.set('iconColor', '#43a047');
|
||
myMap.geoObjects.add(objectManager);
|
||
|
||
var centerCoords = [];
|
||
ymaps.geocode('<?php echo $city[0]['name'] ?>', {
|
||
results: 1
|
||
}).then(function(res) {
|
||
centerCoords = res.geoObjects.get(0).geometry.getCoordinates();
|
||
myMap.setCenter(
|
||
res.geoObjects.get(0).geometry.getCoordinates(),
|
||
<?=$zoom?>
|
||
);
|
||
});
|
||
window.placeholderImg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMTMwcHgiIGhlaWdodD0iMTMwcHgiIHZpZXdCb3g9IjAgMCAyMTcuMjY3IDIxNy4yNjciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIxNy4yNjcgMjE3LjI2NzsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgogICAgICAgICAgICAgICAgICAgIDxnPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTYzLjYyNywxMzguMDU3YzEuOTQsMCwzLjUwNS0xLjU2NCwzLjUwNS0zLjUwNVY4My43NDljMC0xLjkzNy0xLjU2NC0zLjUwNC0zLjUwNS0zLjUwNCAgICBjLTEuOTM3LDAtMy41MDQsMS41NjctMy41MDQsMy41MDR2NTAuODAzQzE2MC4xMjMsMTM2LjQ5MywxNjEuNjksMTM4LjA1NywxNjMuNjI3LDEzOC4wNTd6IiBmaWxsPSIjNTA2OTc5Ii8+CiAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMDguNjMzLDBDNDguNzMsMCwwLDQ4LjczMiwwLDEwOC42MzNjMCwyOS45MzEsMTIuMTY3LDU3LjA3MSwzMS44MTYsNzYuNzM4YzAuMDE0LDAuMDE0LDAuMDE3LDAuMDM0LDAuMDMxLDAuMDQ4ICAgIHMwLjAzMiwwLjAxOCwwLjA0NiwwLjAzMWMxOS42NjYsMTkuNjQ2LDQ2LjgwNywzMS44MTUsNzYuNzQsMzEuODE1YzU5LjkwMSwwLDEwOC42MzQtNDguNzMxLDEwOC42MzQtMTA4LjYzM1MxNjguNTMxLDAsMTA4LjYzMywwICAgIHogTTEwOC42MzMsNy4wMDljMjYuNzU4LDAsNTEuMTIsMTAuNDE2LDY5LjI4NSwyNy4zNzlsLTI2LjkzNiwyNi45MzhINTIuNTY0Yy05LjY2MSwwLTE3LjUyMSw3Ljg2MS0xNy41MjEsMTcuNTIxdjU5LjU3MyAgICBjMCw5LjY2MSw3Ljg2MSwxNy41MjEsMTcuNTIxLDE3LjUyMWgzLjgwNWwtMjEuOTc5LDIxLjk3OEMxNy40MiwxNTkuNzUzLDcuMDA5LDEzNS4zOTQsNy4wMDksMTA4LjYzMyAgICBDNy4wMDksNTIuNTk5LDUyLjU5NSw3LjAwOSwxMDguNjMzLDcuMDA5eiBNODYuMTk2LDEwOC42M2MwLTEyLjM2MywxMC4wNTYtMjIuNDIsMjIuNDE3LTIyLjQyYzQuOTIxLDAsOS40NjYsMS42MTUsMTMuMTcyLDQuMzEzICAgIGwtMS44NzUsMS44NzVjLTMuMjA3LTIuMjQtNy4wOTQtMy41NjQtMTEuMjk3LTMuNTY0Yy0xMC45MTMsMC0xOS43ODksOC44NzktMTkuNzg5LDE5Ljc5MmMwLDQuMTk1LDEuMzIxLDguMDksMy41NTksMTEuMyAgICBsLTEuODc0LDEuODY4Qzg3LjgxMSwxMTguMDk1LDg2LjE5NiwxMTMuNTU0LDg2LjE5NiwxMDguNjN6IE0xMzEuMDM0LDEwOC42M2MwLDEyLjM2NC0xMC4wNTQsMjIuNDE4LTIyLjQxOCwyMi40MTggICAgYy00LjkxNSwwLTkuNDQ5LTEuNjA4LTEzLjE0NS00LjI5OGwxLjg3NC0xLjg3NmMzLjIwMywyLjIzMSw3LjA4MiwzLjU0NiwxMS4yNzQsMy41NDZjMTAuOTEsMCwxOS43OTQtOC44NzcsMTkuNzk0LTE5Ljc5MSAgICBjMC00LjE4Ny0xLjMyMS04LjA3MS0zLjU0OS0xMS4yNzJsMS44NzUtMS44NzVDMTI5LjQzMyw5OS4xODEsMTMxLjAzNCwxMDMuNzE3LDEzMS4wMzQsMTA4LjYzeiBNOTUuODMzLDEwOC42MyAgICBjMC03LjA1MSw1LjczNS0xMi43ODQsMTIuNzgtMTIuNzg0YzIuMjU3LDAsNC4zNDcsMC42MzksNi4xODQsMS42NjhsLTE3LjMwNCwxNy4zMDZDOTYuNDY5LDExMi45NzIsOTUuODMzLDExMC44ODUsOTUuODMzLDEwOC42MyAgICB6IE0xMjEuMzk3LDEwOC42M2MwLDcuMDQ5LTUuNzM1LDEyLjc4Mi0xMi43ODEsMTIuNzgyYy0yLjI0NCwwLTQuMzIyLTAuNjMzLTYuMTU4LTEuNjUybDE3LjI5LTE3LjI4OSAgICBDMTIwLjc2OSwxMDQuMzEsMTIxLjM5NywxMDYuMzgzLDEyMS4zOTcsMTA4LjYzeiBNOTAuNDY3LDEzMS43NTNjNS4wMDUsMy45MzYsMTEuMjk4LDYuMzExLDE4LjE0Niw2LjMxMSAgICBjMTYuMjI5LDAsMjkuNDMxLTEzLjIwNiwyOS40MzEtMjkuNDMxYzAtNi44NDgtMi4zNzUtMTMuMTQxLTYuMzExLTE4LjE0OWwyMi4xNDgtMjIuMTQ2aDEwLjgxNCAgICBjNS43OTcsMCwxMC41MTMsNC43MTcsMTAuNTEzLDEwLjUxM3Y1OS41NzNjMCw1Ljc5Ny00LjcxNiwxMC41MTMtMTAuNTEzLDEwLjUxM0g3My4yODlMOTAuNDY3LDEzMS43NTN6IE0xMjYuNzg0LDg1LjUyMyAgICBjLTUuMDA3LTMuOTQ4LTExLjMxMS02LjMyNi0xOC4xNjgtNi4zMjZjLTE2LjIzLDAtMjkuNDI2LDEzLjIwNC0yOS40MjYsMjkuNDI5YzAsNi44NTgsMi4zNzUsMTMuMTU4LDYuMzIxLDE4LjE3MmwtMjIuMTM2LDIyLjEzNSAgICBINTIuNTYxYy01Ljc5NywwLTEwLjUxMy00LjcxNi0xMC41MTMtMTAuNTE0Vjc4Ljg0N2MwLTUuNzk1LDQuNzE2LTEwLjUxMywxMC41MTMtMTAuNTEzaDkxLjQxM0wxMjYuNzg0LDg1LjUyM3ogTTEwOC42MzMsMjEwLjI1NyAgICBjLTI2Ljc1OSwwLTUxLjEyLTEwLjQxNy02OS4yODctMjcuMzc3bDI2LjkzNC0yNi45MzloOTguNDIyYzkuNjYsMCwxNy41MjEtNy44NiwxNy41MjEtMTcuNTIxVjc4Ljg0NyAgICBjMC05LjY2MS03Ljg2MS0xNy41MjEtMTcuNTIxLTE3LjUyMWgtMy44MDZsMjEuOTc3LTIxLjk3OWMxNi45NjgsMTguMTcsMjcuMzgxLDQyLjUyOSwyNy4zODEsNjkuMjg3ICAgIEMyMTAuMjU4LDE2NC42NjcsMTY0LjY2NywyMTAuMjU3LDEwOC42MzMsMjEwLjI1N3oiIGZpbGw9IiM1MDY5NzkiLz4KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTUzLjAwMiw1NC4zMTdoMjMuNjU0YzEuOTM3LDAsMy41MDQtMS41NjcsMy41MDQtMy41MDRzLTEuNTY3LTMuNTA0LTMuNTA0LTMuNTA0SDUzLjAwMiAgICBjLTEuOTM4LDAtMy41MDQsMS41NjctMy41MDQsMy41MDRTNTEuMDY0LDU0LjMxNyw1My4wMDIsNTQuMzE3eiIgZmlsbD0iIzUwNjk3OSIvPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvc3ZnPg=="
|
||
window.onErrImg = function(node) {
|
||
if ($(node).closest('.swiper-slide').parent().find('.swiper-slide').length === 1) {
|
||
$(node).attr("src", placeholderImg);
|
||
$(node).addClass("no-photo");
|
||
} else {
|
||
$(node).closest('.swiper-slide').remove()
|
||
}
|
||
}
|
||
window.perPage = 30;
|
||
window.page = 1;
|
||
window.fillPaged = function(page = 1) {
|
||
window.page = page
|
||
const direction = $('.sort-changer').attr('data-direction') === "desc" ? 1 : -1
|
||
const sort = $('.sort__btn.active').attr('data-sort')
|
||
objectListFull = objectListFull.sort((a, b) => {
|
||
if (Number(objSortData[a][sort]) > Number(objSortData[b][sort])) {
|
||
return direction
|
||
}
|
||
if (Number(objSortData[a][sort]) < Number(objSortData[b][sort])) {
|
||
return -direction
|
||
}
|
||
return 0
|
||
})
|
||
const toShow = objectListFull.slice((page - 1) * perPage, page * perPage)
|
||
if(objectListFull.length === 0){
|
||
mapList.html('<p style="padding: 12px;">Загрузка...</p>')
|
||
}
|
||
setTimeout(() => {
|
||
let htm = ''
|
||
toShow.forEach((id) => {
|
||
htm = htm + `<div data-obj-id="${id}"></div>`
|
||
})
|
||
mapList.html(htm);
|
||
$('[data-pagenum]').css('font-weight', '');
|
||
$('[data-pagenum]').css('pointer-events', '');
|
||
$(`[data-pagenum="${page}"]`).css('font-weight', 'bold');
|
||
$(`[data-pagenum="${page}"]`).css('pointer-events', 'none');
|
||
getBaloonContent();
|
||
slidersInit()
|
||
}, 10)
|
||
fillPagination()
|
||
}
|
||
|
||
window.fillPagination = function () {
|
||
const pageCount = Math.ceil(objectListFull.length / perPage);
|
||
$('.pagination').html("");
|
||
if (pageCount > 1) {
|
||
$('.pagination').append($(`<span style="display: inline-block; margin-left: 7px;">Страница:</span>`))
|
||
for (let i = 1; i <= pageCount; i++) {
|
||
if (page > 6 && i === 4) {
|
||
if (pageCount > 10) {
|
||
$('.pagination').append($(`<span style="display: inline-block; margin-left: 7px;">...</span>`))
|
||
}
|
||
}
|
||
if (i <= 3 || i >= pageCount - 2 || (i >= page - 2 && i <= page + 2)) {
|
||
$('.pagination').append($(`<a data-pagenum="${i}" style="display: inline-block; margin-left: 7px;${page == i ? 'font-weight: bold; pointer-events: none;' : ''}" href="javascript:fillPaged(${i})">${i}</a>`))
|
||
}
|
||
|
||
if (page <= pageCount - 6 && i === pageCount - 4) {
|
||
if (pageCount > 10) {
|
||
$('.pagination').append($(`<span style="display: inline-block; margin-left: 7px;">...</span>`))
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
function checkVisibleOrCenter(setCenter) {
|
||
if (objectManager && objectManager.objects && objectManager.objects.getLength() > 0) {
|
||
let htm = '';
|
||
showRightObject = [];
|
||
objectListFull = [];
|
||
objectManager.objects.each(function (object) {
|
||
var objectState = objectManager.getObjectState(object.id);
|
||
if (objectState.isShown) {
|
||
if (object.properties.balloonContent && !objectsInfo[object.properties.balloonContent]) {
|
||
objectsInfo[object.properties.balloonContent] = {
|
||
id: object.properties.balloonContent
|
||
}
|
||
}
|
||
objectListFull.push(object.properties.balloonContent)
|
||
}
|
||
});
|
||
slidersRemove()
|
||
if (!objectListFull.length) {
|
||
mapList.html('<p>По вашему запросу ничего не найдено</p>');
|
||
} else {
|
||
fillPagination();
|
||
fillPaged(1);
|
||
setTimeout(getClientsForObjects, 100);
|
||
}
|
||
$('.obj-counter').html(objectListFull.length)
|
||
}
|
||
}
|
||
window.objectsInfo = {}
|
||
window.slidersRemove = function() {
|
||
const mainSliders = document.querySelectorAll('.main-slider');
|
||
if(mainSliders) {
|
||
mainSliders.forEach(slider => {
|
||
if (slider.swiper && slider.swiper.destroy) {
|
||
slider.swiper.destroy()
|
||
}
|
||
});
|
||
}
|
||
}
|
||
window.slidersInit = function() {
|
||
const mainSliders = document.querySelectorAll('.main-slider');
|
||
if(mainSliders) {
|
||
mainSliders.forEach(slider => {
|
||
new Swiper(slider, {
|
||
slidesPerView: 1,
|
||
|
||
spaceBetween: 15,
|
||
|
||
navigation: {
|
||
nextEl: '.main-slider-button-next',
|
||
prevEl: '.main-slider-button-prev',
|
||
},
|
||
});
|
||
});
|
||
}
|
||
}
|
||
window.fillObjData = function(objContainer) {
|
||
let objectInfo = objectsInfo[objContainer.attr("data-obj-id")]
|
||
if (!objectInfo.name) {
|
||
const objId = objectInfo.id;
|
||
const data = $.ajax({
|
||
url: `/ajax/getBaloonJson.php?id=${objId}`,
|
||
async: false,
|
||
}).responseText
|
||
let objDataTmp = JSON.parse(data);
|
||
if (objDataTmp.length) {
|
||
objDataTmp = objDataTmp[0]
|
||
objectsInfo[objId] = objDataTmp;
|
||
objectsInfo[objId].id = objId;
|
||
objectInfo = objectsInfo[objId]
|
||
}
|
||
}
|
||
if (!objectInfo.price || !objectInfo.name) {
|
||
return false
|
||
}
|
||
objectInfo = objectsInfo[objContainer.attr("data-obj-id")]
|
||
if (objContainer.parent().hasClass('grid-list--table')) {
|
||
objContainer.removeClass('card')
|
||
objContainer.addClass('card-horizontal')
|
||
objContainer.attr('data-price', objectInfo.price.replace(/[^0-9]/g,""))
|
||
objContainer.attr('data-date', objectInfo.date_add.split('-').reverse().join(''))
|
||
objContainer.html(`<div class="card-horizontal__content" data-modal-anchor="about">
|
||
<div style="cursor: pointer;" onclick="window.open('/object.php?id=${objectInfo.id}')" class="card-horizontal__content-side card-horizontal__content-side--preview"><img src="${objectInfo.photos[0]}" onerror="$(this).attr('src', placeholderImg)" alt="Фото недоступно" width="76" height="50"><span class="lw-text">${objectInfo.name}</span></div>
|
||
<div class="card-horizontal__content-side card-horizontal__content-side--address">
|
||
<address class="lw-text lw-text--black">${objectInfo.address}</address>
|
||
</div>
|
||
<div class="card-horizontal__content-side card-horizontal__content-side--chars">
|
||
<div class="card-horizontal__content-side-item"><span class="lw-text lw-text--light">${objectInfo.date_add}</span></div>
|
||
` +
|
||
(objectInfo.source_img ? `<div style="cursor: pointer;" class="card-horizontal__content-side-item" onclick="window.open('${objectInfo.source_link}')" style="cursor: pointer;"><img src="${objectInfo.source_img}" alt="${objectInfo.source_name}" width="50"></div>` : '') +
|
||
`
|
||
<div style="text-wrap: nowrap;" class="card-horizontal__content-side-item"><span class="lw-text lw-text--black lw-text--fw-bold">${objectInfo.price}</span></div>
|
||
<div style="font-size: 13px; align-items: center; display: flex; margin-right: 20px; text-wrap: nowrap; font-family: 'Lato', sans-serif; line-height: 1.1"; class="lw-text lw-text--sm lw-text--fw-normal rub__small-col" >${objectInfo.area_price} (м<sup>2</sup>)</div>
|
||
<div class="card-horizontal__content-side-item card-horizontal__content-side-item--column">${objectInfo.owner_type} <a class="lw-text" href="tel:${objectInfo.phone}">${objectInfo.phone}</a></div>
|
||
</div></div>
|
||
<div class="card-horizontal__controls">
|
||
${objectInfo.actions}
|
||
</div>`)
|
||
} else {
|
||
objContainer.addClass('card')
|
||
objContainer.removeClass('card-horizontal')
|
||
objContainer.attr('data-price', objectInfo.price.replace(/[^0-9]/g,""))
|
||
objContainer.attr('data-date', objectInfo.date_add.split('-').reverse().join(''))
|
||
objContainer.html(`<div class="card__row">
|
||
<div class="swiper main-slider">
|
||
<div class="swiper-wrapper">` +
|
||
(objectInfo.photos && objectInfo.photos.map(e => `<div class="swiper-slide"><a class="fw" href="/object.php?id=${objectInfo.id}" target="_blank" data-modal-anchor="about"><img onerror="onErrImg(this)" class="card__preview-image${objectInfo.no_photo ? ' no-photo' : ''}" src="${e}" alt="Фото недоступно" width="280" height="180"></a></div>`).join('')) +
|
||
`</div>
|
||
<div class="main-slider-button-prev swiper-button-prev"></div>
|
||
<div class="main-slider-button-next swiper-button-next"></div>
|
||
</div>
|
||
</div>
|
||
<div class="card__row">
|
||
<div class="card__row-price" style="flex-direction: column; font-size: 15px;">
|
||
<div class="card__row-side" style="display: flex; flex-direction: column; align-items: start;">
|
||
<span style="font-size: 19px;" class="lw-text lw-text--sm lw-text--fw-normal">${objectInfo.price}</span>
|
||
<div style="display: flex; font-family: 'Lato', sans-serif; font-size: 13px;" class="lw-text lw-text--sm lw-text--fw-normal rub_small">${objectInfo.area_price} (м<sup>2</sup>)</div>
|
||
</div>
|
||
</div>
|
||
<div class="card__row-side">
|
||
${objectInfo.actions}
|
||
</div>
|
||
<div class="card__row-side">
|
||
<p class="object_clients" data-oid="${objectInfo.id}"></p>
|
||
</div>
|
||
</div>` +
|
||
(objectInfo.source_img ? `<div class="card__row" style="cursor: pointer;" onclick="window.open('${objectInfo.source_link}')" style="cursor: pointer;"><img class="source-img" src="${objectInfo.source_img}" alt="${objectInfo.source_name}" width="70" height="20"> ${objectInfo.source_name}</div>` : '') +
|
||
`<div class="card__row"><span class="lw-text lw-text--light">${objectInfo.oper_type}</span></div>`+
|
||
(objectInfo.tags ? `<div class="card__row"><span class="lw-text lw-text--light">Теги: </span><span style="margin-left: 5px;">${objectInfo.tags}</span></div>` : '') +
|
||
`<div class="card__row"><span style="cursor: pointer;" onclick="window.open('/object.php?id=${objectInfo.id}')" class="lw-text lw-text--fw-medium">${objectInfo.name}</span></div>` +
|
||
(objectInfo.metro ? `<div class="card__row">${objectInfo.metro}</div>` : '') +
|
||
`<div class="card__row">
|
||
<address class="lw-text lw-text--light">${objectInfo.address}</address>
|
||
</div>
|
||
<div class="card__row"><a class="lw-text" href="tel:${objectInfo.phone}">${objectInfo.phone}</a></div>
|
||
<div class="card__row"><span class="lw-text lw-text--md lw-text--underlined">${objectInfo.owner_type}</span></div>
|
||
<div class="card__row"><span class="lw-text lw-text--xs lw-text--light">${objectInfo.date_add}</span></div>`)
|
||
}
|
||
}
|
||
|
||
window.getBaloonContent = function () {
|
||
const unprocessedObjIds = []
|
||
if ($('.map-redesign [data-obj-id]:empty').length) {
|
||
$('.map-redesign [data-obj-id]:empty').each(function() {
|
||
if (!objectsInfo[$(this).attr('data-obj-id')].name) {
|
||
unprocessedObjIds.push($(this).attr('data-obj-id'))
|
||
}
|
||
})
|
||
if (unprocessedObjIds.length) {
|
||
const data = $.ajax({
|
||
url: `/ajax/getBaloonJson.php?id=${unprocessedObjIds.join(',')}`,
|
||
async: false,
|
||
}).responseText
|
||
JSON.parse(data).forEach((objInfo) => {
|
||
objectsInfo[objInfo.id] = objInfo;
|
||
})
|
||
setTimeout(getClientsForObjects, 100);
|
||
}
|
||
$('.map-redesign [data-obj-id]:empty').each(function() {
|
||
fillObjData($(this))
|
||
})
|
||
}
|
||
}
|
||
window.objectList = []
|
||
window.objectListFull = []
|
||
function sendAjax(filtered){
|
||
accessScroll = true;
|
||
//var filter = filtered ? $('#f-system-search-form').serialize() : 'ok=1&operation_type=<?php $_GET['operation_type'] ?>';
|
||
var centerCoords = [];
|
||
ymaps.geocode('<?php echo $city[0]['name'] ?>', {
|
||
results: 1
|
||
}).then(function(res) {
|
||
centerCoords = res.geoObjects.get(0).geometry.getCoordinates();
|
||
|
||
var bounds = myMap.getBounds();
|
||
var boundsStr = bounds[0][0] + "," + bounds[0][1] + "," + bounds[0][0] + "," + bounds[1][1] + "," + bounds[1][0] + "," + bounds[1][1] + "," + bounds[1][0] + "," + bounds[0][1];
|
||
|
||
//blockUi();
|
||
$.ajax({
|
||
url: "/ajax/filterObjects.php?" + $('#f-system-search-form').serialize() + '¢erLat='+centerCoords[0] + '¢erLon='+centerCoords[1] + "&bounds=" + boundsStr
|
||
}).done(function (data) {
|
||
console.log(data);
|
||
objectManager.removeAll();
|
||
|
||
try {
|
||
if (data.features) {
|
||
data.features.forEach((el) => {
|
||
if (!objSortData[el.properties.balloonContent]) {
|
||
objSortData[el.properties.balloonContent] = el.meta
|
||
}
|
||
})
|
||
}
|
||
console.log(data)
|
||
objectManager.add(data);
|
||
checkVisibleOrCenter();
|
||
} catch (err) {
|
||
$('.load-bar').hide();
|
||
$('.hideFilter').hide();
|
||
$('.btnForm').show();
|
||
$('.btnForm2').hide();
|
||
}
|
||
$('.load-bar').hide();
|
||
$('.hideFilter').hide();
|
||
$('.btnForm').show();
|
||
$('.btnForm2').hide();
|
||
accessScroll = true;
|
||
//unBlockUi();
|
||
});
|
||
});
|
||
}
|
||
|
||
$('.map_list_wrap').scroll(function() {
|
||
if(accessScroll){
|
||
if($('.map_list_wrap').scrollTop() + $('.map_list_wrap').height() >= $('#map_list').height() - 200 && !inProgress) {
|
||
var count = $('.object_wrap').length;
|
||
var countLimit = count + 10;
|
||
|
||
if($('.object_wrap').length == 1) { mapList.html('<ul><li></li></ul>'); }
|
||
for (var i = count; i < countLimit; i++){
|
||
if (showRightObject[i]) {
|
||
accessScroll = false;
|
||
$('<li class="'+ showRightObject[i] +'"></li>').insertAfter($('#map_list ul li:last'));
|
||
}
|
||
}
|
||
getBaloonContent();
|
||
}
|
||
}
|
||
});
|
||
|
||
/*myMap.events.add('mouseup', function (e) {
|
||
sendAjax(filtered);
|
||
});*/
|
||
window.reFresh = function () {
|
||
//mapList.html('<div class="object-content__preloader" style="display: block;"><img src="../images/rocket-spinner.svg" width="96px"></div>')
|
||
accessScroll = true;
|
||
sendAjax();
|
||
}
|
||
//зум
|
||
myMap.events.add('boundschange', function(e){
|
||
if (!window.dontTouch) {
|
||
reFresh()
|
||
}
|
||
});
|
||
window.objSortData = {}
|
||
//клик по кластеру
|
||
objectManager.clusters.events.add('click', function (e) {
|
||
accessScroll = false;
|
||
$('[class*="balloon__close-button"]').click()
|
||
var id = e.get('objectId'),
|
||
// Получим геообъекты внутри кластера.
|
||
cluster = objectManager.clusters.getById(id),
|
||
geoObjects = cluster.properties.geoObjects;
|
||
let htm = '';
|
||
objectListFull = [];
|
||
|
||
geoObjects.forEach(function (object) {
|
||
var objectState = objectManager.getObjectState(object.id);
|
||
if (objectState.isShown) {
|
||
if (object.properties.balloonContent && !objectsInfo[object.properties.balloonContent]) {
|
||
objectsInfo[object.properties.balloonContent] = {
|
||
id: object.properties.balloonContent
|
||
}
|
||
}
|
||
objectListFull.push(object.properties.balloonContent)
|
||
}
|
||
});
|
||
|
||
slidersRemove()
|
||
mapList.html('<p style="padding: 12px;">Загрузка...</p>');
|
||
if (!objectListFull.length) {
|
||
mapList.html('<p>По вашему запросу ничего не найдено</p>');
|
||
} else {
|
||
fillPagination();
|
||
fillPaged(1);
|
||
setTimeout(getClientsForObjects, 100);
|
||
}
|
||
$('.obj-counter').html(objectListFull.length)
|
||
});
|
||
|
||
//клик по объекту
|
||
objectManager.objects.events.add('click', function (e) {
|
||
});
|
||
|
||
$('.load-bar').hide();
|
||
|
||
$('.applyFilter').bind('click',function(){
|
||
objectManager.removeAll();
|
||
$('.main_link').attr('href', '/main.php?' + $('#f-system-search-form').serialize());
|
||
$('.sale_link').attr('h' +
|
||
'ref', '/sale.php?' + $('#f-system-search-form').serialize());
|
||
$('.load-bar').show();
|
||
|
||
sendAjax(true);
|
||
return false;
|
||
});
|
||
<?php
|
||
if(!$hasRestrictedAccess){ ?>
|
||
sendAjax(false);
|
||
<?php } else { ?>
|
||
trialperiod.open();
|
||
<?php } ?>
|
||
|
||
<?php
|
||
$newGet = $_GET;
|
||
if ($newGet['hide_form']) {
|
||
unset($newGet['hide_form']);
|
||
}
|
||
?>
|
||
<?php if($newGet['operation_type'] == 0){ ?>
|
||
$('.main_link').attr('href', '/main.php?<?php echo http_build_query(clearInputData( $newGet)) ?>');
|
||
$('.sale_link').attr('href', '/sale.php');
|
||
<?php } else { ?>
|
||
$('.main_link').attr('href', '/main.php');
|
||
$('.sale_link').attr('href', '/sale.php?<?php echo http_build_query(clearInputData($newGet)) ?>');
|
||
<?php } ?>
|
||
});
|
||
</script>
|
||
<div class="s__room item" id="">
|
||
|
||
<div class="show_form_toggle">
|
||
<button onclick="$('.hideFilter').show(); $('.btnForm2').show();$(this).hide()" class="fr-btn steel btnForm">
|
||
<span>Развернуть форму</span>
|
||
</button>
|
||
<button onclick="$('.hideFilter').hide(); $('.btnForm').show();$(this).hide();" class="fr-btn steel btnForm2" style="display: none">
|
||
<span>Свернуть форму</span>
|
||
</button>
|
||
</div>
|
||
<div style="position:relative">
|
||
<div class="filterForm">
|
||
|
||
<?php
|
||
$action = '';
|
||
switch($_SERVER['SCRIPT_NAME']){
|
||
case '/main.php':
|
||
$action = '/main.php';
|
||
break;
|
||
case '/sale.php':
|
||
$action = '/sale.php';
|
||
break;
|
||
case '/find-objects.php':
|
||
$action = '/find-objects.php';
|
||
break;
|
||
}
|
||
?>
|
||
<form id="f-system-search-form"<?php if(!empty($action)) print(' action="'.$action.'"'); ?> method="get">
|
||
|
||
<?php
|
||
$idCountry = 171;
|
||
if(isset($_GET['country']) && $_GET['country'] > 0){
|
||
$idCountry = (int)$_GET['country'];
|
||
}
|
||
|
||
|
||
$sql = "SELECT * FROM favor WHERE id_user = $_SESSION[id]";
|
||
|
||
$rez = mysql_query($sql);
|
||
|
||
$favor = array();
|
||
|
||
while($f=mysql_fetch_assoc($rez)) $favor[] = $f['id_obj'];
|
||
|
||
$c_favor = count($favor);
|
||
|
||
if($favor) $kol_favor = $c_favor;
|
||
|
||
$sql = "SELECT * FROM views WHERE id_user = $_SESSION[id]";
|
||
|
||
$rez = mysql_query($sql);
|
||
|
||
$view = array();
|
||
|
||
while($f=mysql_fetch_assoc($rez)) $view[] = $f['id_obj'];
|
||
|
||
$c_view = count($view);
|
||
|
||
if($view) $kol_view = $c_view;
|
||
|
||
if(isset($_GET['metro']) && $_GET['metro'] != 0) {
|
||
|
||
$metro = array();
|
||
|
||
foreach($_GET['metro'] as $v) $metro[$v] = 1;
|
||
}
|
||
|
||
include_once($_SERVER['DOCUMENT_ROOT']."/ajax/metromap.php");
|
||
|
||
if (isset($_GET['raion']) && $_GET['raion'] != 0) {
|
||
$rayonSelected = array();
|
||
foreach($_GET['raion'] as $v) {
|
||
$rayonSelected[$v] = 1;
|
||
}
|
||
}
|
||
|
||
$user = new User;
|
||
$user->get($_SESSION['id']);
|
||
$currentUser = $user;
|
||
|
||
if (!isset($user->agencyId)) {
|
||
$user->agencyId = $_SESSION['id'];
|
||
$user->agencyName = $user->agency_name;
|
||
$user->fio = trim($user->last_name . ' ' . $user->first_name . ' ' . $user->middle_name);
|
||
}
|
||
|
||
$db = new MysqlPdo(hstsph, null, null, null, true, '9306');
|
||
|
||
$users_sp = array();
|
||
$sql_usr = "SELECT id FROM `users` WHERE id = $user->agencyId or id_manager = $user->agencyId or id_manager in (select id from users where id_manager = $user->agencyId)";
|
||
|
||
$q_usr = mysql_query($sql_usr);
|
||
$rows = mysql_num_rows($q_usr);
|
||
if ($rows > 0) {
|
||
while ($row = mysql_fetch_assoc($q_usr)) {
|
||
$users_sp[] = $row['id'];
|
||
}
|
||
}
|
||
if (empty($users_sp)) $users_sp[] = $user->agencyId;
|
||
|
||
$objectsFromArch = array();
|
||
// выделение вариантов агентов в архиве, чтоб остальные видели уже взяте в работу варианты
|
||
if (isset($get['ok']) && $get['ok'] == 'arch') {
|
||
$sqlFromArch = "SELECT initial_object_id
|
||
FROM objects, objects_delta
|
||
WHERE archive <> 1 and add_from_archive = 1 and use_in_advert = 0
|
||
and id_add_user > 0 and id_add_user in (" . implode(',', $users_sp) . ") OPTION max_matches=10000000";
|
||
|
||
$rezFromArch = $db->query($sqlFromArch);
|
||
while ($f = $db->fetch_assoc($rezFromArch)) {
|
||
$objectsFromArch[] = $f['initial_object_id'];
|
||
}
|
||
}
|
||
|
||
$needAd = false;
|
||
$sqlForAd = "SELECT id FROM `users` WHERE id in (4, 93, 117, 4251, 5035, 585, 4147, 5350, 5355, 177, 5524, 5530, 5839) or id_manager in (4, 117, 4251, 5035, 585, 4147, 5350, 5355, 177, 5524, 5530, 5839) or id_manager in (select id from users where id_manager in (4, 117, 4251, 5035, 585, 4147, 5350, 5355, 177, 5524, 5530, 5839))";
|
||
$rezForAd = mysql_query($sqlForAd);
|
||
while($userId=mysql_fetch_assoc($rezForAd)) {
|
||
if ($userId['id'] == $_SESSION['id']) {
|
||
$needAd = true;
|
||
break;
|
||
}
|
||
}
|
||
|
||
$r_check_permissions = $user->checkMenuPermissions();
|
||
$searchCompanyOnly = !empty($r_check_permissions['search_company_objects_only']);
|
||
|
||
|
||
if ($searchCompanyOnly) {
|
||
$get['compObj'] = 1;
|
||
$_GET['compObj'] = 1;
|
||
// Если источник не задан — выбираем "Агенты"
|
||
if (!isset($get['ok'])) {
|
||
$get['ok'] = 'ap';
|
||
}
|
||
if (in_array(isset($_GET['ok']) ? $_GET['ok'] : '', ['fr', 'all'])) {
|
||
$_GET['ok'] = 'ap';
|
||
$get['ok'] = 'ap';
|
||
}
|
||
}
|
||
|
||
?>
|
||
<div class="hideFilter">
|
||
<div class="relativeForm">
|
||
<div class="relative-wrap">
|
||
<div class="main-form">
|
||
<div class="control-group first-level">
|
||
<div class="button-row">
|
||
<input type="radio" class="hidden--radio" id="field_op0" name="operation_type" value="0" <?php if($_GET['operation_type']==0) echo "checked"; ?>>
|
||
<input type="radio" class="hidden--radio" id="field_op1" name="operation_type" value="1" <?php if($_GET['operation_type']==1) echo "checked"; ?>>
|
||
<div class="selector-button button-left operation_type <?php if($_GET['operation_type']==0) echo "selected"; ?>">
|
||
<span>Аренда</span><label for="field_op0" class="label-overlay"> </label>
|
||
</div>
|
||
<div class="selector-button button-right operation_type <?php if($_GET['operation_type']==1) echo "selected"; ?>">
|
||
<span>Продажа</span><label for="field_op1" class="label-overlay"> </label>
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
<div class="control-group first-level">
|
||
<div class="button-row">
|
||
|
||
<input type="radio" class="hidden--radio" id="field_0" name="type" value="0" <?php if($_GET['type']==0) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="field_2" name="type" value="2" <?php if($_GET['type']==2) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="field_3" name="type" value="3" <?php if($_GET['type']==3) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="field_1" name="type" value="1" <?php if($_GET['type']==1) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="field_4" name="type" value="4" <?php if($_GET['type']==4) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="field_5" name="type" value="5" <?php if($_GET['type']==5) echo "checked"; ?>>
|
||
|
||
<!-- <input type="radio" class="hidden--radio" id="field_6" name="type" value="6" <?php if($_GET['type']==6) echo "checked"; ?>> -->
|
||
|
||
<input type="radio" class="hidden--radio" id="field_7" name="type" value="7" <?php if($_GET['type']==7) echo "checked"; ?>>
|
||
|
||
<div class="selector-button button-left type <?php if($_GET['type']==1) echo "selected"; ?>">
|
||
|
||
<span>Квартиры</span>
|
||
|
||
<label for="field_1" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-center type <?php if($_GET['type']==2) echo "selected"; ?>">
|
||
|
||
<span>Комнаты</span>
|
||
|
||
<label for="field_2" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-center type <?php if($_GET['type']==4) echo "selected"; ?>">
|
||
|
||
<span>Коммерция</span>
|
||
|
||
<label for="field_4" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-center type <?php if($_GET['type']==3) echo "selected"; ?>">
|
||
|
||
<span>Дома</span>
|
||
|
||
<label for="field_3" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-center type <?php if($_GET['type']==5) echo "selected"; ?>">
|
||
|
||
<span>Части домов</span>
|
||
|
||
<label for="field_5" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<!-- <div class="selector-button button-center type <?php if($_GET['type']==6) echo "selected"; ?>">
|
||
|
||
<span>Комплексы</span>
|
||
|
||
<label for="field_6" class="label-overlay"> </label>
|
||
|
||
</div> -->
|
||
|
||
<div class="selector-button button-right type <?php if($_GET['type']==7) echo "selected"; ?>">
|
||
|
||
<span>Участки</span>
|
||
|
||
<label for="field_7" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
<div class="control-group control-line first-level" id="typeCategoryHouse" <?php if ((($get['ok'] && $get['ok'] == 'archComp') || $_GET['compObj']) && $_GET['type'] == 3) {
|
||
echo 'style="display:block;"';
|
||
} else {
|
||
echo 'style="display:none;"';
|
||
} ?>>
|
||
|
||
<h2>Тип дома</h2>
|
||
|
||
<div class="button-row">
|
||
<?php
|
||
$arr_house_category = array();
|
||
|
||
if ($get['house_category'] && is_array($get['house_category'])) {
|
||
$arr_house_category = $get['house_category'];
|
||
}
|
||
$sql_house = "SELECT * FROM house_category";
|
||
$q_house = mysql_query($sql_house);
|
||
$rows_house = mysql_num_rows($q_house);
|
||
$arr_house = array();
|
||
while($r_house = mysql_fetch_assoc($q_house)){
|
||
$arr_house[] = $r_house;
|
||
?>
|
||
<input type="checkbox" class="hidden--radio" id="house_category_<?=$r_house['id']?>" name="house_category[]" value="<?=$r_house['id']?>" <? if (in_array($r_house['id'], $arr_house_category)) echo "checked"; ?>>
|
||
<?php
|
||
}
|
||
|
||
$i=0;
|
||
|
||
foreach($arr_house as $h){
|
||
$button_class = 'button-center';
|
||
if($i == 0){
|
||
$button_class = 'button-left';
|
||
} else if($i == ($rows_house-1)){
|
||
$button_class = 'button-right';
|
||
}
|
||
?>
|
||
<div data-id="<?= $h['id'] ?>" class="selector-button <?=$button_class?> houseCategory <? if (in_array($h['id'], $arr_house_category)) echo "selected"; ?>">
|
||
<span><?=$h['name']?></span>
|
||
<label for="house_category_<?=$h['id']?>" class="label-overlay"> </label>
|
||
</div>
|
||
<?php
|
||
$i++;
|
||
}
|
||
?>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="control-group control-line first-level" id="typeCategoryBlock" <?php if($_GET['type'] == 4) { echo 'style="display:block;"'; } else { echo 'style="display:none;"'; } ?>>
|
||
|
||
<h2>Категория помещения</h2>
|
||
|
||
<div class="button-row">
|
||
|
||
|
||
<?php
|
||
$sql_commercial_object = "SELECT * FROM commercial_object limit 5";
|
||
$q_commercial_object = mysql_query($sql_commercial_object);
|
||
$rows_commercial_object = mysql_num_rows($q_commercial_object);
|
||
$arr_commercial_object = array();
|
||
while($r_commercial_object = mysql_fetch_assoc($q_commercial_object)){
|
||
$arr_commercial_object[] = $r_commercial_object;
|
||
?>
|
||
<!--<input type="radio" class="hidden--radio commercial_object_input" id="commercial_object_<?=$r_commercial_object['id']?>" name="commercial_object_id" value="<?=$r_commercial_object['id']?>" <? if ((isset($post) && $post['commercial_object_id']==$r_commercial_object['id']) || (isset($obj) && $obj['commercial_object_id']==$r_commercial_object['id'])) echo "checked"; ?>>-->
|
||
<input type="checkbox" class="hidden--radio commercial_object_input" id="typeCategory_<?=$r_commercial_object['id']?>" name="typeCategory[]" value="<?=$r_commercial_object['id']?>" <?php if (in_array($r_commercial_object['id'], ($get['typeCategory'] ? $get['typeCategory'] : []))) echo "checked"; ?>>
|
||
<?php
|
||
}
|
||
|
||
$i=0;
|
||
|
||
foreach($arr_commercial_object as $h){
|
||
$button_class = 'button-center';
|
||
if($i == 0){
|
||
$button_class = 'button-left';
|
||
} else if($i == ($rows_house-1)){
|
||
$button_class = 'button-right';
|
||
}
|
||
?>
|
||
<!--<div data-id="<?=$h['id']?>" class="selector-button <?=$button_class?> commercial_object commercial_object_id<?=$h['id']?> <? if ((isset($post) && $post['commercial_object_id']==$h['id']) || (isset($obj) && $obj['commercial_object_id']==$h['id'])) echo "selected"; ?>">
|
||
<span><?=$h['name']?></span>
|
||
<label for="commercial_object_<?=$h['id']?>" class="label-overlay"> </label>
|
||
</div>-->
|
||
<div data-id="<?=$h['id']?>" id="type_category_<?=$h['id']?>" class="selector-button <?=$button_class?> typeCategory <?php if(in_array($h['id'], ($get['typeCategory'] ? $get['typeCategory'] : []))) echo "selected"; ?>">
|
||
|
||
<span><?=$h['name']?></span>
|
||
|
||
<label for="typeCategory_<?=$h['id']?>" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
<?php
|
||
$i++;
|
||
}
|
||
?>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
<div style="margin-top: 20px;" class="button-row">
|
||
<?php
|
||
$sql_commercial_object = "SELECT * FROM commercial_object limit 5,5";
|
||
$q_commercial_object = mysql_query($sql_commercial_object);
|
||
$rows_commercial_object = mysql_num_rows($q_commercial_object);
|
||
$arr_commercial_object = array();
|
||
while($r_commercial_object = mysql_fetch_assoc($q_commercial_object)){
|
||
$arr_commercial_object[] = $r_commercial_object;
|
||
?>
|
||
<input type="checkbox" class="hidden--radio commercial_object_input" id="typeCategory_<?=$r_commercial_object['id']?>" name="typeCategory[]" value="<?=$r_commercial_object['id']?>" <?php if (in_array($r_commercial_object['id'], ($get['typeCategory'] ? $get['typeCategory'] : []))) echo "checked"; ?>>
|
||
<?php
|
||
}
|
||
|
||
$i=0;
|
||
|
||
foreach($arr_commercial_object as $h){
|
||
$button_class = 'button-center';
|
||
if($i == 0){
|
||
$button_class = 'button-left';
|
||
} else if($i == ($rows_house-1)){
|
||
$button_class = 'button-right';
|
||
}
|
||
?>
|
||
<div data-id="<?=$h['id']?>" id="type_category_<?=$h['id']?>" class="selector-button <?=$button_class?> typeCategory <?php if (in_array($h['id'], ($get['typeCategory'] ? $get['typeCategory'] : []))) echo "selected"; ?>">
|
||
|
||
|
||
<span><?=$h['name']?></span>
|
||
|
||
<label for="typeCategory_<?=$h['id']?>" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
<?php
|
||
$i++;
|
||
}
|
||
?>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="control-group control-line">
|
||
|
||
<h2>Основная информация</h2>
|
||
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Цена:</span>
|
||
|
||
</div>
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group" style="display: flex">
|
||
|
||
<div class="fr-input fr-price">
|
||
<input type="text" id="stoim_ot" class="text price medium-input no-mrg-left money" name="stoim_ot" placeholder="от" value="<?php echo $get['stoim_ot']; ?>">
|
||
<div class="fr-ui-slider slider1" id="e-form-slider"></div>
|
||
</div>
|
||
|
||
<div class="fr-input fr-price">
|
||
<input type="text" id="stoim_do" class="text price medium-input money" name="stoim_do" placeholder="до" value="<?php echo $get['stoim_do']; ?>">
|
||
<div class="fr-ui-slider slider2" id="e-form-slider"></div>
|
||
</div>
|
||
|
||
<span class="form-label with-pad" style="line-height: 40px; margin-right: 15px;">руб.</span>
|
||
<div class="checkbox" style="margin: 0">
|
||
<input name="use_area_price" id="use_area_price_map" type="checkbox" value="1" <?php if($_GET['use_area_price']) echo "checked"; ?>>
|
||
<label for="use_area_price_map"><span style="display: block; width: max-content">Цена за квадратный метр</span></label>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
|
||
<div class="num-of-rooms" <?php if($_GET['type'] == 4) echo "style='display:none'"; ?>>
|
||
|
||
<div class="form-search__main-label small-label"><span id="komnat"><?php if($_GET['type'] == 2) echo "Всего комнат в квартире:"; else echo "Комнат:"; ?></span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" <?php if($_GET['type'] != 2) echo "style='display:none'"; ?> class="number text small-input rooms" min="0" max="50" name="komn_do" placeholder="до" value="<?php echo $get['komn_do']; ?>">
|
||
|
||
<table class="table-of-rooms" <?php if($_GET['type'] == 2) echo "style='display:none'"; ?>>
|
||
<tr>
|
||
<td>
|
||
<div id="rn1" class="___1" style="padding: 6px 35px;margin-right: 5px;" data-active="<?php if (isset($get['rn1']) && $get['rn1'] == 1) { echo "1"; } else { echo "0"; }; ?>">
|
||
<p>1</p>
|
||
</div>
|
||
<input type="hidden" value="<?php if (isset($get['rn1']) && $get['rn1'] == 1) { echo "1"; } else { echo "0"; }; ?>" name="rn1">
|
||
</td>
|
||
<td>
|
||
<div id="rn2" class="___1" style="padding: 6px 35px;margin-right: 5px;" data-active="<?php if (isset($get['rn2']) && $get['rn2'] == 1) { echo "1"; } else { echo "0"; }; ?>">
|
||
<p>2</p>
|
||
</div>
|
||
<input type="hidden" value="<?php if (isset($get['rn2']) && $get['rn2'] == 1) { echo "1"; } else { echo "0"; }; ?>" name="rn2">
|
||
</td>
|
||
<td>
|
||
<div id="rn3" class="___1" style="padding: 6px 35px;margin-right: 5px;" data-active="<?php if (isset($get['rn3']) && $get['rn3'] == 1) { echo "1"; } else { echo "0"; }; ?>">
|
||
<p>3</p>
|
||
</div>
|
||
<input type="hidden" value="<?php if (isset($get['rn3']) && $get['rn3'] == 1) { echo "1"; } else { echo "0"; }; ?>" name="rn3">
|
||
</td>
|
||
<td>
|
||
<div id="rn4" class="___1" style="padding: 6px 35px;margin-right: 5px;" data-active="<?php if (isset($get['rn4']) && $get['rn4'] == 1) { echo "1"; } else { echo "0"; }; ?>">
|
||
<p>4+</p>
|
||
</div>
|
||
<input type="hidden" value="<?php if (isset($get['rn4']) && $get['rn4'] == 1) { echo "1"; } else { echo "0"; }; ?>" name="rn4">
|
||
</td>
|
||
<td>
|
||
<div id="rnStudio" class="___1" style="padding: 6px 35px;margin-right: 5px;" data-active="<?php if (isset($get['rnStudio']) && $get['rnStudio'] == 1) { echo "1"; } else { echo "0"; }; ?>">
|
||
<p>Студия</p>
|
||
</div>
|
||
<input type="hidden" value="<?php if (isset($get['rnStudio']) && $get['rnStudio'] == 1) { echo "1"; } else { echo "0"; }; ?>" name="rnStudio">
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
|
||
<div class="sq-all">
|
||
|
||
<div class="form-search__main-label small-label"><span id="sq_all_name"><? if ($_GET['type'] == 2) echo "Общая комнаты"; echo "Общая площадь"; ?></span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input rooms no-mrg-left" min="0" max="1000000" name="sq_all_ot" placeholder="от" value="<?php echo $get['sq_all_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input rooms" min="0" max="1000000" name="sq_all_do" placeholder="до" value="<?php echo $get['sq_all_do']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
|
||
<div class="sq-land-all" <?php if ($_GET['type'] != 3 && $_GET['type'] != 5) echo "style='display:none'"; ?>>
|
||
|
||
<div class="form-search__main-label small-label"><span id="sq_land_name">Площадь участка</span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input rooms no-mrg-left" min="0" max="1000000" name="sq_land_ot" placeholder="от" value="<?php echo $get['sq_land_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input rooms" min="0" max="1000000" name="sq_land_do" placeholder="до" value="<?php echo $get['sq_land_do']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
<div class="year_form" <? if ($_GET['operation_type'] == 0) echo "style='display:none'"; ?>>
|
||
|
||
<div class="form-search__main-label small-label"><span>Год постройки:</span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input etazh no-mrg-left" name="year_ot" placeholder="от" value="<?php echo $get['year_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input etazh" name="year_do" placeholder="до" value="<?php echo $get['year_do']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- здесь мы страну уберем так как она появится ниже вместе с регионом -->
|
||
<!-- <div class="control-group control-line">
|
||
|
||
<div class="form-search__main-label medium-label">
|
||
<span>Страна</span>
|
||
</div>
|
||
<br>
|
||
<div class="inputs-group">
|
||
<div style="margin-top: 20px;">
|
||
<div class="state control search-for-sources-map">
|
||
<div class="state-group">
|
||
<div class="jw-search__multiple-select search-for-sources-button">
|
||
<select name="country" id="country_select_search" class="country">
|
||
<?php
|
||
$sql="select * from country_list where id=171 union select * from country_list where id <> 171";
|
||
$rez=mysql_query($sql);
|
||
while($countryList=mysql_fetch_assoc($rez)) {
|
||
if ($countrySelected == $countryList['id']) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$countryList[id]' $sl>$countryList[name]</option>";
|
||
}
|
||
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div> -->
|
||
|
||
<br>
|
||
<br>
|
||
|
||
<div class="form-search__main-label medium-label form-search-maps">
|
||
<span>Поиск по площадке</span>
|
||
</div>
|
||
<br>
|
||
<div class="inputs-group">
|
||
<div class="control-group control-line new" id="sources_select_search">
|
||
<div class="state control search-for-sources-map">
|
||
<div class="state-group">
|
||
<div class="jw-search__multiple-select search-for-sources-button">
|
||
<select id="id_sourse-links" name="ads_source[]" multiple="multiple" class="sources-links search-for-sources-button-wrap">
|
||
<? $ads_sources = array(
|
||
3 => "Яндекс",
|
||
1 => "Авито",
|
||
4 => "Циан",
|
||
6 => "Юла",
|
||
5 => "SOB.RU",
|
||
10 => "Моя реклама",
|
||
11 => "Домклик",
|
||
);
|
||
foreach($ads_sources as $key => $val) {
|
||
$sl = "";
|
||
|
||
if (isset($ads_sourceSelected[$key])) {
|
||
$sl = "selected";
|
||
}
|
||
echo "<option value='$key' id='sourses--$key' $sl>$val</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
<button id="sources-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
<div class="etazh_form" <? if (!isset($_GET['operation_type']) || $_GET['operation_type'] == 0 || $_GET['type'] == 4 || ($_GET['operation_type'] == 1 && (!isset($get['ok']) || $get['ok'] !== 'ap'))) echo "style='display:none'"; ?>>
|
||
|
||
<div class="form-search__main-label small-label"><span>Этаж:</span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input etazh no-mrg-left" min="0" max="100" name="e_ot" placeholder="от" value="<?php echo $get['etazh_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input etazh" min="0" max="100" name="e_do" placeholder="до" value="<?php echo $get['etazh_do']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
<div class="etazh_not_first" <? if ($_GET['type'] != 1 && $_GET['type'] != 2) echo "style='display:none'"; ?>>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="checkbox">
|
||
|
||
<input name="etazh_not_first" id="etazh_not_first" type="checkbox" value="1" <?php if($_GET['etazh_not_first']) echo "checked"; ?>>
|
||
|
||
<label for="etazh_not_first">Не первый этаж</label>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
<div class="etazh_not_last" <? if ($_GET['type'] != 1 && $_GET['type'] != 2) echo "style='display:none'"; ?>>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="checkbox">
|
||
|
||
<input name="etazh_not_last" id="etazh_not_last" type="checkbox" value="1" <?php if($_GET['etazh_not_last']) echo "checked"; ?>>
|
||
|
||
<label for="etazh_not_last">Не последний этаж</label>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
|
||
<div class="sq-live" <? if (!isset($_GET['operation_type']) || $_GET['operation_type'] == 0 || ($_GET['operation_type'] == 1 && (!isset($get['ok']) || $get['ok'] !== 'ap'))) echo "style='display:none'"; ?>>
|
||
|
||
<div class="form-search__main-label small-label"><span>Жилая площадь:</span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input rooms no-mrg-left" min="0" max="1000" name="sq_live_ot" placeholder="от" value="<?php echo $get['sq_live_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input rooms" min="0" max="1000" name="sq_live_do" placeholder="до" value="<?php echo $get['sq_live_do']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line">
|
||
|
||
<div class="sq-kitch" <? if (!isset($_GET['operation_type']) || $_GET['operation_type'] == 0 || ($_GET['operation_type'] == 1 && (!isset($get['ok']) || $get['ok'] !== 'ap'))) echo "style='display:none'"; ?>>
|
||
|
||
<div class="form-search__main-label small-label"><span>Площадь кухни:</span></div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input rooms no-mrg-left" min="0" max="1000" name="sq_kitch_ot" placeholder="от" value="<?php echo $get['sq_kitch_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input rooms" min="0" max="1000" name="sq_kitch_do" placeholder="до" value="<?php echo $get['sq_kitch_do']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<div style="display:<?=($_GET['type']==1 || $_GET['type'] == 3) ? '' : 'none'?>" class="control-group control-line new" id="renovation_select_search">
|
||
|
||
|
||
<div class="state control">
|
||
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Ремонт:</span>
|
||
|
||
</div>
|
||
|
||
<div class="state-group">
|
||
<div class="jw-search__multiple-select">
|
||
<select name="renovation[]" multiple="multiple" class="ms-renovation">
|
||
<?php
|
||
$sql = "select * from renovation";
|
||
$rez = mysql_query($sql);
|
||
|
||
while ($renovation = mysql_fetch_assoc($rez)) {
|
||
if (isset($renovationSelected[$renovation['id']])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$renovation[id]' $sl>$renovation[name]</option>";
|
||
}
|
||
|
||
?>
|
||
</select>
|
||
<button id="renovation-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
|
||
<div class="control-group control-line with-line srok-block" <? if ($_GET['operation_type'] == 1) echo "style='display:none'"; ?>>
|
||
|
||
<h2>Срок</h2>
|
||
|
||
<div class="button-row">
|
||
|
||
<input type="radio" class="hidden--radio" id="srok_1" name="srok" value="1" <?php if($get['srok']==1) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="srok_2" name="srok" value="2" <?php if($get['srok']==2 or !$get['srok']) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="srok_3" name="srok" value="3" <?php if($get['srok']==3) echo "checked"; ?>>
|
||
|
||
<div class="selector-button button-left srok <?php if($get['srok']==2 or !$get['srok']) echo "selected"; ?>">
|
||
|
||
<span>Длительно</span>
|
||
|
||
<label for="srok_2" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-center srok <?php if($get['srok']==3) echo "selected"; ?>">
|
||
|
||
<span>Несколько месяцев</span>
|
||
|
||
<label for="srok_3" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-right srok <?php if($get['srok']==1) echo "selected"; ?>">
|
||
|
||
<span>Посуточно</span>
|
||
|
||
<label for="srok_1" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
<div class="control-groups half-size house-prop" <? if (!isset($_GET['operation_type']) || $_GET['operation_type'] == 0 || $_GET['type'] ==4 || ($_GET['operation_type'] == 1 && (!isset($get['ok']) || $get['ok'] !== 'ap'))) echo "style='display:none'"; ?>>
|
||
|
||
<div class="control-group control-line with-line">
|
||
|
||
<h2>Дом</h2>
|
||
|
||
<div class="house-type">
|
||
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Тип:</span>
|
||
|
||
</div>
|
||
|
||
<div class="house-type-group">
|
||
|
||
<select name="house_type">
|
||
<option value='-1'></option>
|
||
<?php
|
||
$sql="SELECT * FROM house_type ORDER BY name";
|
||
$rez=mysql_query($sql);
|
||
while($houseType=mysql_fetch_assoc($rez))
|
||
{
|
||
if($get['house_type'] == $houseType['id']) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$houseType[id]' $sl>$houseType[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
|
||
<div class="house-year">
|
||
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Год постройки до:</span>
|
||
|
||
</div>
|
||
|
||
<div class="house-year-group">
|
||
|
||
<input type="number" class="number text small-input house-year-inp " min="1600" max="3000" name="house_year" value="<?php echo $get['house_year']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<div class="control-groups half-size credit-line" <? if (!isset($_GET['operation_type']) || $_GET['operation_type'] == 0 || ($_GET['operation_type'] == 1 && (!isset($get['ok']) || $get['ok'] !== 'ap'))) echo "style='display:none'"; ?>>
|
||
|
||
<div class="control-group control-line with-line checkboxes">
|
||
|
||
<h2> </h2>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="checkbox">
|
||
|
||
<input name="credit" id="credit" type="checkbox" value="1" <?php if($_GET['credit']) echo "checked"; ?>>
|
||
|
||
<label for="credit">Возможна ипотека</label>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
<div class="control-groups half-size">
|
||
<div class="control-group control-line with-line new">
|
||
|
||
<h2>Место</h2>
|
||
<!-- <input type="hidden" name="parent_region" value="<?php echo $region[1]['parent'] ?>"> -->
|
||
<!-- <input type="hidden" name="region_type" value="<?php echo $region[1]['id'] ?>"> -->
|
||
|
||
<div class="state control">
|
||
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Страна:</span>
|
||
|
||
</div>
|
||
|
||
<div class="state-group">
|
||
<div class="jw-search__multiple-select">
|
||
<select name="country" id="country_select_search" class="country">
|
||
<?php
|
||
$sql = "select * from country_list where id=171 union select * from country_list where id <> 171";
|
||
$rez = mysql_query($sql);
|
||
while ($countryList = mysql_fetch_assoc($rez)) {
|
||
if ($countrySelected == $countryList['id']) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$countryList[id]' $sl>$countryList[name]</option>";
|
||
}
|
||
|
||
?>
|
||
</select>
|
||
<!--<button id="country-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>-->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="control-group control-line new" id="region_select_search_group" style="display:<?= ($countrySelected != 171) ? 'none' : 'inherit' ?>">
|
||
<div class="state control">
|
||
<div class="form-search__main-label small-label">
|
||
<span>Регион:</span>
|
||
</div>
|
||
|
||
<div class="state-group">
|
||
|
||
<div class="jw-search__multiple-select">
|
||
|
||
<select class="text" id="region_select_search" name="region" required>
|
||
<?php
|
||
$region_rf = mysql_query("select * from rf_regions where parent = 0");
|
||
$test_region = (!empty($_GET['region']))?(int)$_GET['region']:$temp_region;
|
||
while($dealType = mysql_fetch_assoc($region_rf)) {
|
||
?>
|
||
<option value="<?=$dealType['id']?>" <?php if($dealType['id'] == $test_region) echo "selected";?>>
|
||
<?=$dealType['name']?>
|
||
</option>
|
||
<?php } ?>
|
||
</select>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
|
||
<div class="control-group control-line new" id="rayon_select_search" style="display:<?= ($countrySelected != 171) ? 'none' : '' ?>">
|
||
|
||
<?php if ($region[1]['code'] == 78) : ?>
|
||
<div class="state control">
|
||
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Район:</span>
|
||
|
||
</div>
|
||
|
||
<div class="state-group">
|
||
<div class="jw-search__multiple-select">
|
||
<select name="raion[]" multiple="multiple" class="rayon">
|
||
<?php
|
||
$sql = "SELECT * FROM rayon where id in (15,3,6,7,1,23,13,22,33,25,11,10,8,26,12,27,5,2,28,9) or is_lo = 1 ORDER BY is_lo,rayon";
|
||
$rez = mysql_query($sql);
|
||
$addNewGroup = true;
|
||
echo "<optgroup label='Санкт-Петербург'>";
|
||
while ($rayon = mysql_fetch_assoc($rez)) {
|
||
if ($rayon['is_lo'] == 1 && $addNewGroup) {
|
||
$addNewGroup = false;
|
||
echo "</optgroup>";
|
||
echo "<optgroup label='Ленинградская область'>";
|
||
}
|
||
if (isset($rayonSelected[$rayon['id']])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$rayon[id]' $sl>$rayon[rayon]</option>";
|
||
}
|
||
echo "</optgroup>";
|
||
?>
|
||
</select>
|
||
<button id="rayon-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<?php else : ?>
|
||
<div class="line state new">
|
||
<div class="control">
|
||
<div class="form-search__main-label small-label">
|
||
<span>Район:</span>
|
||
</div>
|
||
<div class="jw-search__multiple-select" style="position: relative;width: 380px;">
|
||
<select name="raion[]" multiple="multiple" class="rayon">
|
||
<?php
|
||
if ($region[1]['code'] == 77) {
|
||
echo "<optgroup label='" . $region[1]['name'] . "'>";
|
||
echo "</optgroup>";
|
||
|
||
$sql = "SELECT * FROM rf_regions WHERE parent = " . $region[1]['id'];
|
||
$rez = mysql_query($sql);
|
||
while ($sub_region = mysql_fetch_assoc($rez)) {
|
||
echo "<optgroup label='" . $sub_region['name'] . "'>";
|
||
$sql = "SELECT * FROM rayon where id in (SELECT rayon_id FROM rf_region_rayons WHERE rf_region_id =" . $sub_region['id'] . ")";
|
||
$rez1 = mysql_query($sql);
|
||
while ($rayon = mysql_fetch_assoc($rez1)) {
|
||
if (isset($rayonSelected[$rayon['id']])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$rayon[id]' $sl>$rayon[rayon]</option>";
|
||
}
|
||
echo "</optgroup>";
|
||
}
|
||
} else {
|
||
$sql = "SELECT * FROM rayon where id in (SELECT rayon_id FROM rf_region_rayons WHERE rf_region_id = " . $region[1]['id'] . ")";
|
||
$rez = mysql_query($sql);
|
||
echo "<optgroup label='" . $region[1]['name'] . "'>";
|
||
if (mysql_num_rows($rez) > 0) {
|
||
while ($rayon = mysql_fetch_assoc($rez)) {
|
||
if (isset($rayonSelected[$rayon['id']])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$rayon[id]' $sl>$rayon[rayon]</option>";
|
||
}
|
||
} else {
|
||
if (isset($rayonSelected[0])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='0'>Весь город</option>";
|
||
}
|
||
}
|
||
echo "</optgroup>";
|
||
|
||
//ищем отдельные города
|
||
$sqlSep = "SELECT * FROM separate_city where region_id = " . $region[0]['id'];
|
||
$rezSep = mysql_query($sqlSep);
|
||
|
||
$excludeRayonIds = [];
|
||
|
||
while ($city = mysql_fetch_assoc($rezSep)) {
|
||
$excludeRayonIds[] = $city['rayon_id'];
|
||
echo "<optgroup label='" . $city['name'] . "'>";
|
||
$sqlCityRayon = "SELECT * FROM separate_city_rayons where sep_city_id = " . $city['id'];
|
||
$rezCityRayon = mysql_query($sqlCityRayon);
|
||
while ($cityRayon = mysql_fetch_assoc($rezCityRayon)) {
|
||
$sqlRayon = "SELECT * FROM rayon where id = " . $cityRayon['rayon_id'];
|
||
$rezRayon = mysql_query($sqlRayon);
|
||
while ($rayon = mysql_fetch_assoc($rezRayon)) {
|
||
if (isset($rayonSelected[$rayon['id']])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$rayon[id]' $sl>$rayon[rayon]</option>";
|
||
}
|
||
}
|
||
echo "</optgroup>";
|
||
}
|
||
|
||
$sql = "SELECT * FROM rayon where id in (SELECT rayon_id FROM rf_region_rayons WHERE rf_region_id = " . $region[0]['id'] . ")";
|
||
$rez = mysql_query($sql);
|
||
$addNewGroup = true;
|
||
echo "<optgroup label='" . $region[0]['name'] . "'>";
|
||
while ($rayon = mysql_fetch_assoc($rez)) {
|
||
/*if (in_array($rayon['id'], $excludeRayonIds)) {
|
||
continue;
|
||
}*/
|
||
if (isset($rayonSelected[$rayon['id']])) {
|
||
$sl = "selected";
|
||
} else {
|
||
$sl = "";
|
||
}
|
||
echo "<option value='$rayon[id]' $sl>$rayon[rayon]</option>";
|
||
}
|
||
echo "</optgroup>";
|
||
|
||
?>
|
||
</select>
|
||
<button id="rayon-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<?php endif ?>
|
||
|
||
</div>
|
||
|
||
<div class="control-group control-line new villages-search" style="<?= (($get['ok'] && $get['ok'] == 'archComp') || $_GET['compObj']) ? 'display:block' : 'display: none'?>">
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Коттеджные посёлки:</span>
|
||
|
||
</div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<div class="filter-popup-input">
|
||
<div class="crm__filter-input">
|
||
<select style="width:380px" id="search_filter-object-villages" name="search_filter_object_villages[]" multiple="">
|
||
<?php
|
||
$arr_villages = array();
|
||
|
||
if ($get['search_filter_object_villages'] && is_array($get['search_filter_object_villages'])) {
|
||
$arr_villages = $get['search_filter_object_villages'];
|
||
}
|
||
$region_v = $region[0]['id'];
|
||
if($region[0]['parent'] > 0){
|
||
$region_v = $region[0]['parent'];
|
||
}
|
||
$sqlVillage="SELECT * FROM cottage_village WHERE region_id = {$region_v} order by id";
|
||
|
||
$rezVillage=mysql_query($sqlVillage);
|
||
|
||
$rows_village = mysql_num_rows($rezVillage);
|
||
if ($rows_village > 0) {
|
||
while ($village = mysql_fetch_assoc($rezVillage)) { ?>
|
||
<option value="<?= $village['id']; ?>"<?= in_array($village['id'], $arr_villages) ? ' selected' : ''; ?>>
|
||
<?= $village['name']; ?>
|
||
</option>
|
||
<?php }
|
||
} ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$('#search_filter-object-villages').fastselect({
|
||
placeholder: 'Коттеджные посёлки'
|
||
});
|
||
</script>
|
||
</div>
|
||
</div>
|
||
<div class="control-group control-line new highways-search" style="<?= ((($get['ok'] && $get['ok'] == 'archComp') || $_GET['compObj']) && in_array($temp_region, [1,2,64])) ? 'display:block' : 'display: none'?>">
|
||
<div class="form-search__main-label small-label">
|
||
|
||
<span>Шоссе: </span>
|
||
|
||
</div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<div class="filter-popup-input">
|
||
<div class="crm__filter-input">
|
||
<select style="width:380px" id="search_filter-object-highways" name="search_filter_object_highways[]" multiple="">
|
||
<?php
|
||
$arr_highways = array();
|
||
|
||
if ($get['search_filter_object_highways'] && is_array($get['search_filter_object_highways'])) {
|
||
$arr_highways = $get['search_filter_object_highways'];
|
||
}
|
||
|
||
$sqlHighway = "SELECT * from highways where region_id = {$temp_region}";
|
||
|
||
$rezHighway=mysql_query($sqlHighway);
|
||
|
||
$rows_Highway = mysql_num_rows($rezHighway);
|
||
if ($rows_Highway > 0) {
|
||
while ($Highway = mysql_fetch_assoc($rezHighway)) { ?>
|
||
<option value="<?= $Highway['cian_id']; ?>"<?= in_array($Highway['cian_id'], $arr_highways) ? ' selected' : ''; ?>>
|
||
<?= $Highway['name']; ?>
|
||
</option>
|
||
<?php }
|
||
} ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$('#search_filter-object-highways').fastselect({
|
||
placeholder: 'Шоссе'
|
||
});
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="control-groups half-size">
|
||
<div class="control-group control-line with-line checkboxes">
|
||
|
||
<h2>Дополнительно</h2>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="checkbox">
|
||
|
||
<input name="photo" id="photo" type="checkbox" value="1" <?php if($_GET['photo']) echo "checked"; ?>>
|
||
|
||
<label for="photo">Только с фотографиями</label>
|
||
|
||
</div>
|
||
|
||
<?php if ($searchCompanyOnly) { ?>
|
||
<input type="hidden" name="compObj" value="1">
|
||
<div class="checkbox">
|
||
<input id="compObj" type="checkbox" value="1" checked disabled>
|
||
<label for="compObj">Объекты компании</label>
|
||
</div>
|
||
<?php } else { ?>
|
||
<div class="checkbox">
|
||
<input name="compObj" id="compObj" type="checkbox" value="1"
|
||
<?php if ($_GET['compObj']) echo "checked"; ?>>
|
||
<label for="compObj">Объекты компании</label>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<div class="control-group company-emp" style="padding-top: 0; padding-left: 0; <?php if (($get['ok'] && $get['ok'] == 'archComp') || $_GET['compObj']) {
|
||
echo 'display:block;';
|
||
} else {
|
||
echo 'display:none;';
|
||
} ?>">
|
||
<div class="form-search__main-label medium-label">
|
||
<span>Ответственный:</span>
|
||
</div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<?php
|
||
|
||
$id_select = 'search_obj_filter_emp';
|
||
$id_select_input = 'inp_search_obj_filter_emp';
|
||
|
||
$showBlocked = true;
|
||
$showAllInFilter = true;
|
||
|
||
if ($get['search_obj_filter_emp']) {
|
||
$filter_emp = json_encode($get['search_obj_filter_emp']);
|
||
}
|
||
|
||
require($_SERVER['DOCUMENT_ROOT'] . "/templates/filter_emp.php");
|
||
?>
|
||
</div>
|
||
<script type="text/javascript">
|
||
$('#search_obj_filter_emp').fastselect({
|
||
placeholder: 'Ответственный'
|
||
});
|
||
</script>
|
||
</div>
|
||
</div>
|
||
<div class="control-group company-emp" style="padding-top: 0; padding-left: 0; <?php if (($get['ok'] && $get['ok'] == 'archComp') || $_GET['compObj']) {
|
||
echo 'display:block;';
|
||
} else {
|
||
echo 'display:none;';
|
||
} ?>">
|
||
<div class="form-search__main-label medium-label">
|
||
<span>Теги:</span>
|
||
</div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<div class="filter-popup-input">
|
||
<div class="crm__filter-input">
|
||
<select id="search_filter-object-activities" name="search_filter_object_activities[]" multiple="">
|
||
<?php
|
||
$arr_activities = array();
|
||
|
||
if ($get['search_filter_object_activities'] && is_array($get['search_filter_object_activities'])) {
|
||
$arr_activities = $get['search_filter_object_activities'];
|
||
}
|
||
|
||
echo '<option value="no_tags"' . (in_array('no_tags', $arr_activities) ? ' selected' : '') . '>Без тегов</option>';
|
||
|
||
$sql_adv = "SELECT * FROM `activities` WHERE `user_id` = '".$user->id."' OR `manager_id` = '".$user->id."'";
|
||
if ($user->id_manager)
|
||
$sql_adv .= " OR `manager_id` = '".$user->id_manager."' OR `user_id` = '".$user->id_manager."'";
|
||
|
||
if ($user->agencyId)
|
||
$sql_adv .= " OR `manager_id` = '".$user->agencyId."' OR `user_id` = '".$user->agencyId."'";
|
||
|
||
$sql_adv .= ' ORDER BY `name`';
|
||
$q_adv = mysql_query($sql_adv);
|
||
$rows_adv = mysql_num_rows($q_adv);
|
||
if ($rows_adv > 0) {
|
||
while ($r_adv = mysql_fetch_assoc($q_adv)) { ?>
|
||
<option value="<?= $r_adv['id']; ?>"<?= in_array($r_adv['id'], $arr_activities) ? ' selected' : ''; ?>>
|
||
<?= $r_adv['name']; ?>
|
||
</option>
|
||
<?php }
|
||
} ?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$('#search_filter-object-activities').fastselect({
|
||
placeholder: 'Теги'
|
||
});
|
||
</script>
|
||
</div>
|
||
<div class="checkbox" style="margin-top: 28px;">
|
||
|
||
<input name="inAdvert" id="inAdvert" type="checkbox" value="1" <?php if ($_GET['inAdvert']) echo "checked"; ?>>
|
||
|
||
<label for="inAdvert">В рекламе</label>
|
||
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="checkbox">
|
||
|
||
<input name="withCommission" id="withCommission" type="checkbox" value="1" <?php if($_GET['withCommission']) echo "checked"; ?>>
|
||
|
||
<label for="withCommission">С комиссией</label>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="control-group date-from" style="padding-top: 0;">
|
||
|
||
<div class="form-search__main-label medium-label">
|
||
|
||
<span>Не позднее:</span>
|
||
|
||
</div>
|
||
|
||
<div class="control-inputs">
|
||
|
||
<div class="inputs-group">
|
||
|
||
<input type="text" name="date_from" class="datepicker-here2 text medium-input no-mrg-left" value="<?php echo $get['date_from']; ?>">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
<div class="control-group control-line with-line ok-line new-object__form commerc-info" <?php if($_GET['type'] == 4 && (!$get['ok'] || $get['ok'] == 'fr' || $get['ok'] == 'arch')) { echo 'style="display:block;"'; } else { echo 'style="display:none;"'; } ?>>
|
||
<!--<h2>Коммерция</h2>-->
|
||
<div class="block" style="padding: 0; border-bottom: none;">
|
||
|
||
<div class="line rooms">
|
||
<div class="tax-number">
|
||
<div class="label" style="width: 200px;"><span>Номер налоговой:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<input type="text" style="float: left;width: 250px;" class="text small-input rooms" name="tax_number" placeholder="" value="<? if (isset($get)) echo $get['tax_number']; ?>">
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="line rooms">
|
||
<div class="legal-address">
|
||
<div class="label" style="width: 200px;"><span>Юридический адрес:</span></div>
|
||
<div class="inputs">
|
||
<select name="legal_address">
|
||
<option value="0"></option>
|
||
<option value="1" <?=((isset($get) && $get['legal_address'] == 1)) ? 'selected': ''?>>Предоставляется</option>
|
||
<option value="2" <?=((isset($get) && $get['legal_address'] == 2)) ? 'selected': ''?>>Не предоставляется</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<div class="floor floors-row">
|
||
<div class="label" style="width: 200px;">
|
||
<span id="etaz-name">Этаж:</span>
|
||
</div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<input type="number" class="number text small-input etazh no-mrg-left" min="0" max="100" name="etazh_ot" placeholder="от" value="<?php echo $get['etazh_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input etazh" min="0" max="100" name="etazh_do" placeholder="до" value="<?php echo $get['etazh_do']; ?>">
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="is-occupied">
|
||
<div class="label" style="width: 200px;"><span>Помещение занято:</span></div>
|
||
<div class="inputs">
|
||
<select name="isOccupied">
|
||
<option value="0"></option>
|
||
<option value="1" <?=((isset($get) && $get['isOccupied'] == 1)) ? 'selected': ''?>>Не занято</option>
|
||
<option value="2" <?=((isset($get) && $get['isOccupied'] == 2)) ? 'selected': ''?>>Занято</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="layout-object">
|
||
<div class="label" style="width: 200px;"><span>Планировка</span></div>
|
||
<div class="inputs">
|
||
|
||
<select name="layout_id">
|
||
<option value="0"></option>
|
||
|
||
<?php
|
||
$sql_layout = "SELECT * FROM layout_object";
|
||
$q_layuot = mysql_query($sql_layout);
|
||
while($r_layuot = mysql_fetch_assoc($q_layuot))
|
||
{
|
||
?>
|
||
<option value="<?=$r_layuot['id']?>" <?=((isset($get) && $get['layout_id'] == $r_layuot['id'])) ? 'selected': ''?>><?=$r_layuot['name']?></option>
|
||
|
||
<?php
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="number-wet-spots">
|
||
<div class="label" style="width: 200px;"><span>Кол-во мокрых точек</span></div>
|
||
<div class="inputs">
|
||
|
||
<select name="number_wet_spots">
|
||
<option value="0"></option>
|
||
|
||
<option value="1" <?=((isset($get) && $get['number_wet_spots'] == 1)) ? 'selected': ''?>>1</option>
|
||
<option value="2" <?=((isset($get) && $get['number_wet_spots'] == 2)) ? 'selected': ''?>>2</option>
|
||
<option value="3" <?=((isset($get) && $get['number_wet_spots'] == 3)) ? 'selected': ''?>>3</option>
|
||
<option value="4" <?=((isset($get) && $get['number_wet_spots'] == 4)) ? 'selected': ''?>>4</option>
|
||
<option value="5" <?=((isset($get) && $get['number_wet_spots'] == 5)) ? 'selected': ''?>>Нет</option>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="electricity-power">
|
||
<div class="label" style="width: 200px;"><span>Электрическая мощность:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<input style="float: left;" type="number" class="number text small-input rooms no-mrg-left" min="0" max="999" name="electricity_power_ot" placeholder="от" value="<?php echo $get['electricity_power_ot']; ?>">
|
||
|
||
<input style="float: left;" type="number" class="number text small-input rooms" min="0" max="999" name="electricity_power_do" placeholder="до" value="<?php echo $get['electricity_power_do']; ?>">
|
||
|
||
<!--<input style="float: left;" type="number" class="number text small-input rooms" min="0" max="999" name="electricity_power" placeholder="" value="<? if (isset($get)) echo $get['electricity_power'];?>">-->
|
||
<span class="area-label-right">кВТ</span>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div style="margin-top: 10px;" class="state control сommer-condition">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Состояние </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commer_condition[]" multiple="multiple" class="ms-commer_condition">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commer_condition";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commer_condition']) && $get['commer_condition'] && in_array($item['id'], $get['commer_condition'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commer_condition-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="line rooms">
|
||
<div class="is-furniture">
|
||
<div class="label" style="width: 200px;"><span>Мебель</span></div>
|
||
<div class="inputs">
|
||
|
||
<select name="isFurniture">
|
||
<option value="0"></option>
|
||
<option value="1" <?=((isset($get) && $get['isFurniture'] == 1)) ? 'selected': ''?>>Нет</option>
|
||
<option value="2" <?=((isset($get) && $get['isFurniture'] == 2)) ? 'selected': ''?>>Есть</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="line rooms">
|
||
<div class="commer-access">
|
||
<div class="label" style="width: 200px;"><span>Доступ</span></div>
|
||
<div class="inputs">
|
||
<select name="commer_access">
|
||
<option value="0"></option>
|
||
<option value="1" <?=((isset($get) && $get['commer_access'] == 1)) ? 'selected': ''?>>Свободный</option>
|
||
<option value="2" <?=((isset($get) && $get['commer_access'] == 2)) ? 'selected': ''?>>Пропускная система</option>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Тип парковки -->
|
||
|
||
<div style="margin-top: 10px;" class="state control parking_type">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Тип парковки </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="parking_type_id[]" multiple="multiple" class="ms-parking_type">
|
||
<?php
|
||
$sql_in = "SELECT * FROM parking_type order by id";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['parking_type_id']) && $get['parking_type_id'] && in_array($item['id'], $get['parking_type_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="parking_type-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="line rooms">
|
||
<div class="parking_type3">
|
||
<div class="label" style="width: 200px;"><span>Парковка: </span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="parking_id" style="float: left;">
|
||
<option value='0'></option>
|
||
<?php
|
||
$sql="SELECT * FROM parking_type where vid1 = 1 order by id";
|
||
$rez=mysql_query($sql);
|
||
while($parking_type=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['parking_id'] == $parking_type['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$parking_type[id]' $sl>$parking_type[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!--<div class="line rooms">
|
||
<div class="parking_type2">
|
||
<div class="label" style="width: 200px;"><span>Тип парковки: </span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="parking_type_id2" style="float: left;">
|
||
<option value='0'></option>
|
||
<?php
|
||
$sql="SELECT * FROM parking_type where vid = 1 order by id";
|
||
$rez=mysql_query($sql);
|
||
while($parking_type=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['parking_type_id'] == $parking_type['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$parking_type[id]' $sl>$parking_type[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>-->
|
||
|
||
<div class="line rooms">
|
||
<div class="parking-price">
|
||
<div class="label" style="width: 200px;"><span>Стоимость парковки:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<?php
|
||
$val = 0;
|
||
if(isset($get) && isset($get['parking_price'])){
|
||
$val = $get['parking_price'];
|
||
}
|
||
|
||
?>
|
||
<input type="number" style="float: left;" class="number text small-input parking_price" min="0" name="parking_price" placeholder="" value="<?=$val?>">
|
||
<span class="area-label-right">р. в месяц</span>
|
||
<input style="margin-top: 15px; margin-left: 20px; float: left;" type="checkbox" id="parkingIsFree" name="parkingIsFree">
|
||
<label id="parkingIsFree_label" class="area-label-right" for="parkingIsFree">Бесплатная</label>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="ceiling_height">
|
||
<div class="label" style="width: 200px;"><span id="ceiling_height">Высота потолков:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<?php
|
||
$val = 0;
|
||
if(isset($get) && isset($get['ceiling_height'])){
|
||
$val = $get['ceiling_height'];
|
||
}
|
||
|
||
?>
|
||
<input type="number" class="number text small-input etazh no-mrg-left" min="0" max="10" name="ceiling_height_ot" placeholder="от" value="<?php echo $get['ceiling_height_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input etazh" min="0" max="10" name="ceiling_height_do" placeholder="до" value="<?php echo $get['ceiling_height_do']; ?>">
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Сетка колон -->
|
||
<div class="line rooms">
|
||
<div class="column-grid">
|
||
<div class="label" style="width: 200px;"><span>Сетка колон:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<?php
|
||
$val = '';
|
||
if(isset($get) && isset($get['column_grid'])){
|
||
$val = $get['column_grid'];
|
||
}
|
||
|
||
?>
|
||
<input type="text" style="float: left; width:200px;" class="text text small-input" name="column_grid" placeholder="Пример: 9х3, 3х3" value="<?=$val?>">
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Налог-->
|
||
<div class="line rooms">
|
||
<div class="vat_type">
|
||
<div class="label" style="width: 200px;"><span>Налог:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="vat_type_id" style="float: left;">
|
||
<option value='0'></option>
|
||
<?php
|
||
$sql="SELECT * FROM `vat_type` order by id";
|
||
$rez=mysql_query($sql);
|
||
while($vat_type=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['vat_type_id'] == $vat_type['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$vat_type[id]' $sl>$vat_type[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-site">
|
||
<div class="label" style="width: 200px;"><span>Участок:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<input style="float:left;" type="number" step="0.01" class="number text small-input rooms" min="0" max="100000" name="commerc_site" placeholder="" value="<? if (isset($get)) echo $get['commerc_site'];?>">
|
||
<span class="area-label-right">га</span>
|
||
<input style="float:left;margin-top: 12px;margin-left:15px;" type="checkbox" name="commerc_owned1" placeholder="" value="1" <?=((isset($get) && $get['commerc_owned1'] == 1)) ? 'checked': ''?>>
|
||
<span class="area-label-right">в собственности</span>
|
||
<input style="float:left;margin-top: 12px;margin-left:15px;" type="checkbox" name="commerc_owned2" placeholder="" value="1" <?=((isset($get) && $get['commerc_owned2'] == 1)) ? 'checked': ''?>>
|
||
<span class="area-label-right">в аренде</span>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="margin-top: 10px;" class="state control floor-material">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Материал пола </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="floor_material_id[]" multiple="multiple" class="ms-floor_material">
|
||
<?php
|
||
$sql_in = "SELECT * FROM `floor_material` order by id";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['floor_material_id']) && $get['floor_material_id'] && in_array($item['id'], $get['floor_material_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="floor_material-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-portal">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Ворота </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_portal_id[]" multiple="multiple" class="ms-commerc_portal">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commer_condition";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_portal_id']) && $get['commerc_portal_id'] && in_array($item['id'], $get['commerc_portal_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_portal-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div style="margin-top:10px" class="state control commerc-purpose">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Назначение:</span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_purpose[]" multiple="multiple" class="ms-commerc_purpose">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_purpose order by name";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_purpose']) && $get['commerc_purpose'] && in_array($item['id'], $get['commerc_purpose'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_purpose-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-land-category">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Категория земли </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_land_category_id[]" multiple="multiple" class="ms-commerc_land_category">
|
||
<?php
|
||
$sql_in = "SELECT * FROM `commerc_land_category` order by id";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_land_category_id']) && $get['commerc_land_category_id'] && in_array($item['id'], $get['commerc_land_category_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_land_category-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-permitted-use">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Вид разрешенного использования </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_permitted_use_id[]" multiple="multiple" class="ms-commerc_permitted_use">
|
||
<?php
|
||
$sql_in = "SELECT * FROM `commerc_permitted_use` order by id";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_permitted_use_id']) && $get['commerc_permitted_use_id'] && in_array($item['id'], $get['commerc_permitted_use_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_permitted_use-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="commerc-lifts">
|
||
<h2 class="commerc-lift">Лифты</h2>
|
||
<div class="line rooms">
|
||
<div class="commerc-lift">
|
||
<table>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc_lift1">Грузовой:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_lift1" value="<? if (isset($get)) echo $get['commerc_lift1'];?>" name="commerc_lift1">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="lift1_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="lift1_carrying" value="<? if (isset($get)) echo $get['lift1_carrying'];?>" name="lift1_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc_lift2">Тельфер:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_lift2" value="<? if (isset($get)) echo $get['commerc_lift1'];?>" name="commerc_lift2">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="lift2_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="lift2_carrying" value="<? if (isset($get)) echo $get['lift2_carrying'];?>" name="lift2_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc_lift3">Пассажирский:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_lift3" value="<? if (isset($get)) echo $get['commerc_lift3'];?>" name="commerc_lift3">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="lift3_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="lift3_carrying" value="<? if (isset($get)) echo $get['lift3_carrying'];?>" name="lift3_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="commerc-cranes">
|
||
<h2 class="commerc-crane">Крановое оборудование</h2>
|
||
<div class="line rooms">
|
||
<div class="commerc-crane">
|
||
<table>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc-crane1">Мостовой кран:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_crane1" value="<? if (isset($get)) echo $get['commerc_crane1']; ?>" name="commerc_crane1">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="crane1_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="crane1_carrying" value="<? if (isset($get)) echo $get['crane1_carrying']; ?>" name="crane1_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc_crane2">Кран-балка:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_crane2" value="<? if (isset($get)) echo $get['commerc_crane2']; ?>" name="commerc_crane2">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="crane2_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="crane2_carrying" value="<? if (isset($get)) echo $get['crane2_carrying']; ?>" name="crane2_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc_crane3">Ж/д кран:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_crane3" value="<? if (isset($get)) echo $get['commerc_crane3']; ?>" name="commerc_crane3">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="crane3_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="crane3_carrying" value="<? if (isset($get)) echo $get['crane3_carrying']; ?>" name="crane3_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
<tr>
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="commerc_crane4">Козловой кран:</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="commerc_crane4" value="<? if (isset($get)) echo $get['commerc_crane4']; ?>" name="commerc_crane4">
|
||
|
||
</td>
|
||
|
||
<td style="padding-bottom: 10px;">
|
||
<label class="area-label-right" for="crane4_carrying" style="display: block;">Грузоподъемность</label>
|
||
<input class="number text small-input" style="float: left; display: block;" type="number" id="crane4_carrying" value="<? if (isset($get)) echo $get['crane4_carrying']; ?>" name="crane4_carrying">
|
||
<span style="margin-right: 20px;" class="area-label-right">т</span>
|
||
</td>
|
||
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-electricity">
|
||
<div class="label" style="width: 200px;"><span>Элек-во:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="commerc_electricity_id" style="float: left;">
|
||
<option value='0'>Нет</option>
|
||
<?php
|
||
$sql="SELECT * FROM `commerc_electricity` order by id";
|
||
$rez=mysql_query($sql);
|
||
while($electricity=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['commerc_electricity_id'] == $electricity['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$electricity[id]' $sl>$electricity[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-gas">
|
||
<div class="label" style="width: 200px;"><span>Газ:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="commerc_gas_id" style="float: left;">
|
||
<option value='0'>Нет</option>
|
||
<?php
|
||
$sql="SELECT * FROM `commerc_gas` order by id";
|
||
$rez=mysql_query($sql);
|
||
while($gas=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $gas['commerc_gas_id'] == $gas['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$gas[id]' $sl>$gas[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-water">
|
||
<div class="label" style="width: 200px;"><span>Вода:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="commerc_water_id" style="float: left;">
|
||
<option value='0'>Нет</option>
|
||
<?php
|
||
$sql="SELECT * FROM `commerc_gas` order by id";
|
||
$rez=mysql_query($sql);
|
||
while($gas=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['commerc_water_id'] == $gas['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$gas[id]' $sl>$gas[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-sewage">
|
||
<div class="label" style="width: 200px;"><span>Канализация:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="commerc_sewage_id" style="float: left;">
|
||
<option value='0'>Нет</option>
|
||
<?php
|
||
$sql="SELECT * FROM `commerc_gas` order by id";
|
||
$rez=mysql_query($sql);
|
||
while($gas=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['commerc_sewage_id'] == $gas['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$gas[id]' $sl>$gas[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-driveways">
|
||
<div class="label" style="width: 200px;"><span>Подъездные пути:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<select name="commerc_driveways_id" style="float: left;">
|
||
<option value='0'>Нет</option>
|
||
<?php
|
||
$sql="SELECT * FROM `commerc_driveways` order by id";
|
||
$rez=mysql_query($sql);
|
||
while($driveways=mysql_fetch_assoc($rez))
|
||
{
|
||
if((isset($get) && $get['commerc_driveways_id'] == $driveways['id'])) $sl = "selected"; else $sl = "";
|
||
echo "<option value='$driveways[id]' $sl>$driveways[name]</option>";
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!--О Здании -->
|
||
|
||
|
||
<div class="line year">
|
||
<div class="commerc-year">
|
||
<div class="label" style="width: 200px;"><span>Год постройки </span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
<input type="number" class="number text small-input house-year-inp " min="1600" max="3000" name="commerc_year_ot" placeholder="от" value="<?php echo $get['commerc_year_ot']; ?>">
|
||
<input type="number" class="number text small-input house-year-inp " min="1600" max="3000" name="commerc_year_do" placeholder="до" value="<?php echo $get['commerc_year_do']; ?>">
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-building-type-id">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Тип здания </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_building_type_id[]" multiple="multiple" class="ms-commerc_building_type">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_building_type";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_building_type_id']) && $get['commerc_building_type_id'] && in_array($item['id'], $get['commerc_building_type_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_building_type-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-building-class-id">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Класс здания </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_building_class_id[]" multiple="multiple" class="ms-commerc_building_class">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_building_class";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_building_class_id']) && $get['commerc_building_class_id'] && in_array($item['id'], $get['commerc_building_class_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_building_class-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="line rooms">
|
||
<div class="building-area">
|
||
<div class="label" style="width: 200px;"><span>Площадь здания:</span></div>
|
||
<div class="inputs">
|
||
<div class="inputs-group">
|
||
|
||
<input type="number" class="number text small-input rooms no-mrg-left" min="0" max="10000000" name="building_area_ot" placeholder="от" value="<?php echo $get['building_area_ot']; ?>">
|
||
|
||
<input type="number" class="number text small-input rooms" min="0" max="10000000" name="building_area_do" placeholder="до" value="<?php echo $get['building_area_do']; ?>">
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-houseLineType">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Линия домов </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_houseLineType_id[]" multiple="multiple" class="ms-commerc-houseLineType">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_houselinetype";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_houseLineType_id']) && $get['commerc_houseLineType_id'] && in_array($item['id'], $get['commerc_houseLineType_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_houseLineType-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-building-category-id">
|
||
<div class="label" style="width: 200px;"><span>Категория</span></div>
|
||
<div class="inputs">
|
||
<select name="commerc_building_category_id">
|
||
<option value="0"></option>
|
||
<?php
|
||
$sql_building_category = "SELECT * FROM commerc_building_category";
|
||
$q_building_category = mysql_query($sql_building_category);
|
||
while($r_building_category = mysql_fetch_assoc($q_building_category)){
|
||
?>
|
||
<option value="<?=$r_building_category['id']?>" <?=((isset($get) && $get['commerc_building_category_id'] == $r_building_category['id'])) ? 'selected': ''?>><?=$r_building_category['name']?></option>
|
||
|
||
<?php
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="margin-top: 10px;" class="state control commerc-opened">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Вход </span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_opened_id[]" multiple="multiple" class="ms-commerc_opened">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_opened";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_opened_id']) && $get['commerc_opened_id'] && in_array($item['id'], $get['commerc_opened_id'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_opened-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-building-model">
|
||
<div style="float:left">
|
||
<div class="label"><span>Вентиляция</span></div>
|
||
<div class="inputs">
|
||
<select style="margin-right: 20px; margin-left: 0px;" name="commerc_building_ventilation">
|
||
<option value="0" <?=((isset($get) && $get['commerc_building_ventilation'] == 0)) ? 'selected': ''?>>Нет</option>
|
||
<option value="1" <?=((isset($get) && $get['commerc_building_ventilation'] == 1)) ? 'selected': ''?>>Естественная</option>
|
||
<option value="2" <?=((isset($get) && $get['commerc_building_ventilation'] == 2)) ? 'selected': ''?>>Приточная</option>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div style="float:left;margin-right: 20px;">
|
||
<div class="label"><span>Кондиционирование</span></div>
|
||
<div class="inputs" >
|
||
<select style="margin-right: 20px; margin-left: 0px;" name="commerc_building_conditioning">
|
||
<option value="0" <?=((isset($get) && $get['commerc_building_conditioning'] == 0)) ? 'selected': ''?>>Нет</option>
|
||
<option value="1" <?=((isset($get) && $get['commerc_building_conditioning'] == 1)) ? 'selected': ''?>>Местное</option>
|
||
<option value="2" <?=((isset($get) && $get['commerc_building_conditioning'] == 2)) ? 'selected': ''?>>Центральное</option>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div style="float:left">
|
||
<div class="label"><span>Отопление</span></div>
|
||
<div class="inputs" >
|
||
<select style="margin-right: 20px; margin-left: 0px;" name="commerc_building_heating">
|
||
<option value="0" <?=((isset($get) && $get['commerc_building_heating'] == 0)) ? 'selected': ''?>>Нет</option>
|
||
<option value="1" <?=((isset($get) && $get['commerc_building_heating'] == 1)) ? 'selected': ''?>>Автономное</option>
|
||
<option value="2" <?=((isset($get) && $get['commerc_building_heating'] == 2)) ? 'selected': ''?>>Центральное</option>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div style="float:left">
|
||
<div class="label" style="width:auto"><span style="word-break: normal;">Система пожаротуш-я</span></div>
|
||
<div class="inputs" >
|
||
<select style="margin-right: 20px; margin-left: 0px;" name="commerc_building_fire">
|
||
<option value="0" <?=((isset($get) && $get['commerc_building_fire'] == 0)) ? 'selected': ''?>>Нет</option>
|
||
<option value="1" <?=((isset($get) && $get['commerc_building_fire'] == 1)) ? 'selected': ''?>>Гидрантная</option>
|
||
<option value="2" <?=((isset($get) && $get['commerc_building_fire'] == 2)) ? 'selected': ''?>>Спринклерная</option>
|
||
<option value="3" <?=((isset($get) && $get['commerc_building_fire'] == 3)) ? 'selected': ''?>>Порошковая</option>
|
||
<option value="4" <?=((isset($get) && $get['commerc_building_fire'] == 4)) ? 'selected': ''?>>Газовая</option>
|
||
<option value="5" <?=((isset($get) && $get['commerc_building_fire'] == 5)) ? 'selected': ''?>>Сигнализация</option>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="garage-type">
|
||
<div class="label" style="width: 200px;"><span>Тип</span></div>
|
||
<div class="inputs">
|
||
<select id="garage_type_select" name="garage_type_id">
|
||
<option value="0"></option>
|
||
<?php
|
||
$sql_opened = "SELECT * FROM garage_type";
|
||
$q_opened = mysql_query($sql_opened);
|
||
while($r_opened = mysql_fetch_assoc($q_opened)){
|
||
?>
|
||
<option value="<?=$r_opened['id']?>" <?=((isset($get) && $get['garage_type_id'] == $r_opened['id'])) ? 'selected': ''?>><?=$r_opened['name']?></option>
|
||
|
||
<?php
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="garage-vid" <?php if ((isset($get) && ($get['garage_type_id'] == 2))) {echo 'style="display:block;"';} else {echo 'style="display:none;"';}?>>
|
||
<div class="label" style="width: 200px;"><span>Тип гаража</span></div>
|
||
<div class="inputs">
|
||
<select name="garage_vid_id">
|
||
<option value="0"></option>
|
||
<?php
|
||
$sql_opened = "SELECT * FROM garage_vid";
|
||
$q_opened = mysql_query($sql_opened);
|
||
while($r_opened = mysql_fetch_assoc($q_opened)){
|
||
?>
|
||
<option value="<?=$r_opened['id']?>" <?=((isset($get) && $get['garage_vid_id'] == $r_opened['id'])) ? 'selected': ''?>><?=$r_opened['name']?></option>
|
||
|
||
<?php
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="boks-vid" <?php if ((isset($get) && ($get['garage_type_id'] == 3))) {echo 'style="display:block;"';} else {echo 'style="display:none;"';}?>>
|
||
<div class="label" style="width: 200px;"><span>Тип бокса</span></div>
|
||
<div class="inputs">
|
||
<select name="boks_vid_id">
|
||
<option value="0"></option>
|
||
|
||
<option value="1" <?=((isset($get) && $get['boks_vid_id'] == 1)) ? 'selected': ''?>>Кирпичный</option>
|
||
<option value="2" <?=((isset($get) && $get['boks_vid_id'] == 2)) ? 'selected': ''?>>Металлический</option>
|
||
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="line rooms">
|
||
<div class="commerc-status">
|
||
<div class="label" style="width: 200px;"><span>Статус</span></div>
|
||
<div class="inputs">
|
||
<select name="commerc_status_id">
|
||
<option value="0"></option>
|
||
<?php
|
||
$sql_opened = "SELECT * FROM commerc_status";
|
||
$q_opened = mysql_query($sql_opened);
|
||
while($r_opened = mysql_fetch_assoc($q_opened)){
|
||
?>
|
||
<option value="<?=$r_opened['id']?>" <?=((isset($get) && $get['commerc_status_id'] == $r_opened['id'])) ? 'selected': ''?>><?=$r_opened['name']?></option>
|
||
|
||
<?php
|
||
}
|
||
?>
|
||
</select>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<div style="margin-top: 10px;" class="state control commerc-specifications">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Технические хар-ки</span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_specifications[]" multiple="multiple" class="ms-commerc_specifications">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_specifications";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_specifications']) && $get['commerc_specifications'] && in_array($item['id'], $get['commerc_specifications'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="commerc_specifications-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="clear"></div>
|
||
<div style="margin-top: 10px;" class="state control commerc-infrastructure">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Инфраструктура:</span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_infrastructure[]" multiple="multiple" class="ms-commerc_infrastructure">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_infrastructure WHERE id < 27";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_infrastructure']) && $get['commerc_infrastructure'] && in_array($item['id'], $get['commerc_infrastructure'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="infrastructure-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="clear"></div>
|
||
<div style="margin-top: 10px;" class="state control commerc-infrastructure2">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Инфраструктура:</span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_infrastructure1[]" multiple="multiple" class="ms-commerc_infrastructure1">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_infrastructure WHERE vid =1";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_infrastructure1']) && $get['commerc_infrastructure1'] && in_array($item['id'], $get['commerc_infrastructure1'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="infrastructure1-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<div class="clear"></div>
|
||
<div style="margin-top: 10px;" class="state control commerc-infrastructure3">
|
||
|
||
<div class="label" style="width:200px;">
|
||
<span>Инфраструктура:</span>
|
||
</div>
|
||
<div style="float:left" class="jw-search__multiple-select">
|
||
<select name="commerc_infrastructure2[]" multiple="multiple" class="ms-commerc_infrastructure2">
|
||
<?php
|
||
$sql_in = "SELECT * FROM commerc_infrastructure WHERE vid1 =1";
|
||
$q_in = mysql_query($sql_in);
|
||
while($item = mysql_fetch_assoc($q_in)){ ?>
|
||
<option value="<?php echo $item['id']?>" <?php if (isset($get['commerc_infrastructure2']) && $get['commerc_infrastructure2'] && in_array($item['id'], $get['commerc_infrastructure2'])) { echo "selected"; } ?>><?php echo $item['name'];?></option>
|
||
<?php } ?>
|
||
</select>
|
||
<button id="infrastructure2-clear" class="simple-button ms-clear" title="Очистить" type="button"><i class="ti-close"></i></button>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
<?php
|
||
$agency_id = User::getUserAgencyID($_SESSION['id']);
|
||
$sql = "SELECT `fields`.*, `blocks`.`title` AS `block_title`
|
||
FROM `object_fields` AS `fields`
|
||
LEFT JOIN `object_fields_blocks` AS `blocks` ON (`fields`.`block_id`=`blocks`.`id` OR `fields`.`block_id`=0)
|
||
WHERE `fields`.`agency_id`='$agency_id' AND `fields`.`type` IN (1, 2, 3, 4) AND `fields`.`is_active`=1 AND `fields`.`is_filtrable`=1
|
||
GROUP BY `fields`.`id` ORDER BY `blocks`.`order`, `fields`.`order`";
|
||
|
||
$fields = [];
|
||
$fields_filter = [];
|
||
$mas_url_add2 = [];
|
||
if ($query = mysql_query($sql)) {
|
||
if (mysql_num_rows($query)) {
|
||
while ($field = mysql_fetch_assoc($query)) {
|
||
$fields[] = $field;
|
||
$field_id = $field['id'];
|
||
$field_name = $field['name'];
|
||
if (is_array($_GET['fields'])) {
|
||
if ($field['type'] == 1) {
|
||
$value_ot = (float)$_GET['fields'][$field_id . "_ot"];
|
||
$value_do = (float)$_GET['fields'][$field_id . "_do"];
|
||
if (!empty($value_ot) && empty($value_do)) {
|
||
$fields_filter['fields'][$field_id] = $value_ot;
|
||
$fields_filter['sql'][] = "(`object_data`.`field_id` = '$field_id' AND `object_data`.`value` >= $value_ot)";
|
||
$mas_url_add2[] = "fields[" . $field_id . "_ot]=" . $value_ot;
|
||
} else if (empty($value_ot) && !empty($value_do)) {
|
||
$fields_filter['fields'][$field_id] = $value_do;
|
||
$fields_filter['sql'][] = "(`object_data`.`field_id` = '$field_id' AND `object_data`.`value` <= $value_do)";
|
||
$mas_url_add2[] = "fields[" . $field_id . "_do]=" . $value_do;
|
||
} else if (!empty($value_ot) && !empty($value_do)) {
|
||
$fields_filter['fields'][$field_id . "_ot"] = $value_ot;
|
||
$fields_filter['fields'][$field_id . "_do"] = $value_do;
|
||
$fields_filter['sql'][] = "(`object_data`.`field_id` = '$field_id' AND `object_data`.`value` >= $value_ot AND `object_data`.`value` <= $value_do)";
|
||
$mas_url_add2[] = "fields[" . $field_id . "_ot]=" . $value_ot;
|
||
$mas_url_add2[] = "fields[" . $field_id . "_do]=" . $value_do;
|
||
}
|
||
} else if ($field['type'] == 2 || $field['type'] == 3) {
|
||
if (count($_GET['fields'][$field_id]) > 1) {
|
||
if ($values = $_GET['fields'][$field_id]) {
|
||
|
||
$where = [];
|
||
foreach ($values as $value) {
|
||
//$where[] = "`object_data`.`value` LIKE '%\"" . $value . "\"%'";
|
||
$fields_filter['fields'][$field_id][] = intval($value);
|
||
$where[] = "(`object_data`.`field_id` = '$field_id' AND `object_data`.`value` LIKE '%\"" . $value . "\"%')";
|
||
}
|
||
|
||
//$fields_filter['sql'][] = "(`object_data`.`field_id` = '$field_id' AND (" . implode(' OR ', $where) . ")";
|
||
$fields_filter['sql'][] = "(" . implode(' OR ', $where) . ")";
|
||
}
|
||
} else if (!is_null($_GET['fields'][$field_id][0])) {
|
||
if ($value = $_GET['fields'][$field_id][0]) {
|
||
$fields_filter['fields'][$field_id] = intval($value);
|
||
$fields_filter['sql'][] = "(`object_data`.`field_id` = '$field_id' AND `object_data`.`value` LIKE '%\"" . $value . "\"%')";
|
||
}
|
||
}
|
||
} else {
|
||
if (!is_null($_GET['fields'][$field_id])) {
|
||
$value = $_GET['fields'][$field_id];
|
||
$fields_filter['fields'][$field_id] = $value;
|
||
$fields_filter['sql'][] = "(`object_data`.`field_id` = '$field_id' AND `object_data`.`value` = '$value')";
|
||
$mas_url_add2[] = "fields[" . $field_id . "]=" . $value;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
$inputs = 0;
|
||
$blocks = [];
|
||
if ($total_inputs = count($fields)) { ?>
|
||
<div id="customFieldsFilters" class="control-group control-line with-line ok-line" style="<?= ($_GET['compObj'] || ($_GET['ok'] == 'archComp')) ? "display:block;" : "display:none;"; ?>">
|
||
<h2>Дополнительные поля</h2>
|
||
<div class="fields-inputs">
|
||
<?php foreach ($fields as $field) {
|
||
$field_id = $field['id'];
|
||
$label = $field['title'];
|
||
$name = $field['name'];
|
||
$block_title = $field['block_title'];
|
||
|
||
if ($field['block_id'] == 0)
|
||
$block_title = 'Общие поля';
|
||
|
||
if (!is_null($field['params']))
|
||
$params = json_decode($field['params'], true);
|
||
else
|
||
$params = null;
|
||
|
||
$inputs++;
|
||
if (!in_array($block_title, $blocks)) {
|
||
if (!empty($blocks)) { ?>
|
||
<!-- END^ -->
|
||
</div>
|
||
</div>
|
||
<?php } ?>
|
||
<div>
|
||
<h3 class="block-title" style="font-size:18px;border-bottom:1px dashed #e0e0e0;padding-bottom:8px;margin-bottom:20px;max-width:685px !important;"><?= $block_title; ?> <span class="ti-angle-down"></span></h3>
|
||
<div class="fields" style="display: block;">
|
||
<?php
|
||
$blocks[] = $block_title;
|
||
} ?>
|
||
<?php if (intval($field['type']) == 1) : ?>
|
||
<div class="form-block">
|
||
<div class="label"><span><?= $label; ?>:</span></div>
|
||
<div class="control-inputs">
|
||
<div class="inputs-group">
|
||
<input type="number" placeholder="от" id="custom__<?= $name; ?>_ot" name="fields[<?= $field_id . "_ot"; ?>]" value="<?= ((isset($fields_filter['fields'][$field_id . "_ot"])) ? $fields_filter['fields'][$field_id . "_ot"] : ""); ?>" class="number text small-input no-mrg-left">
|
||
<input type="number" placeholder="до" id="custom__<?= $name; ?>_do" name="fields[<?= $field_id . "_do"; ?>]" value="<?= ((isset($fields_filter['fields'][$field_id . "_do"])) ? $fields_filter['fields'][$field_id . "_do"] : ""); ?>" class="number text small-input">
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<?php elseif (intval($field['type']) == 2 || intval($field['type']) == 3) : ?>
|
||
<div class="form-block">
|
||
<div class="label"><span><?= $label; ?>:</span></div>
|
||
<div class="inputs">
|
||
<select id="custom__<?= $name; ?>" name="fields[<?= $field_id; ?>][]" <?= (intval($field['type']) == 3) ? ' multiple' : '' ?>>
|
||
<option value="0">Не выбрано</option>
|
||
<?php if (is_array($params['items'])) {
|
||
$items = $params['items'];
|
||
foreach ($items as $item) {
|
||
if (empty($item['value']) || empty($item['name']))
|
||
continue;
|
||
|
||
if ($item['value'] == $fields_filter['fields'][$field_id] || ((intval($field['type']) == 3) && in_array($item['value'], $fields_filter['fields'][$field_id])))
|
||
$selected = " selected";
|
||
else
|
||
$selected = "";
|
||
|
||
echo '<option value="' . $item['value'] . '"' . $selected . '>' . $item['name'] . '</option>';
|
||
}
|
||
} ?>
|
||
</select>
|
||
<script type="text/javascript">
|
||
$('#custom__<?= $name; ?>').fastselect({
|
||
placeholder: 'Не выбрано'
|
||
});
|
||
</script>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<?php elseif (intval($field['type']) == 4) : ?>
|
||
<div class="form-block">
|
||
<div class="label"><span><?= $label; ?>:</span></div>
|
||
<div class="inputs">
|
||
<div class="checkbox small">
|
||
<?php
|
||
if ((isset($fields_filter['fields'][$field_id]) && boolval($fields_filter['fields'][$field_id])))
|
||
$checked = ' checked="checked"';
|
||
else
|
||
$checked = "";
|
||
?>
|
||
<input type="checkbox" id="custom__<?= $name; ?>" name="fields[<?= $field_id; ?>]" value="1" <?= $checked; ?>>
|
||
<label for="custom__<?= $name; ?>"></label>
|
||
</div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<?php endif; ?>
|
||
<?php if ($total_inputs == $inputs) { ?>
|
||
<!-- END^ -->
|
||
</div>
|
||
</div>
|
||
<?php }
|
||
} ?>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
<?php }
|
||
} ?>
|
||
|
||
<div class="control-group control-line with-line ok-line" >
|
||
|
||
<h2>Источник</h2>
|
||
|
||
<div class="button-row <?php if (stripos($_SERVER['SCRIPT_NAME'], "sale.php") !== false) { echo "sale-row"; }?>">
|
||
|
||
<input type="radio" class="hidden--radio" id="ok_1" name="ok" value="ap" <?php if($get['ok'] == 'ap' or $hasRestrictedAccess) echo "checked"; ?>>
|
||
|
||
<input <?php if($hasRestrictedAccess || $searchCompanyOnly) { echo 'disabled="disabled"'; } ?> type="radio" class="hidden--radio" id="ok_2" name="ok" value="fr" <?php if((!$get['ok'] or $get['ok'] == 'fr') && !$hasRestrictedAccess) echo "checked"; ?>>
|
||
|
||
<input <?php if($hasRestrictedAccess) { echo 'disabled="disabled"'; } ?> type="radio" class="hidden--radio" id="ok_3" name="ok" value="arch" <?php if($get['ok'] == 'arch' && !$hasRestrictedAccess) echo "checked"; ?>>
|
||
|
||
<input <?php if($hasRestrictedAccess || $searchCompanyOnly) { echo 'disabled="disabled"'; } ?> type="radio" class="hidden--radio" id="ok_4" name="ok" value="all" <?php if($get['ok'] == 'all' && !$hasRestrictedAccess) echo "checked"; ?>>
|
||
|
||
<input type="radio" class="hidden--radio" id="ok_5" name="ok" value="archComp" <?php if($get['ok'] == 'archComp') echo "checked"; ?>>
|
||
|
||
<div class="selector-button button-left ist <?php if((!$get['ok'] or $get['ok'] == 'fr') && !$hasRestrictedAccess && !$searchCompanyOnly) { echo "selected"; } if($hasRestrictedAccess || $searchCompanyOnly) { echo "tooltip tooltip-effect disabled"; } ?>">
|
||
|
||
<span <?php if ($hasRestrictedAccess) { echo 'class="tooltip-item"';}?>>Собственники</span>
|
||
<?php if ($hasRestrictedAccess) {?>
|
||
<em style="font-style: normal;" class="tooltip-content tt-pdf clear"><b class="tooltip-text">Доступно в платной версии</b></em>
|
||
<?php } ?>
|
||
|
||
<label for="ok_2" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="selector-button button-center ist <?php if($get['ok'] == 'ap' or $hasRestrictedAccess) echo "selected"; ?>">
|
||
|
||
<span>Агенты</span>
|
||
|
||
<label for="ok_1" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div id="all_val_sel" class="selector-button ist all button-center <?php if($get['ok'] == 'all' && !$hasRestrictedAccess && !$searchCompanyOnly) { echo " selected";} if($hasRestrictedAccess || $searchCompanyOnly) { echo "tooltip tooltip-effect disabled"; } ?>">
|
||
|
||
<span <?php if ($hasRestrictedAccess) { echo 'class="tooltip-item"';}?>>Собственники и агенты</span>
|
||
|
||
<?php if ($hasRestrictedAccess) {?>
|
||
<em style="font-style: normal;" class="tooltip-content tt-pdf clear"><b class="tooltip-text">Доступно в платной версии</b></em>
|
||
<?php } ?>
|
||
|
||
<label for="ok_4" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<!--<div id="arch_val_sel" class="selector-button button-center ist <?php /*if($get['ok'] == 'arch'&& !$hasRestrictedAccess) { echo "selected";} if($hasRestrictedAccess || ($user->agencyId == 5530 && $_SESSION['id'] != 5530)) { echo "tooltip tooltip-effect disabled"; } */?>">
|
||
|
||
<span <?php /*if ($hasRestrictedAccess) { echo 'class="tooltip-item"';}*/?>>Архив собственников</span>
|
||
|
||
<?php /*if ($hasRestrictedAccess) {*/?>
|
||
<em style="font-style: normal;" class="tooltip-content tt-pdf clear"><b class="tooltip-text">Доступно в платной версии</b></em>
|
||
<?php /*} */?>
|
||
|
||
<label for="ok_3" class="label-overlay"> </label>
|
||
|
||
</div>-->
|
||
|
||
<div id="arch_comp_val_sel" class="selector-button button-right ist <?php if($get['ok'] == 'archComp') { echo "selected";} ?>">
|
||
|
||
<span>Архив компании</span>
|
||
|
||
<label for="ok_5" class="label-overlay"> </label>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
</div>
|
||
<div class="control-group last-level">
|
||
<input type="hidden" name="hide_form" value="1">
|
||
<?php
|
||
if(isset($hasRestrictedAccess) && $hasRestrictedAccess){
|
||
?>
|
||
<button onclick="trialperiod.open()" class="button-fl-left big-button" type="button">Найти</button>
|
||
<?php
|
||
} else {
|
||
?>
|
||
<button id="search" class="button-fl-left big-button applyFilter" type="submit">Найти</button>
|
||
<?php
|
||
}
|
||
?>
|
||
|
||
<div class="load-bar">
|
||
<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>
|
||
</div>
|
||
</div>
|
||
|
||
</form>
|
||
</div>
|
||
<div class="map-redesign">
|
||
<link rel="stylesheet" href="/assets/main.css"/>
|
||
<div class="grid">
|
||
<div class="grid-side">
|
||
<div class="grid-header">
|
||
<div class="grid-header__side"><span class="lw-text">Показано: <span class="lw-text--fw-medium lw-text--sm"><span class="obj-counter">0</span> вариантов</span></span></div>
|
||
<div class="grid-header__side">
|
||
<div class="sort">
|
||
<span data-sort="date_add" class="sort__btn active">По дате добавления</span>
|
||
<span data-sort="stoim" class="sort__btn">По цене</span>
|
||
<svg data-direction="asc" class="sort-changer" width="20" height="20">
|
||
<use xlink:href="/assets/sprite.svg#icon-sort"></use>
|
||
</svg>
|
||
<div class="pagination pag-top"></div>
|
||
</div>
|
||
<div class="view-toggler">
|
||
<span class="active js-show-as-card" aria-label="Показать плиткой">
|
||
<svg width="24" height="24">
|
||
<use xlink:href="/assets/sprite.svg#icon-card-view"></use>
|
||
</svg>
|
||
</span>
|
||
<span class="js-show-as-table" aria-label="Показать таблицей">
|
||
<svg width="20" height="20">
|
||
<use xlink:href="/assets/sprite.svg#icon-table-view"></use>
|
||
</svg>
|
||
</span>
|
||
</div>
|
||
<button class="lw-grid-toggler active">Скрыть карту</button>
|
||
</div>
|
||
</div>
|
||
<div class="grid-list">
|
||
</div>
|
||
<div class="pagination pag-bot"></div>
|
||
|
||
</div>
|
||
<div class="grid-side grid-side--map">
|
||
<div class="map-container" style="background-image: url('/assets/img/map-img.png');">
|
||
<div id="map"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal about-modal" id="about">
|
||
<div class="modal__overlay">
|
||
<button class="modal-closer">
|
||
<svg width="24" height="24">
|
||
<use xlink:href="/assets/sprite.svg#icon-close"></use>
|
||
</svg>
|
||
</button>
|
||
<div class="modal__content">
|
||
<div class="slider">
|
||
<div class="swiper-container apartment-slider">
|
||
<div class="swiper-wrapper">
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
<div class="swiper-slide"><a href="/assets/img/slider-img.png" target="_blank"><img src="/assets/img/slider-img.png" alt="фото объекта" width="640" height="420"></a></div>
|
||
</div>
|
||
<div class="swiper-button-prev apartment-slider-button-prev"></div>
|
||
<div class="swiper-button-next apartment-slider-button-next"></div>
|
||
</div>
|
||
<div class="swiper-container apartment-slider-thumbs">
|
||
<div class="swiper-wrapper">
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
<div class="swiper-slide"><img src="/assets/img/slider-thumb.png" alt="фото объекта" width="80" height="50"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="info">
|
||
<div class="info__row">
|
||
<div class="info__row-side">
|
||
<h2 class="lw-text lw-text--lg">3-к. квартира, 41 м, 1/5 эт.</h2>
|
||
</div>
|
||
<div class="info__row-side">
|
||
<button class="lw-btn-xs lw-btn-xs--accent">
|
||
<svg width="20" height="10">
|
||
<use xlink:href="/assets/sprite.svg#icon-pdf"></use>
|
||
</svg>
|
||
</button><img class="marketplace-img" src="/assets/img/marketplace-logo.png" alt="Авито" width="42" height="12">
|
||
<button class="lw-btn-xs lw-btn-xs--noborder lw-btn-xs--transparent">
|
||
<svg width="24" height="24">
|
||
<use xlink:href="/assets/sprite.svg#icon-heart"></use>
|
||
</svg>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<div class="info__row">
|
||
<button class="lw-btn-xs lw-btn-xs--vk">
|
||
<svg width="24" height="24">
|
||
<use xlink:href="/assets/sprite.svg#icon-vk"></use>
|
||
</svg>
|
||
</button>
|
||
<button class="lw-btn-xs">
|
||
<svg width="16" height="16">
|
||
<use xlink:href="/assets/sprite.svg#icon-download"></use>
|
||
</svg>
|
||
</button>
|
||
<button class="lw-btn">Задачи</button>
|
||
<button class="lw-btn">Автопоиск</button>
|
||
</div>
|
||
<div class="info__row"><span class="lw-text lw-text--fw-medium">Свердловская область, Екатеринбург,Московская ул., 48А</span></div>
|
||
<div class="info__row">
|
||
<svg class="card__metro-icon" width="20" height="20">
|
||
<use xlink:href="/assets/sprite.svg#icon-metro"></use>
|
||
</svg><span class="lw-text lw-text--sm">Петроградская</span>
|
||
</div>
|
||
<div class="info__row">
|
||
<div class="info__row-side"><span class="lw-text lw-text--light">Продается</span></div>
|
||
<div class="info__row-side info__row-side--date">
|
||
<div class="info__date">
|
||
<svg width="18" height="18">
|
||
<use xlink:href="/assets/sprite.svg#icon-calendar"></use>
|
||
</svg><span class="lw-text lw-text--xs lw-text--light">15 января 2022 18:34</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="chars">
|
||
<div class="chars__field"><span class="lw-text lw-text--light">Цена:</span><span class="lw-text lw-text--lg">13 990 000 р.</span></div>
|
||
<div class="chars__field"><span class="lw-text lw-text--light">Телефон:</span><a class="lw-text lw-text--lg" href="tel:+79618000030">+79618000030</a><span class="lw-text lw-text--light">Зуева Надежда Павловна</span></div>
|
||
</div>
|
||
<div class="chars">
|
||
<div class="chars__field"><span class="lw-text lw-text--sm">Общая информация:</span>
|
||
<ul class="chars__list">
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Общая площадь:</span><span class="lw-text lw-text--light">53м2</span></li>
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Площадь комнат:</span><span class="lw-text lw-text--light">28м2</span></li>
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Площадь кухни:</span><span class="lw-text lw-text--light">8м2</span></li>
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Этаж:</span><span class="lw-text lw-text--light">1 из 24</span></li>
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Тип сделки:</span><span class="lw-text lw-text--light">Продажа</span></li>
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Комиссия встречному агенту:</span><span class="lw-text lw-text--light">0.00% - 0 руб.</span></li>
|
||
</ul>
|
||
</div>
|
||
<div class="chars__field"><span class="lw-text lw-text--sm">Информация о доме:</span>
|
||
<ul class="chars__list">
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Тип:</span><span class="lw-text lw-text--light">Кирпичный</span></li>
|
||
<li class="chars__list-item"><span class="lw-text lw-text--light">Год постройки:</span><span class="lw-text lw-text--light">2020</span></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="info__row">
|
||
<p class="info__desc">Описание:</p>
|
||
<p class="info__text">Продаётся уютная 3-комнатная квартира в центре города. Дом расположен очень удобно: детская поликлиника в соседнем доме, садик, школа, университеты в 500 м. В пешей доступности торговые центры, супермаркеты. В кирпичном доме зимой тепло, а летом- прохладно. Квартира очень просторная с высокими потолками. В квартире сделан космический ремонт. Установлены счётчики. Продаётся с кухонным гарнитуром. Остальная мебель- по договорённости. Это то, что Вы искали! Вам понравится эта квартира. Заезжай и живи!</p>
|
||
</div>
|
||
<div class="map-container"><img src="/assets/img/map-modal.png" alt="Карта" width="100%" height="440px"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$('body').on('click', '[data-direction]', function() {
|
||
if ($(this).attr('data-direction') == "desc") {
|
||
$(this).attr('data-direction', "asc")
|
||
} else {
|
||
$(this).attr('data-direction', "desc")
|
||
}
|
||
fillPaged(1)
|
||
})
|
||
$('body').on('click', '.sort__btn', function() {
|
||
if (!$(this).hasClass('active')) {
|
||
$('.sort__btn').toggleClass('active')
|
||
}
|
||
fillPaged(1)
|
||
})
|
||
$('body').on('click', '.lw-grid-toggler', function () {
|
||
if ($(this).hasClass('active')) {
|
||
$(this).html('Показать карту')
|
||
} else {
|
||
$(this).html('Скрыть карту')
|
||
}
|
||
$(this).toggleClass('active')
|
||
$('.map-redesign .grid').toggleClass('grid--fullwidth')
|
||
})
|
||
$('body').on('click', '.js-show-as-card,.js-show-as-table', function () {
|
||
slidersRemove()
|
||
if ($(this).hasClass('js-show-as-table')) {
|
||
$('.grid-list').addClass('grid-list--table')
|
||
} else {
|
||
$('.grid-list').removeClass('grid-list--table')
|
||
}
|
||
if ($('.grid-list').hasClass('grid-list--table')) {
|
||
$('.js-show-as-card').removeClass('active')
|
||
$('.js-show-as-table').addClass('active')
|
||
} else {
|
||
$('.js-show-as-card').addClass('active')
|
||
$('.js-show-as-table').removeClass('active')
|
||
}
|
||
$('[data-obj-id]').each(function () {
|
||
fillObjData($(this))
|
||
})
|
||
slidersInit()
|
||
})
|
||
$('.datepicker-here2').datepicker({
|
||
autoClose: 'true'
|
||
});
|
||
$('select.rayon').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выбрать',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
|
||
$('select.ms-renovation').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выбрать',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('select.sources-links').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выбрать',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('select[multiple].ms-commerc_purpose').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите назначение',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_purpose-clear').click(function(){
|
||
$(".ms-commerc_purpose").val([]);
|
||
$(".ms-commerc_purpose").multiselect("reload");
|
||
});
|
||
$('select[multiple].ms-commerc_infrastructure').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите инфраструктуру',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#infrastructure-clear').click(function(){
|
||
$(".ms-commerc_infrastructure").val([]);
|
||
$(".ms-commerc_infrastructure").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_infrastructure1').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите инфраструктуру',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#infrastructure1-clear').click(function(){
|
||
$(".ms-commerc_infrastructure1").val([]);
|
||
$(".ms-commerc_infrastructure1").multiselect("reload");
|
||
});
|
||
$('select[multiple].ms-commerc_infrastructure2').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите инфраструктуру',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#infrastructure2-clear').click(function(){
|
||
$(".ms-commerc_infrastructure2").val([]);
|
||
$(".ms-commerc_infrastructure2").multiselect("reload");
|
||
});
|
||
$('select[multiple].ms-commerc_building_class').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите класс здания',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_building_class-clear').click(function(){
|
||
$(".ms-commerc_building_class").val([]);
|
||
$(".ms-commerc_building_class").multiselect("reload");
|
||
});
|
||
$('select[multiple].ms-commerc-houseLineType').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите линию домов',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_houseLineType-clear').click(function(){
|
||
$(".ms-commerc-houseLineType").val([]);
|
||
$(".ms-commerc-houseLineType").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_opened').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите вход',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_opened-clear').click(function(){
|
||
$(".ms-commerc_opened").val([]);
|
||
$(".ms-commerc_opened").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-parking_type').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите тип парковки',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#parking_type-clear').click(function(){
|
||
$(".ms-parking_type").val([]);
|
||
$(".ms-parking_type").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commer_condition').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите состояние',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commer_condition-clear').click(function(){
|
||
$(".ms-commer_condition").val([]);
|
||
$(".ms-commer_condition").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-floor_material').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите материал пола',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#floor_material-clear').click(function(){
|
||
$(".ms-floor_material").val([]);
|
||
$(".ms-floor_material").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_portal').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите ворота',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_portal-clear').click(function(){
|
||
$(".ms-commerc_portal").val([]);
|
||
$(".ms-commerc_portal").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_building_type').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите тип здания',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_building_type-clear').click(function(){
|
||
$(".ms-commerc_building_type").val([]);
|
||
$(".ms-commerc_building_type").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_specifications').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите тех. хар-ки',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_specifications-clear').click(function(){
|
||
$(".ms-commerc_specifications").val([]);
|
||
$(".ms-commerc_specifications").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_land_category').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите категорию земли',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_land_category-clear').click(function(){
|
||
$(".ms-commerc_land_category").val([]);
|
||
$(".ms-commerc_land_category").multiselect("reload");
|
||
});
|
||
|
||
$('select[multiple].ms-commerc_permitted_use').multiselect({
|
||
columns: 2,
|
||
placeholder: 'Выберите вид использования',
|
||
search: true,
|
||
searchOptions: {
|
||
'default': 'Быстрый поиск'
|
||
},
|
||
selectAll: false
|
||
});
|
||
$('#commerc_permitted_use-clear').click(function(){
|
||
$(".ms-commerc_permitted_use").val([]);
|
||
$(".ms-commerc_permitted_use").multiselect("reload");
|
||
});
|
||
|
||
$('#search').click(function(){
|
||
window.location.assign(window.location.origin + window.location.pathname + "?" + $('#f-system-search-form').serialize());
|
||
});
|
||
|
||
$('#country_select_search').fastselect({
|
||
placeholder: 'Страна',
|
||
onItemSelect: function(item, val) {
|
||
window.location.replace(window.location.origin + window.location.pathname + "?" + $('#f-system-search-form').serialize());
|
||
},
|
||
});
|
||
$('#region_select_search').fastselect({
|
||
placeholder: 'Регион',
|
||
});
|
||
|
||
$(document).ready(function() {
|
||
$('#region_select_search').change(function() {
|
||
var selectedRegion = $(this).val();
|
||
|
||
$.ajax({
|
||
url: '/ajax/change_temp_region.php',
|
||
method: 'POST',
|
||
data: { temp_region: selectedRegion },
|
||
success: function(response) {
|
||
//console.log('id выбранного региона = ' + response);
|
||
if (response !== 'Error updating session') {
|
||
getRaionByRegion(response);
|
||
getMetroByRegion(response);
|
||
reinitVillageSearch();
|
||
reinitHighwaysSearch();
|
||
}
|
||
//if (response === 'ok') {
|
||
//location.reload();
|
||
//}
|
||
},
|
||
error: function(xhr, status, error) {
|
||
console.log('AJAX Error:', error);
|
||
console.log('Status:', status);
|
||
console.log('Response:', xhr.responseText);
|
||
}
|
||
});
|
||
});
|
||
});
|
||
|
||
function getRaionByRegion(temp_region) {
|
||
$.ajax({
|
||
url: '/ajax/getRaionByRegion.php',
|
||
method: 'POST',
|
||
data: { temp_region: temp_region },
|
||
success: function(response) {
|
||
//console.log('Список районов: ' + response);
|
||
//$('.rayon').empty();
|
||
$(".rayon").html(response);
|
||
$(".rayon").val([]);
|
||
$(".rayon").multiselect("reload");
|
||
},
|
||
error: function(xhr, status, error) {
|
||
console.log('AJAX Error:', error);
|
||
console.log('Status:', status);
|
||
console.log('Response:', xhr.responseText);
|
||
}
|
||
});
|
||
}
|
||
|
||
function getMetroByRegion(temp_region) {
|
||
$.ajax({
|
||
url: '/ajax/getMetroByRegion.php',
|
||
method: 'POST',
|
||
data: { temp_region: temp_region },
|
||
success: function(response) {
|
||
//console.log('temp_region = ' + temp_region);
|
||
//console.log('Список метро: ' + response);
|
||
if (response == '') {
|
||
$("#metro_select_search").hide();
|
||
$("#time-to-subway_select_search").hide();
|
||
} else {
|
||
$("#metro_select_search").show();
|
||
$("#time-to-subway_select_search").show();
|
||
if (temp_region == 2) {
|
||
$("#subway-select-list").hide();
|
||
$("#subway-map-select").show();
|
||
} else {
|
||
$("#subway-select-list").show();
|
||
$("#subway-map-select").hide();
|
||
}
|
||
}
|
||
$(".metro-search").html(response);
|
||
$(".metro-search").val([]);
|
||
$(".metro-search").multiselect("reload");
|
||
},
|
||
error: function(xhr, status, error) {
|
||
console.log('AJAX Error:', error);
|
||
console.log('Status:', status);
|
||
console.log('Response:', xhr.responseText);
|
||
}
|
||
});
|
||
}
|
||
|
||
function reinitVillageSearch(){
|
||
|
||
let regionId = $('#region_select_search').val();
|
||
let object_id = 0;
|
||
$.get('/ajax/getVillageForRegion.php?region_id='+regionId+'&id='+object_id, function(data){
|
||
if(data == 0){
|
||
$(".villages-search").hide();
|
||
} else {
|
||
if($('#compObj').prop('checked')){
|
||
$(".villages-search").show();
|
||
$('#search_filter-object-villages').html(data);
|
||
$('#search_filter-object-villages').fastselect().data('fastselect').destroy();
|
||
//$('#search_filter-object-villages').prop("selected", false);
|
||
$("#search_filter-object-villages").fastselect({placeholder: 'Коттеджный поселок'});
|
||
}
|
||
}
|
||
|
||
});
|
||
}
|
||
|
||
function reinitHighwaysSearch(){
|
||
let regionId = $('#region_select_search').val();
|
||
|
||
$.get('/ajax/getHighwayForRegion.php?id='+regionId, function(data){
|
||
$('#search_filter-object-highways').data('fastselect').destroy();
|
||
$('#search_filter-object-highways').html(data);
|
||
$('#search_filter-object-highways').fastselect().data('fastselect').destroy();
|
||
$('#search_filter-object-highways').prop("selected", false);
|
||
$('#search_filter-object-highways').fastselect({placeholder: 'Шоссе'});
|
||
|
||
});
|
||
if((regionId == 1 || regionId == 2 || regionId == 64) && $('#compObj').prop('checked')){
|
||
$(".highways-search").show();
|
||
} else {
|
||
$(".highways-search").hide();
|
||
}
|
||
|
||
}
|
||
|
||
|
||
</script>
|