-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchoices.php
More file actions
executable file
·179 lines (158 loc) · 4.91 KB
/
choices.php
File metadata and controls
executable file
·179 lines (158 loc) · 4.91 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?php
session_save_path("tmp");
session_start();
if (isset($_POST['selectfile']))
$_SESSION['file'] = $_POST['selectfile'];
if (isset($_POST['selectscript']))
$_SESSION['script']=$_POST['selectscript'];
?>
<HTML>
<HEAD>
<script type="text/javascript" src="js/external/mootools.js"></script>
<link type="text/css" href="jquery-ui/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-ui/jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery-ui/ui/ui.core.js"></script>
<script type="text/javascript" src="jquery-ui/ui/ui.slider.js"></script>
<script type="text/javascript" src="jquery-ui/ui/ui.spinner.js"></script>
<script type="text/javascript" src="jquery-ui/external/mousewheel/jquery.mousewheel.min.js"></script>
<style type='text/css'>
.ui-spinner {
display: inline-block;
height: 24px;
}
.ui-slider .ui-slider-handle { width: 4px; margin-left: -2px; }
#slider-range {
top: -20px;
left: 230px;
position: relative;
width: 600px;
}
#smoothBoxDiv {
float: left;
margin-top: 8px;
margin-right: 12px;
}
.ui-spinner {
margin-top: 6px;
}
#dateOffsetValues {
width: 308px;
margin-top: 6px;
}
#dateOffsetDiv {
float: left;
margin-top: 8px;
margin-right: 12px;
}
.ui-slider-horizontal {
height: 1em;
}
.ui-slider-horizontal .ui-slider-handle {
top: -0.15em;
}
</style>
<script type="text/javascript">
$(function() {
$("#sbx").spinner({min: 1, max: 500, step: 12});
$("#slider-range").slider({
range: true,
min: 1700,
max: 10000,
step: 10,
values: [1800, 2100],
slide: function(event, ui) {
$("#hlimuser").val(ui.values[0] + ' - ' + ui.values[1]);
$("#radio2").attr("checked","checked");
}
});
$("#hlimuser").val($("#slider-range").slider("values", 0) + ' - ' + $("#slider-range").slider("values", 1));
});
</script>
</HEAD>
<BODY>
<FONT style="font-family: Arial, Helvetica, sans-serif;">
<p><span style="background-color:#99FF33;">
Recall of your choices
</span></p>
<?php
$ready=True;
print('<input type="radio" value="1" checked="checked"/>');
if (isset($_SESSION['simus']) && ($_SESSION['simus'] != "?"))
print(" ".implode(", ", $_SESSION['simus']));
else if (isset($_COOKIE['simus'])) {
print(" ".$_COOKIE['simus']);
$_SESSION['simus']=explode(",",$_COOKIE['simus']);
}
else {
print(" ?");
$ready=False;
}
print('<BR>');
print('<input type="radio" value="1" checked="checked"/>');
if (isset($_SESSION['file']) && ($_SESSION['file'] != "?") && ($_SESSION['file'] != "none"))
print(" ".$_SESSION['file']);
else if (isset($_COOKIE['file'])) {
print(" ".$_COOKIE['file']);
$_SESSION['file']=$_COOKIE['file'];
}
else {
print(" ?");
$ready=False;
}
print('<BR>');
if (!isset($_SESSION['url']))
$_SESSION['url']=$_COOKIE['url'];
if (!isset($_SESSION['allfiles']))
$_SESSION['allfiles']=explode(", ",$_COOKIE['allfiles']);
print('<input type="radio" value="1" checked="checked"/>');
if (isset($_SESSION['script']) && ($_SESSION['script'] != "?"))
print(" ".$_SESSION['script']);
else if (isset($_COOKIE['script'])) {
print(" ".$_COOKIE['script']);
$_SESSION['script']=$_COOKIE['script'];
}
else {
print(" ?");
$ready=False;
}
print('<BR>');
?>
<form name="formchoice" method="post" action="script.php" target="_blank">
<input style="float: left;" type="radio" value="1" checked="checked"/>
<div id="smoothBoxDiv">Smoothing box value:</div>
<input name="sbx" id="sbx" name="value" type="text" align="middle" style="font-family: Arial, Helvetica, sans-serif;font-size:90%;"
<?php
if (isset($_SESSION['sbx']))
print("value=\"".$_SESSION['sbx']."\"");
else if (isset($_COOKIE['sbx'])) {
print("value=\"".$_COOKIE['sbx']."\"");
$_SESSION['sbx']=$_COOKIE['sbx'];
}
else
print("value=\"12\"");
?>
title="Apply a boxcar window (running mean) to smooth the variable">
<BR>
<input type="radio" name="hlim" value="default" id="radio1" checked="checked"/>
<label for="radio1">Dates default</label><BR>
<input type="radio" name="hlim" value="user" id="radio2" />
<label for="radio2">Dates range:</label>
<input type="text" name="hlimuser" id="hlimuser" style="border:0;font-family: Arial, Helvetica, sans-serif;font-size:100%;" />
<div id="slider-range" title="Valid only with time series (See Step 4)"></div>
<input style="float: left;" type="radio" name="dateOffset" value="default" id="radio3" checked="checked"/>
<div id="dateOffsetDiv" title="Use this input to translate simulations on their dates">Date offset:</div>
<input type="text" name="dateOffsetValues" value="0" id="dateOffsetValues"
title="Indicate year offsets separated by comma (0 or empty for no change). Example: ,100,,150 to translate simu2 of 100 years and simu4 of 150 years" />
<BR>
<p>
<input type="submit" value="Prepare and Run the ferret script"
style="font-family: Arial, Helvetica, sans-serif;"
<?php
if (!($ready)) print("disabled\n");
?>
title="">
</p>
</form>
</FONT>
</BODY>
</HTML>