forked from agmip/ace-dssat-import
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parts_inputTabs.php
47 lines (42 loc) · 1.39 KB
/
parts_inputTabs.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
<?php
// Define the tab texts
$p_contents = array("Step 1. XFile",
"Step 2. Observation File",
"Step 3. Soil File",
"Step 4. Weather File",
"Step 5. Confirm",
"Step 6. Save");
// Define the tab links
$p_links = array ("inputFiles01.php",
"checkInputXFiles.php", // 02 Observation
"checkInputOFiles.php", // 03 Soil
"checkInputSFiles.php", // 04 Weather
"checkInputWFiles.php", // 05 Confirm
"#"); // TODO 06 Save
if (isset($_SESSION["dssat_steps"])) {
for ($i=0; $i < count($p_contents); $i++) {
if ($i <= $_SESSION["dssat_steps"] - 1 && $i != $p_pageNum - 1) {
$p_tabs[$i] = "<a href='" . $p_links[$i] . "'><span class='active'>" . $p_contents[$i] . "</span></a>";
} else if ($i > $_SESSION["dssat_steps"] - 1) {
$p_tabs[$i] = "<span>" . $p_contents[$i] . "</span>";
} else {
$p_tabs[$i] = "<span class='active'>" . $p_contents[$i] . "</span>";
}
}
} else if ($p_page == "save") {
for ($i=0; $i < count($p_contents); $i++) {
$p_tabs[$i] = "<span class='active'>" . $p_contents[$i] . "</span>";
}
} else {
$p_tabs[0] = "";
}
?>
<div id="tabs">
<ul>
<?php
for ($i = 0; $i < count($p_tabs); $i++) {
echo "<li>" . $p_tabs[$i] . "</li>\r\n";
}
?>
</ul>
</div>