forked from agmip/ace-dssat-import
-
Notifications
You must be signed in to change notification settings - Fork 0
/
listTemp.php
96 lines (87 loc) · 3.2 KB
/
listTemp.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
<?php include("parts_checkSession.php"); ?>
<?php $p_page="listTemp"; ?>
<?php
include("dbTempUpdate.php");
$output = getTempData(); // TODO
if ($output["dc_result"] == 0) {
header("Location: inputFiles00.php?" . SID);
exit();
}
?>
<!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>List For Temporary Data</title>
</head>
<body>
<div id="container">
<?php include("parts_header.php"); ?>
<div id="content">
<?php include("parts_title.php"); ?>
<form id="form1" method="post" action="inputFiles00.php" enctype="multipart/form-data">
<?php include("parts_explain.php"); ?>
<div id="TopBtns">
<input type="button" value="Menu" onclick="window.location.href='index.php'" />
<input id="SubmitF" type="submit" value="Add New" />
</div>
<table id="dataArea" align="center">
<tr id="titleRow" class="center">
<td>No</td>
<td>Exp ID</td>
<td>Format</td>
<td style="width: 130px">Update Date</td>
<td>Status(*)</td>
<td style="width: 140px">Action</td>
</tr>
<?php
$tempData = $output["dc_result"];
for ($i = 0; $i < count($tempData); $i++) {
if ($tempData[$i]["status"] == 2) {
$status = "Pending";
$linkStatus1 = "";
$linkStatus2 = " disabled=\"disabled\"";
$linkText = "";
} else if ($tempData[$i]["status"] == 3) {
$status = "Verifying";
$linkStatus1 = " disabled=\"disabled\"";
$linkStatus2 = " disabled=\"disabled\"";
} else {
$status = "Editing";
$linkStatus1 = "";
$linkStatus2 = "";
}
if (trim($tempData[$i]["exname"]) == "") {
$exname = "--";
} else {
$exname = $tempData[$i]["exname"];
}
?>
<tr id="inputRow" class="center">
<td><?php echo $i+1; ?></td>
<td><?php echo $exname; ?></td>
<td><?php echo $tempData[$i]["file_format"]; ?></td>
<td><?php echo $tempData[$i]["update_date"]; ?></td>
<td><?php echo $status; ?></td>
<td>
<input id="SubmitF" type="button" value="Edit" style="width: 60px" onclick="window.location.href='checkContinueStep.php?act=edit&inputId=<?php echo $tempData[$i]["input_id"]; ?>&stepNo=<?php echo $tempData[$i]["step_no"]; ?>'" <?php echo $linkStatus1; ?>/>
<input id="SubmitF" type="button" value="Delete" style="width: 60px" onclick="window.location.href='checkContinueStep.php?act=delete&inputId=<?php echo $tempData[$i]["input_id"]; ?>&stepNo=<?php echo $tempData[$i]["step_no"]; ?>'" <?php echo $linkStatus2; ?>/>
</td>
</tr>
<?php
}
?>
</table>
<div id="linkBtns">
<input type="button" value="Menu" onclick="window.location.href='index.php'" />
<input id="Submit" type="submit" value="Add New" />
</div>
</form>
</div>
<?php include("parts_footer.php"); ?>
</div>
</body>
</html>