if ($relatedProcesses == '') { $relatedProcesses = $B['related_processes']; } else { $relatedProcesses .= ',' . $B['related_processes']; } } } if ($relatedProcesses != '') { $sql = "SELECT id FROM {$_TABLES['nf_queue']} WHERE archived is NULL and nf_processID in ({$relatedProcesses}) "; $query = DB_query($sql); while (list($qid) = DB_fetchArray($query)) { nf_changeLog("Nexflow delete project related process queue record:{$qid}"); DB_query("DELETE FROM {$_TABLES['nf_queue']} WHERE id={$qid}"); } } $nfclass->delete_process($pid); DB_query("DELETE FROM {$_TABLES['nf_projectforms']} WHERE project_id={$project_id}"); DB_query("DELETE FROM {$_TABLES['nf_projecttimestamps']} WHERE project_id={$project_id}"); DB_query("DELETE FROM {$_TABLES['nf_projectcomments']} WHERE project_id={$project_id}"); DB_query("DELETE FROM {$_TABLES['nf_projecttaskhistory']} WHERE project_id={$project_id}"); DB_query("DELETE FROM {$_TABLES['nf_projects']} WHERE id={$project_id} "); $html = '<div class="pluginAlert" style="margin:5px 20px 5px 20px ;padding:10px;">Project has been deleted'; $html .= ' - <a href="' . $CONF_NF['TaskConsole_URL'] . '?op=allprojects">refresh</a> the page.</div>'; $html = htmlentities($html); header("Cache-Control: no-store, no-cache, must-revalidate"); header("content-type: text/xml"); $XML = "<result>"; $XML .= "<record>{$rowid}</record>"; $XML .= "<operation>{$op}</operation>"; $XML .= "<html>{$html}</html>"; $XML .= "</result>";