Exemplo n.º 1
0
    }
    $retval = $mode;
} elseif ($op == 'setDynamicName' and $taskid > 0) {
    if ($mode == 1) {
        DB_query("UPDATE {$_TABLES['nf_templatedata']} set isDynamicTaskName=1 where id='{$taskid}'");
    } else {
        DB_query("UPDATE {$_TABLES['nf_templatedata']} set isDynamicTaskName=0 where id='{$taskid}'");
    }
    $retval = $mode;
} elseif ($op == 'setReminderNotifyVariable' and $taskid > 0) {
    DB_query("UPDATE {$_TABLES['nf_templatedata']} SET reminderInterval='0' WHERE id='{$taskid}'");
    $retval = $parm1;
} elseif ($op == 'onhold' and $taskid > 0) {
    $current = DB_getItem($_TABLES['nf_queue'], "status", "id='{$taskid}'");
    $nf = new nexflow();
    if ($current == 0) {
        $nf->hold_task($taskid, true);
        $retval = 'onhold';
    } else {
        $nf->unhold_task($taskid, true);
        $retval = 'offhold';
    }
}
header("Cache-Control: no-store, no-cache, must-revalidate");
header("content-type: text/xml");
$XML = "<result>";
$XML .= "<operation>{$op}</operation>";
$XML .= "<record>{$taskid}</record>";
$XML .= "<value1>{$retval}</value1>";
$XML .= "</result>";
print $XML;
Exemplo n.º 2
0
}
$nfclass = new nexflow();
if ($CONF_NF['debug']) {
    COM_errorLog("op:{$op}, Project:{$project_id},taskuser:{$usermodeUID},row:{$rowid},cid:{$cid},taskid:{$taskid}");
}
if ($op == 'starttask') {
    $startedDate = DB_getItem($_TABLES['nf_queue'], 'startedDate', "id='{$taskid}'");
    if ($startedDate <= 0) {
        DB_query("UPDATE {$_TABLES['nf_queue']} SET startedDate = NOW() WHERE id='{$taskid}'");
    }
    DB_query("UPDATE {$_TABLES['nf_projecttaskhistory']} SET date_started = UNIX_TIMESTAMP() WHERE task_id='{$taskid}'");
} elseif ($op == 'holdtask') {
    $status = DB_getItem($_TABLES['nf_queue'], 'status', "id='{$taskid}'");
    $status = NXCOM_filterInt($status);
    if ($status != 2) {
        $nfclass->hold_task($taskid);
    } else {
        $nfclass->unhold_task($taskid);
    }
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("content-type: text/xml");
    $XML = "<result>";
    $XML .= "</result>";
    print $XML;
} elseif ($op == 'holdprocess') {
    $status = DB_getItem($_TABLES['nf_process'], 'complete', "id='{$taskid}'");
    $status = NXCOM_filterInt($status);
    if ($status == 0) {
        $nfclass->hold_process($taskid);
    } elseif ($status == 3) {
        $nfclass->unhold_process($taskid);