-
Notifications
You must be signed in to change notification settings - Fork 1
/
expDetail.php
110 lines (103 loc) · 3.1 KB
/
expDetail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php include("parts_checkSession.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-US" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/frame.css" />
<script src="js/function.js" type="text/javascript"></script>
<title>Experiment Detail</title>
<style type="text/css">
.style1 {
border: 1px solid #000000;
background-color: #C0C0C0;
}
.style2 {
border: 2px solid #000000;
}
.style3 {
border: 1px solid #000000;
}
.style4 {
border: 1px solid #000000;
text-align: center;
}
.style5 {
text-align: center;
}
.style7 {
border: 1px solid #000000;
text-align: center;
font-size: x-small;
}
</style>
</head>
<body>
<div id="container">
<?php include("parts_header.php"); ?>
<?php include("dbSelect.php"); ?>
<div id="content">
<p class="style5">
<span><input id="Back" name="Back" type="button" value="Go Back" onclick="goBack();"/></span>
</p>
<form id="form1" method="post" action="getFiles.php">
<table class="style2" style="width: 600px" align="center">
<tr>
<td class="style1">Experiment ID</td>
<td class="style1">Treatment Num</td>
<td class="style1">Treatment Name</td>
<td class="style1" style="width: 81px">Select?</td>
<td class="style1">Download</td>
</tr>
<?php
$dbConnectOutput = getDataListById($_GET["expId"]);
$ret = $dbConnectOutput["dc_result"];
$retNum = $dbConnectOutput["dc_result_num"];
$exp_id = "";
for ($i = 0; $i < $retNum; $i++) {
if ($exp_id != $ret[$i]["exp_id"]) {
$isFstLine = true;
$exp_id = $ret[$i]["exp_id"];
$exName = $ret[$i]["exname"];
$cnt = 1;
while ($i+$cnt < $retNum) {
if ($exp_id == $ret[$i+$cnt]["exp_id"]) {
$cnt++;
} else {
break;
}
}
$lastLine = $i + $cnt - 1;
} else {
$isFstLine = false;
}
$trNum = $ret[$i]["trno"];
$trName = $ret[$i]["tr_name"];
$checkBoxId = $exp_id . "_" . $trNum;
if ($isFstLine) {
echo "<form id='form_" . $exp_id ."' method='post' action='getFiles.php'><tr>";
}
echo "<input name='exp_id' type='hidden' value='" . $exp_id . "'/>";
if ($isFstLine) {
echo "<td rowspan='". $cnt ."' class='style3'>" . $exName . "</td>";
}
echo "<td class='style4'>" . $trNum . "</td>";
echo "<td class='style3'>" . $trName . "</td>";
echo "<td class='style4' style='width: 81px'><input id='" . $checkBoxId . "' name='" . $exp_id . "[]' type='checkbox' checked='checked' value='" . $trNum . "' /></td>";
if ($isFstLine) {
echo "<td rowspan='" . $cnt . "' class='style7'><input name='" . $exp_id . "_btn' type='submit' value='Download' /></td>";
}
echo "</tr>";
if ($i === $lastLine) {
echo "</form>";
}
}
?>
</table>
<br />
</form>
</div>
<?php include("parts_footer.php"); ?>
</div>
</body>
</html>