<?php
require_once(__DIR__."/../includes/sysinit.php");
include("legal.php");
$_legal = new Legal; //new class instance
$_legal->hddnLegalId			= $_POST['hddnLegalId'];
$_legal->edtLegalName			= $_POST['edtLegalName'];
$_legal->txtLegalText			= $_POST['txtLegalText'];
$_legal->cbLegalActive			= $_POST['cbLegalActive'];
if ($_POST['action']=='0') $_legal->addLegal();
if ($_POST['action']=='1') $_legal->updateLegal();
if ($_POST['action']=='2') $_legal->viewLegal();
if ($_POST['action']=='3') $_legal->editLegal();
if ($_POST['action']=='4') $_legal->deleteLegal();
unset($_legal);
?>
