Exemple #1
0
        #default;
    } else {
        # No query - display online current (default).
        $statusQuery = "";
        $current_check = "checked=\"checked\"";
    }
    #Concatenate POST query strings:
    $totalQuery = $startQuery . $searchQuery . $statusQuery . $endQuery;
}
#build result array from totalQuery and store in session
$get_records = $totalQuery;
$check_get_records = mysql_query($get_records);
$result = $check_get_records;
$_SESSION['gdb_query'] = $searchQuery;
#Only display Archive or Restore buttons when at least one GDB exists or NONE exist/Archive Directory exists, respectively, and no LOCK is in place.
$aa_exists = archiveall_directory($ArchiveAll_Dir);
// is there an Archive directory in correct place?
$GDBQuery = "SELECT * from Genomes.xGDB_Log";
$lockQuery = "SELECT * from Genomes.xGDB_Log where Status='Locked'";
$get_GDB = $GDBQuery;
$check_get_GDB = mysql_query($get_GDB);
$GDB_num_rows = mysql_num_rows($check_get_GDB);
$get_lock = $lockQuery;
$check_get_lock = mysql_query($get_lock);
$lock_num_rows = mysql_num_rows($check_get_lock);
$display_if_db = $GDB_num_rows == 0 ? 'display_off' : ($lock_num_rows == 0 ? '' : 'display_off');
// show or hide "Archive All"
$display_if_nodb = $GDB_num_rows == 0 && $aa_exists == "Yes" ? '' : 'display_off';
//show or hide "Restore All"
$display_if_nolock = $lock_num_rows == 0 ? '' : 'display_off';
//buttons to display only if not locked
Exemple #2
0
 if ($get_result == 'dropped' && $Status == 'Development') {
     $alert = '  Database dropped ';
 }
 if ($get_result == 'validated' && $Status == 'Development') {
     $alert = '  Validated Inputs ';
 }
 ############ Check for presence of key directories #############
 #these are checked in conf_functions.inc.php.
 $i_exists = input_directory($Input_Data_Path, $inputDir);
 # updated 1-28-16
 $o_exists = output_directory($DBid, $dataDir);
 # updated 1-28-16
 $g_exists = gdb_directory($DBid, $dataDir);
 $a_exists = archive_directory($DBid, $dataDir);
 # updated 1-28-16; archive exists for this GDB
 $aa_exists = archiveall_directory($dataDir);
 # updated 1-28-16
 ################# If DB already exists, build links and get sequence count from EST, cDNA, GSEG, yrGATE tables########
 $GDB_exists = "";
 //default no genome database
 if ($g_exists == "Yes" && mysql_select_db("{$DBid}")) {
     #xGDB MySQL database exists.
     $GDB_exists = "Yes";
     $homepage_link = $Status == "Current" ? "<a style=\"margin-left: -22px\" title=\"View/Edit this record\" href=\"/XGDB/phplib/index.php?GDB={$DBid}\"><img alt=\"home\" src=\"/XGDB/images/DNA.png\" /></a>" : "";
     ######### Read Pipeline Error file and format ##########
     $pipeline_errors = read_pipeline_progress($DBid, $dataDir, "Pipeline_error.log", "F");
     //
     $pipeline_errors_formatted = read_pipeline_progress($DBid, $dataDir, "Pipeline_error.log", "T");
     //
     $clear_button = file_exists("/xGDBvm/data/{$DBid}/logs/Pipeline_error.log") ? "\n<form method=\"post\" action=\"/XGDB/conf/errors_exec.php\" class=\"styled topmargin1\">\n    <input type=\"hidden\" name=\"action\" value=\"clear\" />\n    <input type=\"hidden\" name=\"id\" value=\"{$id}\" />\n    <input type=\"hidden\" name=\"valid\" value=\"{$valid_post}\" />\n    <input type=\"hidden\" name=\"redirect\" value=\"view\" />\n<span class=\"\">\n    <input style=\"width:200px\" id=\"clear_errors\" class=\"  submit\"  type=\"submit\" value=\"Clear Errors\" onclick=\"return confirm('Really clear this file's contents?')\" />\n</span>\n</form>\n" : "";
     # don't show error div if none exist or this is being restored from an archive.