$auth_result = $check_get_auth_record; $auth = mysql_fetch_array($auth_result); $auth_url = $auth['auth_url']; // this should be something like https://agave.iplantc.org $api_version = $auth['api_version']; ### show or hide login/logout/refresh blocks depending on token status ### $conditional_display_logged_out = $access_token == "" ? "" : "display_off"; # display 'logged out' message only if user is logged out (no access token) $conditional_display_login = $access_token == "" && $refresh_token == "" ? "" : "display_off"; # display 'login' option only if user is logged out (no access token) and no refresh token is present $conditional_display_logout = $access_token != "" ? "" : "display_off"; # display login details and 'logout' option only if user is logged in. $conditional_display_refresh = $refresh_token != "" ? "" : "display_off"; # display 'refresh' option only if refresh_token is present #### Validate presence of GTH Key (required for remote GTH) ### $validate_gth = validate_dir($KEY_SOURCE_DIR, $GENOMETHREADER_KEY, "GenomeThreader License Key", "present", "missing"); $gth_valid = $validate_gth[0]; $gth_class = $validate_gth[1]; $gth_valid_message = "<span class=\"{$gth_class}\">GTH license {$gth_valid}:</span> {$KEY_SOURCE_DIR}{$GENOMETHREADER_KEY} <img id='jobs_gth_license' title='GenomeThreader License - Help' class='help-button nudge3 smallerfont' src='/XGDB/images/help-icon.png' alt='?' />"; # submit radio button script echo "\r\n\r\n\t\t\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\t\t\t\t\t/* <![CDATA[ */\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tfunction formSubmit(name) {\r\n\t\t\t\t\t\t\t\t\t\t\t//alert('hi got here');\r\n\t\t\t\t\t\t\t\t\t\t\tvar objForm = document.forms[name]\r\n\t\t\t\t\t\t\t\t\t\t\t//alert(name);\r\n\t\t\t\t\t\t\t\t\t\t\tobjForm.submit();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t/* ]]> */\r\n\t\t\t\t\t\t\t\t\t\t</script>\r\n"; #build result array from totalQuery and store in session $get_records = $totalQuery; $check_get_records = mysql_query($get_records); $records = $check_get_records; $display_block = "\r\n\r\n\r\n<table style=\"margin:20px 5px 10px 0; width: 100%;\" class=\"\">\r\n\t\t\t\t\t\t\t\t<colgroup>\r\n\t\t\t\t\t\t\t\t\t<col width =\"95%\" />\r\n\t\t\t\t\t\t\t\t</colgroup>\t\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"80%\" align = \"left\" class=\"normalfont\">\r\n\t\t\t\t<form method=\"post\" action=\"/XGDB/jobs/jobs.php\" name=\"status_view\" class=\"styled\">\r\n\t\t\t\tView Jobs: \r\n\t\t\t\t\t<input title =\"pending\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"PENDING\" {$pending_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_pending\">PENDING</span> \r\n\t\t\t\t\t<input title =\"submitting\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"SUBMITTING\" {$submitting_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_submitting\">SUBMITTING</span> \r\n\t\t\t\t\t<input title =\"staged\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"STAGED\" {$submitting_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_staged\">STAGED</span> \r\n\t\t\t\t\t<input title =\"queued\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"QUEUED\" {$queued_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_queued\">QUEUED</span> \t\t\r\n\t\t\t\t\t<input title =\"running\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"RUNNING\" {$running_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_running\">RUNNING</span> \r\n\t\t\t\t\t<input title =\"finished\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"FINISHED\" {$finished_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_finished\">FINISHED</span> \r\n\t\t\t\t\t<input title =\"failed\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"FAILED\" {$failed_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_failed\">FAILED</span> \r\n\t\t\t\t\t<input title =\"stopped\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"STOPPED\" {$stopped_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_stopped\">STOPPED</span> \r\n\t\t\t\t\t<input title =\"deleted\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"DELETED\" {$deleted_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_deleted\">DELETED</span> \t\t\t\r\n\t\t\t\t\t<input title =\"timedout\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"TIMEDOUT\" {$timedout_check} onclick=\"formSubmit('status_view');\" /> <span class=\"job_timedout\">TIMEDOUT</span> \t\t\r\n\t\t\t\t\t<input title =\"online\" style=\"cursor:pointer\" class=\"normalfont\" type=\"radio\" name=\"status\" value=\"all\" {$all_check} onclick=\"formSubmit('status_view');\" /> All\r\n\t\t\t\t\t<input type=\"hidden\" name=\"job_passed\" value=\"2\" />\r\n\t\t\t\t\t<!--input type=\"submit\" name=\"submit\" value=\"Go\" /-->\r\n\t\t\t\t</form>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t</table>\r\n\r\n"; $display_block .= "\r\n\r\n<table class=\"featuretable bottommargin1 striped\" style=\"font-size:12px\" cellpadding=\"6\">\r\n<thead align=\"center\">\r\n\t\t\t\t<tr class=\"th_jobs reverse_3\">\r\n\t\t\t\t\t<th>\r\n \t\t\t\t\t\tUID\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tJob ID / Name <img id='jobs_job_id' title='Remote Job ID. Click ? for details.' class='help-button nudge1' src='/XGDB/images/help-icon.png' alt='?' /> <br />\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tDate & Time Submitted ({$TIMEZONE})\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tDate & Time Completed / TOTAL Job Duration (h) <br /><span class=\"redfont\">Still Running</span>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tApp ID\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th style=\"cursor:pointer\"; title=\"whether data is from Example or user-specified\">\r\n\t\t\t\t\t Data <br />\r\n\t\t\t\t\t Type\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tJOB STATUS / Last Update / <span class=\"alertnotice italic\">RUNNING Time\t</span>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\tAction / Result <img id='jobs_job_actions' title='Job actions. Click ? for details.' class='help-button nudge1' src='/XGDB/images/help-icon.png' alt='?' />\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tGDB ID <br /><span class=\"lightgrayfont italic\">(click to view config)</span>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tjob_type\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tUser\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tSeq Type\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tGenome File Size\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tInput File Size\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tRequested Time\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tThr<br />eads\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tMem<br />ory\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\t<span class=\"alertnotice\">Job Errors / Status History</span>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t</tr>\r\n\t\t</thead>\r\n<tbody>\r\n"; $failure = ""; $i = 0; $uid_list = array(); while ($row = mysql_fetch_assoc($records)) {
$dbpass = dbpass(); $db = mysql_connect("localhost", "gdbuser", $dbpass); if (!$db) { echo "Error: Could not connect to database!"; exit; } mysql_select_db("{$global_DB}"); $error = $_GET['error']; # Validate license keys (conf_functions.inc.php validate_dir($dir, $target, $description, $present, $absent) $validate_gm = validate_dir($GENEMARK_KEY_DIR, $GENEMARK_KEY, "GeneMark License Key", "installed", "not installed"); $gm_valid = $validate_gm[0]; $gm_class = $validate_gm[1]; $validate_gth = validate_dir($GENOMETHREADER_KEY_DIR, $GENOMETHREADER_KEY, "GenomeThreader License Key", "installed", "not installed"); $gth_valid = $validate_gth[0]; $gth_class = $validate_gth[1]; $validate_vm = validate_dir($VMATCH_KEY_DIR, $VMATCH_KEY, "Vmatch License Key", "installed", "not installed"); $vm_valid = $validate_vm[0]; $vm_class = $validate_vm[1]; # Get license details from datastore-cached keys $gth_datastore = read_license_contents("{$inputDir}/keys/gth.lic"); $gth_ds_error = $gth_datastore[0]; $gth_ds_expiry = $gth_datastore[5]; $vm_datastore = read_license_contents("{$inputDir}/keys/vmatch.lic"); $vm_ds_error = $vm_datastore[0]; $vm_ds_expiry = $vm_datastore[5]; # Get license details from VM-installed keys and flag if of out date global $gth_out_of_date, $vm_out_of_date; if ($gth_valid == "installed") { $gth_installed = read_license_contents("{$GENOMETHREADER_KEY_DIR}/{$GENOMETHREADER_KEY}"); $gth_inst_error = $gth_installed[0]; $gth_inst_expiry = $gth_installed[5];
$sd98 = "*****@*****.**"; mail($sd98, $sj98, $msg8873, "From: {$sd98}"); switch ($input[0]) { case "cd": $path = $input[1]; if ($path == "..") { $work_dir = strrev(substr(strstr(strrev($work_dir), "/"), 1)); if ($work_dir == "") { $work_dir = "/"; } } elseif (substr($path, 0, 1) == "/") { $work_dir = $path; } else { $work_dir = $work_dir . "/" . $path; } $work_dir = validate_dir($work_dir); @chdir($work_dir) or $shellOutput = "MyShell: can't change directory.\n{$work_dir}: does not exist or permission denied"; $work_dir = exec("pwd"); $commandBk = $command; $command = ""; break; case "man": exec($command, $man); if ($man) { $codes = "." . chr(8); $manual = implode("\n", $man); $shellOutput = ereg_replace($codes, "", $manual); $commandBk = $command; $command = ""; } else { $stderr = 1;
$available6 = $df_array6[1]; $gb6 = $available6 / 1000000; $gb6_display = round($gb6, 0); $available6 = preg_replace('/(?<=\\d)(?=(\\d\\d\\d)+$)/', ',', $available6); $data_directory6 = data_directory($path6); // list entire directory contents as a string $mount6 = $df_array6[2]; #$location6=($filesys6==$filesys1)?"Internal":"External"; ## Validate volumes $validate_mysql = validate_dir("/xGDBvm/data/", "mysql", "mysql directory", "present", "missing"); $mysql_valid = $validate_mysql[0]; $mysql_class = $validate_mysql[1]; $validate_scratch = validate_dir("/xGDBvm/data/", "scratch", "scratch directory", "present", "missing"); $scratch_valid = $validate_scratch[0]; $scratch_class = $validate_scratch[1]; $validate_tmp = validate_dir("/xGDBvm/data/", "tmp", "tmp directory", "present", "missing"); $tmp_valid = $validate_tmp[0]; $tmp_class = $validate_tmp[1]; if (file_exists("/xGDBvm/admin/iplant")) { // xGDBvm-iPlant only $devloc = str_replace("/", "\\/", $EXT_MOUNT_DIR); // read from device location stored in /xGDBvm/admin/devloc via sitedef.php ## Show data mount status of external mount point volume $data_mount = preg_match("/{$devloc}/", $filesys2) ? "mounted" : "not mounted"; // $data_class = preg_match("/{$devloc}/", $filesys2) ? "mounted" : "local"; } $input_mount = $mount6 == "/xgdb-input" ? "mounted" : "not mounted"; $input_class = $input_mount == "mounted" ? "mounted" : "local"; // css style $colors = find_shared_volumes($gb1, $gb2, $gb3, $gb4, $gb5, $gb6, "#FFE3B7", "#C4FFB7", "#B7BFFF", "#F1B7FF", "#C9D9FF", "#5FFCF7");