-
Notifications
You must be signed in to change notification settings - Fork 5
/
export.php
322 lines (297 loc) · 11.5 KB
/
export.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
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?php
session_start();
/*
* Testing table print
*/
function print_row(&$item) {
echo('<tr>');
array_walk($item, 'print_cell');
echo('</tr>');
}
function print_cell(&$item) {
if($item != null)
{
echo('<td>');
echo($item);
echo('</td>');
}
}
function print_head(&$item) {
echo('<th>');
echo($item);
echo('</th>');
}
/*
* End Testing Table print
*/
if (count($_SESSION['txns']) > 0)
{
//print_r(sprintf('%d trades found in your account.', count($_SESSION['txns'])));
//print("\n");
$txns = &$_SESSION['txns'];
$cols = array_keys($_SESSION['txns'][0]);
//print_r(json_encode($cols));
}
/* Uncomment to write the transactions to a file
print("\nWriting to txns.json...\n");
$fp = fopen('txns.json', 'w');
fwrite($fp, json_encode($_SESSION['txns']));
fclose($fp);
print("\nFinished writing to txns.json\n");
*/
/*
echo "<table>";
array_walk($_SESSION['txns'], 'print_row');
echo "</table>";
*/
//echo "<script type='text/javascript'>";
//$txns = json_encode($_SESSION['txns']);
//echo "var txns_js = ". $txns . ";\n";
//echo </script>
print("</pre>");
?>
<html>
<head>
<!-- jQuery -->
<script src="vendors/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendors/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Data table JavaScript -->
<script src="vendors/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="vendors/bower_components/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="vendors/bower_components/datatables.net-buttons/js/buttons.flash.min.js"></script>
<script src="vendors/bower_components/jszip/dist/jszip.min.js"></script>
<script src="vendors/bower_components/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/bower_components/pdfmake/build/vfs_fonts.js"></script>
<script src="vendors/bower_components/datatables.net-buttons/js/buttons.html5.min.js"></script>
<script src="vendors/bower_components/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="dist/js/export-table-data.js"></script>
<!-- Slimscroll JavaScript -->
<script src="dist/js/jquery.slimscroll.js"></script>
<!-- Owl JavaScript -->
<script src="vendors/bower_components/owl.carousel/dist/owl.carousel.min.js"></script>
<!-- Switchery JavaScript -->
<script src="vendors/bower_components/switchery/dist/switchery.min.js"></script>
<!-- Fancy Dropdown JS -->
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<!-- Init JavaScript -->
<script src="dist/js/init.js"></script>
<!-- Data table CSS -->
<link href="vendors/bower_components/datatables/media/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
<!-- Custom CSS -->
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Top Menu Items -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="mobile-only-brand pull-left">
<div class="nav-header pull-left">
<div class="logo-wrap">
<a href="index.html">
<img class="brand-img" src="dist/img/logo.png" alt="brand"/>
<span class="brand-text">Robinhood-Insights</span>
</a>
</div>
</div>
<a id="toggle_nav_btn" class="toggle-left-nav-btn inline-block ml-20 pull-left" href="javascript:void(0);"><i class="zmdi zmdi-menu"></i></a>
<a id="toggle_mobile_search" data-toggle="collapse" data-target="#search_form" class="mobile-only-view" href="javascript:void(0);"><i class="zmdi zmdi-search"></i></a>
<a id="toggle_mobile_nav" class="mobile-only-view" href="javascript:void(0);"><i class="zmdi zmdi-more"></i></a>
<form id="search_form" role="search" class="top-nav-search collapse pull-left">
<div class="input-group">
<input type="text" name="example-input1-group2" class="form-control" placeholder="Search">
<span class="input-group-btn">
<button type="button" class="btn btn-default" data-target="#search_form" data-toggle="collapse" aria-label="Close" aria-expanded="true"><i class="zmdi zmdi-search"></i></button>
</span>
</div>
</form>
</div>
<div id="mobile_only_nav" class="mobile-only-nav pull-right">
<ul class="nav navbar-right top-nav pull-right">
<li class="dropdown alert-drp">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="zmdi zmdi-notifications top-nav-icon"></i><span class="top-nav-icon-badge">5</span></a>
<ul class="dropdown-menu alert-dropdown" data-dropdown-in="bounceIn" data-dropdown-out="bounceOut">
<li>
<div class="notification-box-head-wrap">
<span class="notification-box-head pull-left inline-block">notifications</span>
<a class="txt-danger pull-right clear-notifications inline-block" href="javascript:void(0)"> clear all </a>
<div class="clearfix"></div>
<hr class="light-grey-hr ma-0"/>
</div>
</li>
<li>
<div class="streamline message-nicescroll-bar">
<div class="sl-item">
<a href="javascript:void(0)">
<div class="icon bg-green">
<i class="zmdi zmdi-flag"></i>
</div>
<div class="sl-content">
<span class="inline-block capitalize-font pull-left truncate head-notifications">
New subscription created</span>
<span class="inline-block font-11 pull-right notifications-time">2pm</span>
<div class="clearfix"></div>
<p class="truncate">Your customer subscribed for the basic plan. The customer will pay $25 per month.</p>
</div>
</a>
</div>
<hr class="light-grey-hr ma-0"/>
<div class="sl-item">
<a href="javascript:void(0)">
<div class="icon bg-yellow">
<i class="zmdi zmdi-trending-down"></i>
</div>
<div class="sl-content">
<span class="inline-block capitalize-font pull-left truncate head-notifications txt-warning">Server #2 not responding</span>
<span class="inline-block font-11 pull-right notifications-time">1pm</span>
<div class="clearfix"></div>
<p class="truncate">Some technical error occurred needs to be resolved.</p>
</div>
</a>
</div>
<hr class="light-grey-hr ma-0"/>
<div class="sl-item">
<a href="javascript:void(0)">
<div class="icon bg-blue">
<i class="zmdi zmdi-email"></i>
</div>
<div class="sl-content">
<span class="inline-block capitalize-font pull-left truncate head-notifications">2 new messages</span>
<span class="inline-block font-11 pull-right notifications-time">4pm</span>
<div class="clearfix"></div>
<p class="truncate"> The last payment for your G Suite Basic subscription failed.</p>
</div>
</a>
</div>
<hr class="light-grey-hr ma-0"/>
<div class="sl-item">
<a href="javascript:void(0)">
<div class="sl-avatar">
<img class="img-responsive" src="dist/img/avatar.jpg" alt="avatar"/>
</div>
<div class="sl-content">
<span class="inline-block capitalize-font pull-left truncate head-notifications">Sandy Doe</span>
<span class="inline-block font-11 pull-right notifications-time">1pm</span>
<div class="clearfix"></div>
<p class="truncate">Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit</p>
</div>
</a>
</div>
<hr class="light-grey-hr ma-0"/>
<div class="sl-item">
<a href="javascript:void(0)">
<div class="icon bg-red">
<i class="zmdi zmdi-storage"></i>
</div>
<div class="sl-content">
<span class="inline-block capitalize-font pull-left truncate head-notifications txt-danger">99% server space occupied.</span>
<span class="inline-block font-11 pull-right notifications-time">1pm</span>
<div class="clearfix"></div>
<p class="truncate">consectetur, adipisci velit.</p>
</div>
</a>
</div>
</div>
</li>
<li>
<div class="notification-box-bottom-wrap">
<hr class="light-grey-hr ma-0"/>
<a class="block text-center read-all" href="javascript:void(0)"> read all </a>
<div class="clearfix"></div>
</div>
</li>
</ul>
</li>
<li class="dropdown auth-drp">
<a href="#" class="dropdown-toggle pr-0" data-toggle="dropdown"><img src="dist/img/user1.png" alt="user_auth" class="user-auth-img img-circle"/><span class="user-online-status"></span></a>
<ul class="dropdown-menu user-auth-dropdown" data-dropdown-in="flipInX" data-dropdown-out="flipOutX">
<li>
<a href="profile.html"><i class="zmdi zmdi-account"></i><span>Profile</span></a>
</li>
<li>
<a href="#"><i class="zmdi zmdi-card"></i><span>my balance</span></a>
</li>
<li>
<a href="inbox.html"><i class="zmdi zmdi-email"></i><span>Inbox</span></a>
</li>
<li>
<a href="#"><i class="zmdi zmdi-settings"></i><span>Settings</span></a>
</li>
<li class="divider"></li>
<li class="sub-menu show-on-hover">
<a href="#" class="dropdown-toggle pr-0 level-2-drp"><i class="zmdi zmdi-check text-success"></i> available</a>
<ul class="dropdown-menu open-left-side">
<li>
<a href="#"><i class="zmdi zmdi-check text-success"></i><span>available</span></a>
</li>
<li>
<a href="#"><i class="zmdi zmdi-circle-o text-warning"></i><span>busy</span></a>
</li>
<li>
<a href="#"><i class="zmdi zmdi-minus-circle-outline text-danger"></i><span>offline</span></a>
</li>
</ul>
</li>
<li class="divider"></li>
<li>
<a href="#"><i class="zmdi zmdi-power"></i><span>Log Out</span></a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<!-- /Top Menu Items -->
<!-- Main Content -->
<div class="page-wrapper">
<div class="container-fluid">
<!-- Title -->
<div class="row heading-bg">
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
<h5 class="txt-dark">Export</h5>
</div>
<!-- Breadcrumb -->
<div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
<ol class="breadcrumb">
<li><a href="index.html">Dashboard</a></li>
<li class="active"><span>Export Transactions</span></li>
</ol>
</div>
<!-- /Breadcrumb -->
</div>
<!-- /Title -->
<!-- Row -->
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default card-view">
<div class="panel-wrapper collapse in">
<div class="panel-body">
<div class="table-wrap">
<div class="table-responsive">
<table id="example" class="table table-hover display pb-30" >
<thead>
<tr>
<?php array_walk($cols, 'print_head'); ?>
</tr>
</thead>
<tfoot>
<tr>
<?php array_walk($cols, 'print_head'); ?>
</tr>
</tfoot>
<tbody>
<?php array_walk($txns, 'print_row'); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /Row -->
</div>
</div>
<!-- /Main Content -->
</body>
</html>