<?php
require_once(__DIR__."/../includes/sysinit.php");
include("position.php");
$_position = new Position; //new class instance
$_position->hddnPositionId		= $_POST['hddnPositionId'] ?? 0;
$_position->edtPositionTitle	= $_POST['edtPositionTitle'] ?? '';
$_position->edtPositionDesc		= $_POST['edtPositionDesc'] ?? '';
$_position->selAccessId			= $_POST['selAccessId'] ?? 0;
if ($_POST['action']=='0') $_position->addPosition();
if ($_POST['action']=='1') $_position->updatePosition();
if ($_POST['action']=='2') $_position->viewPosition();
if ($_POST['action']=='3') $_position->editPosition();
if ($_POST['action']=='4') $_position->deletePosition();
unset($_position);
