-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex6.2.php
More file actions
251 lines (194 loc) · 7.38 KB
/
Copy pathindex6.2.php
File metadata and controls
251 lines (194 loc) · 7.38 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<?php
ini_set('max_execution_time', 500);
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dimension Tables</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
</head>
<style>
.custom-file-upload {
border: 1px solid #ccc;
display: inline-block;
padding: 6px 12px;
cursor: pointer;
}
/* Customize the label (the container) */
.container {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
font-size: 22px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default checkbox */
.container input {
position: absolute;
opacity: 0;
cursor: pointer;
}
/* Create a custom checkbox */
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
}
/* On mouse-over, add a grey background color */
.container:hover input ~ .checkmark {
background-color: #ccc;
}
/* When the checkbox is checked, add a blue background */
.container input:checked ~ .checkmark {
background-color: #2196F3;
}
/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Show the checkmark when checked */
.container input:checked ~ .checkmark:after {
display: block;
}
/* Style the checkmark/indicator */
.container .checkmark:after {
left: 9px;
top: 5px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
</style>
<body>
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<form id="reg" name="reg" method="post">
<?php
$tablenames = $_SESSION['tablenames'];
//echo $tablenames;
//echo "<br>";
//Multiple measures and multiple aggregate functions in required sequence
$measures=$_GET["values"];
$_SESSION['measures']=$measures;
//echo $measures;
//echo "<br>";
$agg_func = $_GET["agg_func"];
$_SESSION['agg_func']=$agg_func;
//echo $agg_func;
//echo "<br>";
$measureArray = explode(" ",$measures);
$measure_count = $_SESSION['measure_count'];
$selected_measures_count = $_GET['selected_measures_count'];
$_SESSION['selected_measures_count']=$selected_measures_count;
//echo $selected_measures_count;
$previouscomma=-1;
echo "<br>";
echo "<span class=\"login100-form-title\"> <font color=\"black\" >" . "Choose Mode of Lattice Creation" . "</font> </span>";
echo "<label class=\"container\">" . "Normal Lattice of Cuboids" . "<input type=\"checkbox\" id=\"" . "Normal" . "\" ><span class=\"checkmark\"></span></label>";
echo "<br>";
echo "<label class=\"container\">" . "Iceberg Optimized Lattice of Cuboids" . "<input type=\"checkbox\" id=\"" . "Iceberg" . "\" ><span class=\"checkmark\"></span></label>";
?>
</form>
<div align="center" class="container-login100-form-btn">
<button class="login100-form-btn" onclick="choose_mode()">
Submit
</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function choose_mode()
{
//alert("hello");
var count_mode = 0;
var mode="";
var myform = document.getElementById('reg');
var inputTags = myform.getElementsByTagName('input');
var checkboxCount = 0;
var iceberg_limit=0;
var iceberg_measure="";
//var measures = '<?php echo $measures; ?>';
//alert(measures);
var measureArray = <?php echo json_encode($measureArray); ?>;
var selected_measures_count = '<?php echo $selected_measures_count; ?>';
var iceberg_measure_msg = "";
for(var j=0; j<selected_measures_count; j++)
{
var temp = j+1;
iceberg_measure_msg += temp + " " + measureArray[j] + "\n";
}
//alert(iceberg_measure_msg);
for (var i=0, length = inputTags.length; i<length; i++) {
if (inputTags[i].type == 'checkbox' && document.getElementById(inputTags[i].id).checked==true) {
if(inputTags[i].id =='Iceberg')
{
var msg = "Please Enter The Measure on which to apply Iceberg Optimization: Available Choices: " + "\n" + iceberg_measure_msg;
iceberg_measure = prompt(msg);
iceberg_limit = prompt("Please Enter The Iceberg Limit:");
}
count_mode++;
mode=mode.concat(inputTags[i].id).concat(" ");
}
}
mode=mode.substr(0,mode.length-1);
if(count_mode == 0)
{
alert("Please select one Mode of Creation for Lattice of Cuboids");
}
else if(count_mode == 2)
{
alert("Please select ONLY one Mode of Creation for Lattice of Cuboids");
}
else
{
window.location.href = "index6.3.php?mode="+mode+"&iceberg_limit="+iceberg_limit+"&iceberg_measure="+iceberg_measure;
}
}
</script>
<!--===============================================================================================-->
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/select2/select2.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/tilt/tilt.jquery.min.js"></script>
<!--===============================================================================================-->
<script src="js/main.js"></script>
</body>
</html>