Exemplo n.º 1
0
        DB_query($sql);
        $sql = "SELECT a.task_id, c.taskname, d.description, d.project_num, d.id\r\n            FROM {$_TABLES['nf_productionassignments']} a\r\n            LEFT JOIN {$_TABLES['nf_queue']} b ON a.task_id=b.id\r\n            LEFT JOIN {$_TABLES['nf_templatedata']} c ON b.nf_templateDataID=c.id\r\n            LEFT JOIN {$_TABLES['nf_projects']} d ON b.nf_processID=d.wf_process_id\r\n            WHERE a.id={$id};";
        $res = DB_query($sql);
        $B = DB_fetchArray($res);
        if ($B['id'] != '') {
            $sql = "INSERT INTO {$_TABLES['nf_projectcomments']} (project_id, task_id, uid, timestamp, comment) VALUES ({$B['id']}, {$B['task_id']}, {$ruid}, " . time() . ", 'Task was returned to original owner, {$fullname}');";
            DB_query($sql);
        }
        echo "You have successfully returned the task to {$fullname}";
        break;
    case 'delreassignedtask':
        $id = COM_applyFilter($_REQUEST['id'], true);
        //added assignBack_uid check in sql statement only to ensure authenticated user is deleting the reassignment record
        $sql = "UPDATE {$_TABLES['nf_productionassignments']} SET assignBack_uid=0, security_hash='' WHERE id={$id} AND assignBack_uid={$_USER['uid']};";
        DB_query($sql);
        echo taskconsoleShowNavbar('My Tasks');
        if (DB_count($_TABLES['nf_productionassignments'], 'assignBack_uid', $_USER['uid']) == 0) {
            echo display_mytasks();
        } else {
            echo display_reassignedTasks();
        }
        break;
    default:
        echo taskconsoleShowNavbar();
        echo display_mytasks();
        break;
}
if ($_GET['singleuse'] != 1 and $nomenu != 1) {
    echo COM_endblock();
}
echo COM_siteFooter();
Exemplo n.º 2
0
            $sql .= "WHERE a.id='{$taskid}' ";
            $A = DB_fetchArray(DB_query($sql), false);
            $notifyUser = COM_getDisplayName($notifyUID);
            if ($CONF_NF['debug']) {
                COM_errorLog("Nexflow: Send task reminder notificaton for task id: {$A['id']} ({$A['nf_templateDataID']}), {$A['taskname']} to: {$notifyUser} ");
            }
            $subject = 'Workflow Task Reminder Notification';
            list($subject, $msg) = nf_formatEmailMessage('reminder', $A['nf_templateDataID'], $A['id'], $notifyUser);
            $message .= $msg;
            nf_sendEmail($email, $subject, $message);
        }
        break;
}
echo COM_siteHeader('menu');
echo COM_startBlock("Outstanding Tasks");
echo taskconsoleShowNavbar('Outstanding Tasks');
$p = new Template($_CONF['path_layout'] . 'nexflow/admin');
$p->set_file(array('report' => 'view_outstandingtasks.thtml', 'tasks' => 'view_outstandingtask_record.thtml'));
$imgset = $_CONF['layout_url'] . '/nexflow/images';
$actionurl = $_CONF['site_admin_url'] . '/plugins/nexflow/outstanding.php';
$p->set_var('layout_url', $_CONF['layout_url']);
$p->set_var('site_url', $_CONF['site_url']);
$p->set_var('imgset', $imgset);
$p->set_var('actionurl', $actionurl);
$p->set_var('heading1', 'Assigned');
$p->set_var('heading2', 'Owner');
$p->set_var('heading3', 'Request');
$p->set_var('heading4', 'Task Description');
$p->set_var('heading5', 'Actions');
$p->set_var('user_options', nf_listUsers());
$p->set_var('public_url', $_CONF['site_admin_url'] . '/plugins/nexflow');
Exemplo n.º 3
0
$selectUser = COM_applyFilter($_REQUEST['taskuser'], true);
$optLinkVars = '';
if ($selectUser > 0) {
    $usermodeUID = $selectUser;
    if (SEC_hasRights('nexflow.admin')) {
        $optLinkVars = "&taskuser={$usermodeUID}";
    }
} else {
    $usermodeUID = $_USER['uid'] > 1 ? $_USER['uid'] : 1;
}
$nfclass = new nexflow('', $usermodeUID);
$retval = '';
echo COM_siteHeader('menu');
$username = COM_getDisplayName($usermodeUID);
echo COM_startBlock("Workflow Task Console for: {$username}", '', 'blockheader.thtml');
echo taskconsoleShowNavbar('Start Process');
$p = new Template($_CONF['path_layout'] . 'nexflow/admin');
$p->set_file(array('page' => 'startprocesses.thtml', 'record' => 'process_record.thtml'));
$p->set_var('site_url', $_CONF['site_url']);
$p->set_var('optional_parms', $optLinkVars);
$tquery = DB_query("SELECT id,templateName FROM {$_TABLES["nf_template"]} ORDER BY id");
$i = 1;
while (list($templateId, $templateName) = DB_fetchArray($tquery)) {
    $p->set_var('template_id', $templateId);
    $p->set_var('template_name', $templateName);
    $p->set_var('csscode', $i % 2 + 1);
    $p->parse('template_records', 'record', true);
    $i++;
}
if ($_GET['start'] != NULL) {
    $newProcess = $nfclass->newprocess($_GET['start']);