Exemplo n.º 1
0
<?php

require_once "../config.php";
verify_access($list_modules);
$scheAdd = false;
$scheUpd = false;
$scheDel = false;
$newSche = new schedule();
if ($_POST['action'] == 'Save') {
    if (isset($_POST['hdIdAct'])) {
        if ($_POST['hdIdAct'] == "") {
            $newSche->save($_POST['hdIdUser'], $_POST['hdDate'], $_POST['scheDet']);
            $scheAdd = true;
        } else {
            $newSche->open($_POST['hdIdAct']);
            $newSche->save($_POST['hdIdUser'], $_POST['hdDate'], $_POST['scheDet']);
            $scheUpd = true;
        }
    }
}
if ($_POST['action'] == 'Delete') {
    if (isset($_POST['hdIdAct'])) {
        $newSche->open($_POST['hdIdAct']);
        $newSche->del();
        $scheDel = true;
    }
}
?>