<?php
require_once(__DIR__."/../includes/sysinit.php");
include("building.php");
$_building = new Building; //new class instance
$_building->hddnBuildingId		= $_POST['hddnBuildingId'] ?? 0;
$_building->selClientId		= $_POST['selClientId'] ?? 0;
$_building->selAreaId		= $_POST['selAreaId'] ?? 0;
$_building->edtBuildingName		= $_POST['edtBuildingName'] ?? '';
$_building->txtBuildingNeeds		= $_POST['txtBuildingNeeds'] ?? '';
if ($_POST['action']=='0') $_building->addBuilding();
if ($_POST['action']=='1') $_building->updateBuilding();
if ($_POST['action']=='2') $_building->viewBuilding();
if ($_POST['action']=='3') $_building->editBuilding();
if ($_POST['action']=='4') $_building->deleteBuilding();
if ($_POST['action']=='5') $_building->viewClient();
unset($_building);
