-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsampleDataList.php
198 lines (167 loc) · 8.32 KB
/
sampleDataList.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
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
<?php
require "../phplib/genlibraries.php";
redirectOutside();
$sampleList = getSampleDataList();
/*
$sampleList = scanDir($GLOBALS['sampleData']);
foreach ($sampleList as $sample){
if ( preg_match('/^\./', $sample) || !is_dir($GLOBALS['sampleData']) )
continue;
$sampleName=$sample;
//print "<option value=\"$sample\">$sampleName</option>";
}
*/
?>
<?php require "../htmlib/header.inc.php"; ?>
<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white page-container-bg-solid page-sidebar-fixed">
<div class="page-wrapper">
<?php require "../htmlib/top.inc.php"; ?>
<?php require "../htmlib/menu.inc.php"; ?>
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<!-- BEGIN CONTENT BODY -->
<div class="page-content">
<!-- BEGIN PAGE HEADER-->
<!-- BEGIN PAGE BAR -->
<div class="page-bar">
<ul class="page-breadcrumb">
<li>
<a href="home/">Home</a>
<i class="fa fa-circle"></i>
</li>
<li>
<span>Get Data</span>
<i class="fa fa-circle"></i>
</li>
<li>
<span>From Example Dataset</span>
</li>
</ul>
</div>
<!-- END PAGE BAR -->
<!-- BEGIN PAGE TITLE-->
<h1 class="page-title">Import Example Dataset
</h1>
<!-- END PAGE TITLE-->
<!-- END PAGE HEADER-->
<div class="row">
<div class="col-md-12">
<?php
$error_data = false;
if ($_SESSION['errorData']){
$error_data = true;
?>
<?php if ($_SESSION['errorData']['Info']) { ?>
<div class="alert alert-info">
<?php } else { ?>
<div class="alert alert-danger">
<?php } ?>
<?php
foreach($_SESSION['errorData'] as $subTitle=>$txts){
print "<strong>$subTitle</strong><br/>";
foreach($txts as $txt){
print "<div>$txt</div>";
}
}
unset($_SESSION['errorData']);
?>
</div>
<?php } ?>
</div>
</div>
<form name="sampleDataForm" id="sampleDataForm" action="applib/getData.php" method="post" class="horizontal-form">
<div class="portlet box blue-oleo">
<div class="portlet-title">
<div class="caption">
<div style="float:left;margin-right:20px;"> <i class="fa fa-database" ></i> Select example dataset</div>
</div>
</div>
<div class="portlet-body form">
<div class="form-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<input type="hidden" name="uploadType" value="sampleData"/>
<label class="control-label">List of example datasets</label>
<select class="form-control form-field-enabled valid select2naf" name="sampleData[]" id="sampleData" aria-invalid="false">
<option value="">Please select a sample</option>
<?php
foreach ($sampleList as $sampleId => $sample){
$sampleName=$sample['name'];
?><option value="<?php echo /*rtrim($sample['sample_path'], "/");*/ $sample['_id']; ?>"><?php echo $sampleName;?></option><?php
}
?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p class="font-grey-mint" >
<?php
foreach ($sampleList as $sampleId => $sample){
?><span class="display-hide sample-description" id="<?php echo /*rtrim($sample['sample_path'], "/");*/ $sample['_id']; ?>">
<i class="fa fa-sticky-note" aria-hidden="true"></i> <?php echo $sample['short_description'];?>
</span><?php
}
?>
</p>
</div>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn blue" id="btn-sample"><i class="fa fa-check"></i> Import</button>
</div>
</div>
</div>
</form>
<!-- INIT
<div class="row">
<div class="col-md-12">
<div class="portlet light portlet-fit bordered">
<div class="portlet-title">
<div class="caption">
<i class="icon-share font-red-sunglo hide"></i>
<span class="caption-subject font-dark bold uppercase">Select sample data</span>
</div>
</div>
<div class="portlet-body form">
<form name="sampleDataForm" id="sampleDataForm" action="applib/getData.php" method="post" class="horizontal-form">
<div class="form-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<input type="hidden" name="uploadType" value="sampleData"/>
<select class="form-control form-field-enabled valid select2naf" name="sampleData[]" id="sampleData" aria-invalid="false">
<option value="">Please select a sample</option>
<?php
$sampleList = scanDir($GLOBALS['sampleData']);
foreach ($sampleList as $sample){
if ( preg_match('/^\./', $sample) || !is_dir($GLOBALS['sampleData']) )
continue;
$sampleName=$sample;
?><option value="<?php echo $sample;?>"><?php echo $sampleName;?></option><?php
}
?>
</select>
</div>
</div>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn blue" style="float:right;">
<i class="fa fa-check"></i> Import</button>
</div>
</form>
</div>
- END EXAMPLE TABLE PORTLET
</div>
</div>
</div>-->
<!-- END CONTENT BODY -->
</div>
<!-- END CONTENT -->
<?php
require "../htmlib/footer.inc.php";
require "../htmlib/js.inc.php";
?>