function get_info_or_ask() { if (isset($_GET["id"])) { $info = list_load_info($_GET["id"]); } else { if (isset($_GET["code"]) && isset($_GET["user"])) { $info = list_load_info_code($_GET["code"], $_GET['user']); } else { $info['lcode'] = $info['luser'] = $info['ltitle'] = $info['gcode'] = $info['ldirec'] = ""; } } export_list_info_js($info); return $info; }
EOF; exit(0); } echo <<<EOF <script language="javascript" type="text/javascript"> parent.doneUpload(101, "{$code}", "{$user}"); </script> EOF; } # Main if (!isset($_REQUEST["user1"]) || !isset($_REQUEST["list1"]) || !isset($_REQUEST["user2"]) || !isset($_REQUEST["list2"])) { echo "&error 2"; exit(0); } $info1 = list_load_info_code($_REQUEST["list1"], $_REQUEST["user1"]); $info2 = list_load_info_code($_REQUEST["list2"], $_REQUEST["user2"]); if (!$info1 || !$info2) { echo "&error 3"; exit(0); } if (!isset($_REQUEST["action"])) { $action = "unknown"; } else { $action = $_REQUEST["action"]; } switch ($action) { case "create": if (!isset($_POST["user"])) { echo "{$error} 4"; break; }
$genes[$k] .= "\n"; } file_put_contents($filename, $genes, LOCK_EX); $genes = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (in_array($gene, $genes, true)) { echo "&error 4"; } else { return_unfound_and_duplicates($info); } } # Main if (isset($_GET["id"])) { $info = list_load_info($_GET["id"]); } else { if (isset($_GET["code"]) && isset($_GET["user"])) { $info = list_load_info_code($_GET["code"], $_GET["user"]); } else { echo "&error 1"; exit(0); } } // synonim lock $fp = fopen($info['ldir'] . "/synonim.lock", "w"); if (!flock($fp, LOCK_EX)) { // do an exclusive lock echo "&error 5"; exit(0); } if (!isset($_GET["action"])) { $action = "unknown"; } else {
<?php require "../include/clusterizator.php"; require "include/menu.php"; require "include/database.php"; require "include/info.php"; require "include/list-work.php"; requirejs("include/list-edit.js"); if (isset($_GET["id"])) { $info = list_load_info($_GET["id"]); } else { if (isset($_GET["code"]) && isset($_GET["user"])) { $info = list_load_info_code($_GET["code"], $_GET['user']); } else { exit(0); } } clus_head(); export_list_info_js($info); show_menu(); ?> <span class="list-owner"> <h1> Update information for the data set </h1> Data set with code: <span class="prnt_lcode"></span><br /> <form class="template-href" action="../admin/list-queries.php?action=update&code=@@prnt_lcode@@&user=@@prnt_luser@@" method="post" enctype="multipart/form-data"> <input id="titolo" type="text" size=40 maxlength=128 name="title" /> <input type="submit" value="Update name (max 128 char)"> </form>
$format = $_GET["format"]; } if (!isset($_GET["bins"]) || !is_numeric($_GET["bins"]) || $_GET["bins"] < 1 || $_GET["bins"] > 8192) { exit(0); } $bins = $_GET["bins"]; $normalize = true; // Get an array of lists to do if (!is_array($_GET["code"]) || !is_array($_GET["user"])) { echo "&error 2"; break; } $count = 0; foreach ($_GET["code"] as $key => &$value) { if (isset($_GET["user"][$key])) { $info[$count] = list_load_info_code($value, $_GET["user"][$key]); if ($info[$count] == NULL) { echo "&error 4"; exit(0); } $count++; } } if ($count != 2) { echo "&error 5"; exit(0); } // Find the bigger genome and get genomesize $glength = array(); for ($i = 0; $i < $count; $i++) { if (!isset($glength[$info[$i]["gid"]])) {