-
Notifications
You must be signed in to change notification settings - Fork 1
/
inputFiles02.php
106 lines (98 loc) · 4.46 KB
/
inputFiles02.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
<?php include("parts_checkSession.php"); ?>
<?php $p_pageNum=3; $p_page="input02"; include("parts_checkTabsStatus.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>Input File 02 Soil</title>
</head>
<body>
<div id="container">
<?php include("parts_header.php"); ?>
<?php include("errMsg.php"); ?>
<div id="content">
<?php include("parts_title.php"); ?>
<?php include("parts_inputTabs.php"); ?>
<form id="form1" method="post" action="checkInputSFiles.php" enctype="multipart/form-data">
<?php include("parts_explain.php"); ?>
<?php
if (isset($_SESSION["errFlg"])) {
$errMsg = getSessErrMsg($_SESSION["errFlg"]);
echo "<div id='errMsg'>" . $errMsg . "</div>";
}
?>
<table id="inputArea" align="center">
<tr id="titleRow">
<td style="width: 90px">Soil ID</td>
<td style="width: 160px">Availability</td>
<td style="width: 400px">Additional Info</td>
<td style="width: 50px">Update</td>
</tr>
<?php
$content_status = $_POST["content_status"];
$content_id = $_POST["content_id"];
$content_xcrd = $_POST["content_xcrd"];
$content_ycrd = $_POST["content_ycrd"];
$ids = "";
for ($i = 0; $i < count($content_id); $i++) {
$ids = $ids . $content_id[$i] . ",";
if ($content_status[$i] == "1") {
$dbStatus = "Available In DB";
$checked = " onclick=\"changeActiveStatus('" . $content_id[$i] . "');\"";
$disabled = " disabled='disabled' ";
if (isset($_POST["upload_file"]) && $_POST["upload_file"][$i] != "") {
$checked .= " checked = 'checked' ";
$disabled = "";
}
} else {
$dbStatus = "Unavailable In DB";
$checked = " disabled='disabled' checked = 'checked' ";
$disabled = "";
}
echo "<tr id='inputRow'>\r\n";
echo " <td rowspan='2'>" . $content_id[$i] . "</td>\r\n";
echo " <td>" . $dbStatus . "</td>\r\n";
echo " <td>XCRD " . $content_xcrd[$i] . ", YCRD " . $content_ycrd[$i] . "</td>\r\n";
echo " <td class='center'>\r\n";
echo " <input id='check_" . $content_id[$i] . "' type='checkbox' name='checkBox[]'" . $checked . " value='1' />\r\n";
echo " <input id='FileId_" . $content_id[$i] . "' type='hidden' name='FileId[]' value='" . $content_id[$i] . "'" . $disabled . "/>\r\n";
echo " </td>\r\n";
echo "</tr>\r\n";
echo "<tr id='inputRow'><td colspan='3'>\r\n";
if (isset($_POST["upload_file"]) && $_POST["upload_file"][$i] != "") {
echo "Read From <strong>" . $_POST["upload_file"][$i] . "</strong> OR<br/>\r\n";
}
echo "<input id='FilePath_" . $content_id[$i] . "' name='FilePath[]' type='file' size='60' onchange=\"changeToUploadById('" . $content_id[$i] . "');\" " . $disabled . "/></td></tr>\r\n";
echo "<input type='hidden' name='sid[]' value='" . $content_id[$i] . "' />\r\n";
$AllInDBFlg = true;
if ((isset($_POST["upload_file"]) && $_POST["upload_file"][$i] != "") || $content_status[$i] == "1") {
echo "<input type='hidden' id='upload_file_" . $content_id[$i] . "' name='upload_file_id[]' value='1' />\r\n";
} else {
$AllInDBFlg = false;
echo "<input type='hidden' id='upload_file_" . $content_id[$i] . "' name='upload_file_id[]' value='0' />\r\n";
}
}
// If temporary or formal table contain this id
if ($AllInDBFlg) {
echo "<input type='hidden' id='upload_file' name='upload_file' value='1' />\r\n";
} else {
echo "<input type='hidden' id='upload_file' name='upload_file' value='0' />\r\n";
}
$ids = substr($ids, 0, -1);
?>
<input type="hidden" id="submitType" name="submitType" value="next" />
</table>
<div id="subBtns">
<input type="button" value="Back" onclick="goBack();" />
<input id="Submit" type="button" value="Next" onclick="checkExdForSoilfile('next', '<?php echo $ids; ?>')" />
<input id="Submit" type="button" value="Finish" onclick="checkExdForSoilfile('finish', '<?php echo $ids; ?>')" />
</div>
</form>
</div>
<?php include("parts_footer.php"); ?>
</div>
</body>
</html>