<?php
/*
********************************************************************************

    filename:     pitlistprocess.php
    description:  redirect to header based on action
    inputs:       pitId, add, update, calibrate, delete
    outputs:      pitId
    redirections: pitaddupdate, pitaddupdate, pitcalibrate, pitdeleteprocess

********************************************************************************
*/
    if ($_POST["add"]) {
        header('Location: pitaddupdate.php?action=add');
    } elseif ($_POST["update"]) {
        $pitId = $_POST["pitId"];
        header('Location: pitaddupdate.php?action=update&pitId=' . $pitId);
    } elseif ($_POST["calibrate"]) {
        header('Location: pitcalibrate.php');
    } elseif ($_POST["delete"]) {
        $pitId = $_POST["pitId"];
        header('Location: pitdeleteprocess.php?pitId=' . $pitId);
    } else {
        header('Location: pitlist.php');
   }
?>