Exemple #1
0
    echo "<option value='{$row['id']}'>{$row['name']}</option>";
}
?>
            </select>
        </div>
        <input type="button" value="Создать по шаблону" id="create_tpl_obj" onclick="create_obj($('#build_id_cht').val(), $('#floor_cht').val(), $('#popup_form_select').val(), $('#section_cht').val())"/>
        &nbsp;<input type="button" value="Создать" id="create_obj"
		onclick="location.href='index.php?module=Realty&action=EditView&floor='+$('#floor_cht').val()+'&building_name='+$('#b_name').text()+'&building_id='+$('#build_id_cht').val()+'&return_action=chess_table&return_id='+$('#build_id_cht').val()+'&return_module=Buildings'"/>
    </div>
    <!--[if lt IE 9]><div class="popup__valignfix"></div><![endif]-->
</div>

<h1>Шахматка 
    <?php 
$building = new Buildings();
$building->retrieve($_REQUEST['record']);
echo "<span id='b_name'>{$building->name}</span></h1>";
echo '<table border="1" class="chess_table"  cellpadding=0>';
$sec = $building->get_linked_beans('buildings_sections', 'Sections');
if (count($sec) > 0) {
    $sections = $sec;
    $floors_quantity = $building->number_of_floors;
    echo "<tr>";
    foreach ($sections as $section) {
        $colspan = $section->flats_quantity;
        echo "<td class='floor_class' align='center' width='50px' height='50px' padding='6px' ><b>Этаж<b></td>\n\t\t\t   <td class='sections' align='center' height='50px' padding='6px' colspan='{$colspan}'><b>{$section->name}</b></td>";
    }
    echo "</tr>";
    $floor = $floors_quantity;
    for ($i = 0; $i < $floors_quantity; $i++) {
        echo "<tr>";