<?php
require_once(__DIR__."/../includes/sysinit.php");
include("address.php");
$_address = new Address; //new class instance
$_address->hddnAddressId			= $_POST['hddnAddressId'] ?? 0;
$_address->hddnClientId			= $_POST['hddnClientId'] ?? 0;
$_address->hddnAddressTypeId			= $_POST['hddnAddressTypeId'] ?? 0;
$_address->hddnCountryId			= $_POST['hddnCountryId'] ?? 0;
$_address->hddnPostId			= $_POST['hddnPostId'] ?? 0;
$_address->edtAddressStreet			= $_POST['edtAddressStreet'] ?? 0;
$_address->edtAddressSuburb			= $_POST['edtAddressSuburb'] ?? 0;
$_address->edtAddressCity			= $_POST['edtAddressCity'] ?? 0;
$_address->edtAddressCounty			= $_POST['edtAddressCounty'] ?? 0;
$_address->edtAddressPostalCode			= $_POST['edtAddressPostalCode'] ?? 0;
$_address->edtAddressLng			= $_POST['edtAddressLng'] ?? 0;
$_address->edtAddressLat			= $_POST['edtAddressLat'] ?? 0;
if ($_POST['action']=='0') $_address->addAddress();
if ($_POST['action']=='1') $_address->addAddress();
if ($_POST['action']=='2') $_address->viewAddress();
if ($_POST['action']=='3') $_address->editAddress();
if ($_POST['action']=='4') $_address->deleteAddress();
unset($_address);
