Esempio n. 1
0
<?php

include 'core/config.php';
include 'core/RESTCalls.php';
if (isset($_POST["form_token"])) {
    $PCM_comment = $_POST["comment"];
    $PCM_status = "terminate";
    $PCM_ActivityLabel = $_POST["activitylabel"];
    $PCM_ActivityID = $_POST["activityID"];
    $request = PostActivities($_COOKIE['JEngine_ScenarioID'], $_COOKIE['JEngine_ScenarioInstanceID'], $PCM_ActivityID, $PCM_status, $PCM_comment);
    if (!$request) {
        echo "error with the Post request";
    }
} else {
    echo "error with form input";
}
header("Location: ../form.php");
die;
Esempio n. 2
0
<?php

include '../core/config.php';
include '../core/RESTCalls.php';
//Updating Status to terminate for an pcm_activity
if (isset($_POST['update_activity_status_terminate'])) {
    $result = PostActivities($_POST['pcm_scenarioID'], $_POST['pcm_scenarioinstances'], $_POST['pcm_activity'], "terminate", "");
    if ($result) {
        header("Location: admin.php?l=jcore_controller");
        die;
    } else {
        echo "fatal error in POST";
    }
    //Updating Status to begin for an pcm_activity
} elseif (isset($_POST['update_activity_status_begin'])) {
    $result = PostActivities($_POST['pcm_scenarioID'], $_POST['pcm_scenarioinstances'], $_POST['pcm_activity'], "begin", "");
    if ($result) {
        header("Location: admin.php?l=jcore_controller");
        die;
    } else {
        echo "fatal error in POST";
    }
    //update JEngine_ScenarioID Cookie
} elseif (isset($_POST['pcm_scenarioID'])) {
    unset($_COOKIE['JEngine_ScenarioID']);
    setcookie("JEngine_ScenarioID", $_POST["pcm_scenarioID"], time() + 3600, '/', NULL, 0);
    header("Location: admin.php?l=jcore_controller");
    die;
    // update JEngine_ScenarioInstanceID
} elseif (isset($_POST['pcm_scenarioinstances'])) {
    unset($_COOKIE['JEngine_ScenarioInstanceID']);