" data-view="<?php echo implode('||', $data_view); ?> ">Отправить заявку на эту квартиру</a> </div> </div> <h3 class="planHeader">Планировка</h3> <p class="planText">Вы можете посмотреть планировки соседних квартир, кликнув на маркер (подсолнух)</p> <div id="plan"> <div class="navigator"> <div class="navContainer"><a href="javascript:void(0)" class="brd"><i class="u"></i><i class="d"></i><i class="l"></i><i class="r"></i></a></div> </div> <div class="imgContainer"> <?php $mpage_id = ModulesInPages::model()->getLink($doc_id_last, 'flats'); $flats_floor = ModuleFlats::model()->getList($mpage_id, NULL, $item->floor); $left_top = array(array(array(1300, 140), array(1353, 327), array(1147, 369), array(1166, 593), array(1354, 617), array(1354, 778), array(1371, 901), array(1297, 1044), array(1411, 1155), array(1413, 1305), array(980, 1205), array(800, 1307), array(680, 1411), array(593, 1155), array(355, 1155), array(315, 1400), array(65, 1210)), array(array(1297, 125), array(1355, 177), array(1353, 335), array(1147, 369), array(1166, 610), array(1362, 586), array(1413, 761), array(1371, 925), array(1297, 1044), array(1411, 1180), array(1396, 1275), array(1339, 1455), array(1151, 1435), array(1027, 1339), array(818, 1339), array(677, 1445), array(571, 1339), array(365, 1335), array(292, 1452), array(201, 1452), array(109, 1335)), array(array(1297, 125), array(1355, 177), array(1353, 335), array(1147, 369), array(1166, 610), array(1362, 586), array(1413, 761), array(1371, 925), array(1297, 1044), array(1411, 1180), array(1396, 1275), array(1339, 1455), array(1151, 1435), array(1027, 1339), array(818, 1339), array(677, 1445), array(571, 1339), array(365, 1335), array(292, 1452), array(201, 1452), array(109, 1335))); if ($item->floor == 1) { $left_top = $left_top[0]; } elseif ($item->floor >= 2 && $item->floor <= 7) { $left_top = $left_top[1]; } else { $left_top = $left_top[2]; } $i = 0; foreach ($flats_floor as $flat) { if ($flat->floor == $item->floor) { $active = ''; if ($flat->id == $item->id) { $active = 'active'; }
protected function moduleFlats($data) { $pages = $data['pages']; $type = explode($pages->make_url($data['doc_id_last']), '/' . Yii::app()->request->pathInfo); $type = explode('/', $type[1]); $type = $type[0]; $mpage_id = ModulesInPages::model()->getLink($data['doc_id_last'], 'flats'); if (empty($type)) { $data['flats'] = ModuleFlats::model()->getList($mpage_id, 3, 0, 'bought < :bought'); $this->render('flats', $data); } elseif (substr($type, 0, 5) == 'show_') { // конкретная квартира $flats = new ModuleFlats(); $item_id = floor(substr($type, 5)); $data['item_id'] = $item_id; $data['flats'] = $flats->getList($mpage_id); $data['item'] = $flats->getItem($mpage_id, $item_id); if ($data['item']) { $data['title'] = 'Квартира №' . $data['item']->number; $this->render('flat_show', $data); } else { $this->redirect($pages->make_url($data['doc_id_last'])); } } else { // неизвестный тип отображения КВАРТИР $this->redirect($pages->make_url($data['doc_id_last'])); } }