<?php
include("company.php");
$_company = new Company; //new class instance
$_company->hddnCompanyId			= $_POST['hddnCompanyId'];
$_company->edtCompanyName			= $_POST['edtCompanyName'];
$_company->edtCompanyEmail			= $_POST['edtCompanyEmail'];
$_company->edtCompanyLogo			= $_POST['edtCompanyLogo'];
$_company->edtCompanyAddress		= $_POST['edtCompanyAddress'];
$_company->addressLat				= $_POST['latitude'];
$_company->addressLng				= $_POST['longitude'];
$_company->edtCompanyURL			= $_POST['edtCompanyURL'];
$_company->edtCompanyPhone			= $_POST['edtCompanyPhone'];
$_company->edtCompanyType			= $_POST['edtCompanyType'];
$_company->edtCompanyRegNo			= $_POST['edtCompanyRegNo'];
$_company->edtCompanyVatNo			= $_POST['edtCompanyVatNo'];
$_company->edtUserName				= $_POST['edtUserName'];
$_company->edtUserSurname			= $_POST['edtUserSurname'];

$_company->edtCompanyContactName			= $_POST['edtCompanyContactName'];
$_company->edtCompanyContactSurname			= $_POST['edtCompanyContactSurname'];
$_company->edtCompanyContactEmail			= $_POST['edtCompanyContactEmail'];
$_company->edtCompanyContactPhone			= $_POST['edtCompanyContactPhone'];

if ($_POST['action']=='0') $_company->addCompany();
if ($_POST['action']=='1') $_company->updateCompany();
if ($_POST['action']=='2') $_company->viewCompany();
if ($_POST['action']=='3') $_company->editCompany();
if ($_POST['action']=='4') $_company->deleteCompany();
if ($_POST['action']=='5') $_company->registerCompany();
if ($_POST['action']=='6') $_company->editContacts();
if ($_POST['action']=='7') $_company->duplicateCompany();
if ($_POST['action']=='8') $_company->editEmailGroup();

unset($_company);