forked from PecanProject/pecan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path03a-ameriflux.php
162 lines (139 loc) · 5.42 KB
/
03a-ameriflux.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?php
/**
* Copyright (c) 2012 University of Illinois, NCSA.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the
* University of Illinois/NCSA Open Source License
* which accompanies this distribution, and is available at
* http://opensource.ncsa.illinois.edu/license.html
*/
// Check login
require("common.php");
open_database();
if ($authentication) {
if (!check_login()) {
header( "Location: index.php");
close_database();
exit;
}
if (get_page_acccess_level() > $min_run_level) {
header( "Location: history.php");
close_database();
exit;
}
}
# parameters
if (!isset($_REQUEST['hostname'])) {
die("Need a hostname.");
}
$hostname=$_REQUEST['hostname'];
$adv_setup = (isset($_REQUEST['adv_setup'])) ? "checked" : "";
$fluxusername = (isset($_REQUEST['fluxusername'])) ? $_REQUEST['fluxusername'] : "";
?>
<!DOCTYPE html>
<html>
<head>
<title>PEcAn AmeriFlux Data Policy</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="sites.css" />
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript">
function validate() {
$("#next").removeAttr("disabled");
$("#error").html(" ");
if ($("#fluxusername").val() == "") {
$("#next").attr("disabled", "disabled");
$("#error").html("Need to provide a username to download data (pecan)");
}
}
function prevStep() {
$("#formprev").submit();
}
function nextStep() {
$("#formnext").submit();
}
$(document).ready(function () {
validate();
});
</script>
</head>
<body>
<div id="wrap">
<div id="stylized">
<h1>AmeriFlux Data Policy</h1>
<p>To continue you need to agree to the data policy on the right.</p>
<form id="formprev" method="POST" action="03-inputs.php">
<?php
foreach($_REQUEST as $key => $value) {
if (is_array($value)) {
foreach($value as $v) {
echo "<input name=\"{$key}[]\" id=\"{$key}[]\" type=\"hidden\" value=\"{$v}\"/>";
}
} else {
if(strcmp($key, "notes") == 0 ) {
$str = htmlentities($value, ENT_QUOTES);
echo "<input name=\"{$key}\" id=\"{$key}\" type=\"hidden\" value=\"{$str}\"/>";
} else {
echo "<input name=\"{$key}\" id=\"{$key}\" type=\"hidden\" value=\"{$value}\"/>";
}
}
}
?>
</form>
<?php if ($adv_setup == "checked"){?>
<form id="formnext" method="POST" action="07-analysis.php">
<?php } else { ?>
<form id="formnext" method="POST" action="<?php echo ($hostname != $fqdn ? '04-remote.php' : '04-runpecan.php'); ?>">
<?php }?>
<?php
foreach($_REQUEST as $key => $value) {
if (is_array($value)) {
foreach($value as $v) {
echo "<input name=\"{$key}[]\" id=\"{$key}[]\" type=\"hidden\" value=\"{$v}\"/>";
}
} else {
if (strcmp($key, "notes") == 0 ) {
$str = htmlentities($value, ENT_QUOTES);
echo "<input name=\"{$key}\" id=\"{$key}\" type=\"hidden\" value=\"{$str}\"/>";
} else if (strcmp($key, "fluxusername") != 0 ) {
echo "<input name=\"{$key}\" id=\"{$key}\" type=\"hidden\" value=\"{$value}\"/>";
}
}
}
?>
<label title="Used when downloading the data">Username (<a href="https://ameriflux-data.lbl.gov/Pages/RequestAccount.aspx" target="_blank">register here</a>)</label>
<input id="fluxusername" name="fluxusername" type="text" value="<?php echo $fluxusername; ?>" onkeyup="validate()"/>
<div class="spacer"></div>
<span id="error" class="small"> </span>
<input id="prev" type="button" value="Prev" onclick="prevStep();" />
<input id="next" type="button" value="Agree" onclick="nextStep();" />
<div class="spacer"></div>
</form>
<?php left_footer(); ?>
</div>
<div id="output">
<h1>Data Policy</h1>
<br>
<p>The AmeriFlux Network data offered on this website are contributed by individual AmeriFlux scientists, who share their data openly with the global community.</p>
<h2>AmeriFlux Data Use Policy</h2>
<p>The AmeriFlux policy is that all data should be properly acknowledged, and that data contributors should have the opportunity to make an intellectual contribution to the papers that use their data and as a result have the opportunity to be a co-author.</p>
<br/>
<p>When you use AmeriFlux data:</p>
<ul>
<li>Inform the AmeriFlux scientist(s) who contributed the data how you plan to use the data and of any publication plans.</li>
<li>Initiate contact with the data contributor, so that they have the opportunity to contribute substantively and as a result to be a co-author.</li>
<li>Acknowledge AmeriFlux data by citing the relevant DOI or paper(s), and/or acknowledging funding for the site support. If the data download was not accompanied by the preferred acknowledgment language, ask the site principal investigator.</li>
<li>Acknowledge the AmeriFlux data resource as "funding for AmeriFlux data resources was provided by the U.S. Department of Energy’s Office of Science."</li>
</ul>
<br>
<p>For more information see <a href="http://ameriflux.lbl.gov/data/data-policy/" target="_blank">http://ameriflux.lbl.gov/data/data-policy/</a>.</p>
</div>
<div id="footer"><?php echo get_footer(); ?></div>
</div>
</body>
</html>
<?php
close_database();
?>