From b9f41defc97a319c2a0316804ff0b24f187e3608 Mon Sep 17 00:00:00 2001 From: Chloe Quignot <> Date: Thu, 28 Mar 2024 09:38:31 +0100 Subject: [PATCH 1/3] fixes and changes applied to BIOI2 web server in production --- common.php | 3 +- createdb.php | 16 +++++++---- createdb_status.php | 35 ++++++++++++----------- css/common.css | 5 ++-- direct_access.php | 2 +- download.php | 4 +-- explore_db.php | 55 +++++++++++++++++++++++++++++++------ get_data.php | 20 +++++++++----- help_pages.php | 1 + index.php | 2 +- js/aligner.js | 2 -- js/break_viewer.js | 4 --- js/common.js | 3 -- js/createdb.js | 39 +++++++++++--------------- js/direct_access.js | 1 - js/index.js | 67 +++++++++++++++++++++++++++------------------ js/list.js | 8 ------ js/ranking_sort.js | 3 -- js/search.js | 3 -- js/search_status.js | 10 +++---- js/seq_viewer.js | 12 -------- js/summary.js | 4 --- lib_db.php | 49 +++++++++++++++++++++++---------- search.php | 27 ++---------------- send_qsub.php | 2 +- 25 files changed, 196 insertions(+), 181 deletions(-) diff --git a/common.php b/common.php index 0b6be26..34e1ac7 100755 --- a/common.php +++ b/common.php @@ -67,6 +67,7 @@ function print_header($type=null, $name=null) { function print_nav($type=null, $name=null) { $dir = '.'; + $sep = " > "; echo ""; } diff --git a/createdb.php b/createdb.php index bea77dc..a3cce86 100755 --- a/createdb.php +++ b/createdb.php @@ -30,9 +30,10 @@

database creator

-

This page helps to create a database (in sqlite3 format) based on genomes uploaded by the user.

-

The final database can be downloaded for local analyzis, or it can be explored on the site.

-

Alternatively you can upload a Synteruptor database directly if you have generated a database yourself.

+

Use this page to create a database (in sqlite3 format) based on uploaded genomes.

+

The final database can be downloaded for local analyzis, or it can be explored on the web site.

+

Alternatively you can upload a database directly if you have already generated a database yourself.

+ "; echo ""; exit; - } + }else{ + if(!in_array($id,$_SESSION["db_ids"])){$_SESSION["db_ids"][]=$id;}; + }; # List the genome files in the dir $gbks = scan_gbks(); @@ -66,6 +69,7 @@ echo "
    "; print_gbks($gbks); $config = get_config(); + if ($ngbks < $max_gbks && (!isset($config) || $config['status'] == 'preparation')) { $diff = $max_gbks - $ngbks; echo '
    '; @@ -86,7 +90,7 @@ echo '
    '; echo '

    Information about the data provided and generated

    '; echo "
      "; - echo "
    • The job will send you an e-mail (mandatory) when the database creation starts and when it ends. You can also check the progress by bookmarking this page: $site_name job: $id.
    • "; + echo "
    • The job will send you an e-mail (if provided) when the database creation starts and when it ends. You can also check the progress on this page: $site_name job: $id (if you didn't provide your email address, we strongly recommend that bookmark this page).
    • "; echo "
    • The mail provided will only be used to send the progress information.
    • "; echo "
    • The files uploaded will be conserved until the database has been built, and they will then be deleted from our servers.
    • "; echo "
    • The created database is not made public and can only be accessed with the random id created for it ($id).
    • "; @@ -97,6 +101,8 @@ } else { echo ""; } + + ?>
diff --git a/createdb_status.php b/createdb_status.php index fd11daa..ec91d9b 100755 --- a/createdb_status.php +++ b/createdb_status.php @@ -37,41 +37,41 @@ function check_blocks_tol($btol) { function start_job() { $config = get_config(); - + # Change from "preparation" to "waiting" if (isset($config) && isset($config['status']) && $config["status"] == 'preparation') { $config["status"] = "waiting"; # Get a mail address too? if (isset($_GET["mail"])) { $mail = check_mail($_GET["mail"]); - if ($mail == '') { - return array( - 'status' => "mail_error", - ); - } else { + if ($mail != '') { $config["mail"] = $mail; + // } else { // [CQ] 2024-03-22 -> remove this check to avoid error if mail not set + // return array( + // 'status' => "mail_error", + // ); } } # Get an author? if (isset($_GET["author"])) { $author = check_text($_GET["author"]); - if ($author == '') { - return array( - 'status' => "author_error", - ); - } else { + if ($author != '') { $config["author"] = $author; + // } else { + // return array( + // 'status' => "author_error", + // ); } } # Get a description? if (isset($_GET["description"])) { $description = check_text($_GET["description"]); - if ($description == '') { - return array( - 'status' => "description_error", - ); - } else { + if ($description != '') { $config["description"] = $description; + // } else { + // return array( + // 'status' => "description_error", + // ); } } # Get a blocks tolerance value? @@ -84,7 +84,7 @@ function start_job() { } else { return array( 'status' => "error", - 'details' => "Status already exists (" . $status['status'] . ")", + 'details' => "Status already exists (" . $config['status'] . ")", ); } } @@ -99,7 +99,6 @@ function start_job() { ); } else if (isset($_GET["command"])) { $command = $_GET["command"]; - # Check for the status of the current working dir if ($command == "check") { $output = get_config(); diff --git a/css/common.css b/css/common.css index cb2d490..b19b62f 100755 --- a/css/common.css +++ b/css/common.css @@ -165,12 +165,13 @@ a.table-row { } @media screen and (max-width: 800px) { - #databases { + #databases,#userdatabases { width: 100%; overflow-x: auto; } } + /* #databases table { border-spacing: 3px; @@ -182,7 +183,7 @@ a.table-row { } */ -#databases td { +#databases,#userdatabases td { padding: 6px; } diff --git a/direct_access.php b/direct_access.php index 135ff4f..3bc8fa7 100755 --- a/direct_access.php +++ b/direct_access.php @@ -35,7 +35,7 @@
Select a public database:"; echo "
"; diff --git a/download.php b/download.php index 5871f05..133bb61 100755 --- a/download.php +++ b/download.php @@ -25,8 +25,8 @@ < Back to Main Page diff --git a/explore_db.php b/explore_db.php index f2c82a3..db72be3 100755 --- a/explore_db.php +++ b/explore_db.php @@ -9,7 +9,7 @@ ?> - <?php site_name(); ?> help pages + <?php site_name(); ?> database exploration @@ -17,6 +17,7 @@ +