<?php
require_once(__DIR__."/../includes/sysinit.php");
include("audit.php");
$_audit = new Audit; //new class instance
$_audit->hddnAuditId			= $_POST['hddnAuditId'];
$_audit->edtItemId			= $_POST['edtItemId'];
$_audit->edtAuditDesc			= $_POST['edtAuditDesc'];
$_audit->edtAuditCode			= $_POST['edtAuditCode'];
$_audit->selUserCode			= $_POST['selUserCode'];
$_audit->edtAuditTime			= $_POST['edtAuditTime'];
$_audit->edtIpAddress			= $_POST['edtIpAddress'];
if ($_POST['action']=='0') $_audit->addAudit();
if ($_POST['action']=='1') $_audit->updateAudit();
if ($_POST['action']=='2') $_audit->viewAudit();
unset($_audit);
