This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.php
432 lines (367 loc) · 18.2 KB
/
template.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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<?PHP
$pagetitle = 'template.php';
// include config variables
include('config/config.inc.php');
// connect to db
include($securedbcreds);
$con = mysqli_connect($servername,$username,$password,$database) or die("SQL connection error");
// include php functions
include($siteincludefiles.'functions.inc.php');
// include tickdata
include($siteincludefiles.'tickdata.inc.php');
?>
<!DOCTYPE html>
<html>
<?PHP include($siteincludefiles.'head.inc.php'); ?>
<body>
<div id="page">
<?PHP include($siteincludefiles.'header.inc.php'); ?>
<div id="pagecontainer">
<?PHP include($siteincludefiles.'sidebar.inc.php'); ?>
<?PHP include($siteincludefiles.'pagetitle.inc.php'); ?>
<div id="articles">
<div class="article">
<div class="articletitle">
Article with text
</div>
<div class="articletabs">
<button class="tablinkgroup1" onclick="openTab(event, 'test', 'tablinkgroup1', 'articletabcontent')">Test</button>
<button class="tablinkgroup1" onclick="openTab(event, 'text', 'tablinkgroup1', 'articletabcontent')">Text</button>
<button class="tablinkgroup1" onclick="openTab(event, 'lorem', 'tablinkgroup1', 'articletabcontent')" id="defaultTab">Lorem Ipsum</button>
</div>
<div class="articlecontents">
<div id="lorem" class="articletabcontent">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.<br />
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.<br />
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.<br />
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
<div id="text" class="articletabcontent">
text<br />
<br />
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</div>
<div id="test" class="articletabcontent">
<div id="2868635968929_system_table_div"></div>
<script type="text/javascript">
google.load('visualization', '1.1', { packages: ['corechart'] });
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('date', 'Date');
data.addColumn('number', 'Briganii Partners');data.addColumn('number', 'Chelini Jet Raiders');data.addColumn('number', 'HIP 69699 for Equality');data.addColumn('number', 'HIP 69699 Holdings');data.addColumn('number', 'Independent Defence Agency');data.addColumn('number', 'New Juduni Liberals');data.addColumn('number', 'Pilots\' Federation Local Branch');
data.addRows([
[new Date("2020-02-10"), null, null, null, null, null, 0.0719280000, null],
[new Date("2020-02-11"), 0.0689310000, 0.0149850000, 0.0529470000, 0.1710000000, 0.3720000000, 0.0719280000, 0.0000000000],
[new Date("2020-02-12"), 0.1027940000, 0.0150000000, 0.1228770000, 0.1700000000, 0.3803800000, 0.0700000000, 0.0000000000],
[new Date("2020-02-13"), , , 0.1230000000, 0.1700000000, 0.2250000000, , 0.0000000000],
[new Date("2020-02-14"), 0.0679320000, 0.0099900000, 0.0519480000, 0.1418580000, 0.6573430000, 0.0709290000, 0.0000000000]
]);
var options = {
legend: { position: 'bottom', maxLines: 5 },
width: '100%',
height: '250',
interpolateNulls: true
};
//var formatter = new google.visualization.DateFormat({pattern: 'dd/MM/yyyy'});
var chart = new google.visualization.LineChart(document.getElementById('linechart_material'));
chart.draw(data, options);
}
</script>
<div id="linechart_material"></div>
</div>
<script>
// Get the element with id="defaultTab" and click on it
document.getElementById("defaultTab").click();
</script>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Timeline of stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {'packages':['timeline']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'President' });
dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' });
dataTable.addRows([
[ 'Washington', new Date(1789, 3, 30), new Date(1797, 2, 4) ],
[ 'Adams', new Date(1797, 2, 4), new Date(1801, 2, 4) ],
[ 'Jefferson', new Date(1801, 2, 4), new Date(1809, 2, 4) ]]);
chart.draw(dataTable);
}
</script>
<div id="timeline" style="width: 990px;"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Table with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {'packages':['table']});
google.charts.setOnLoadCallback(drawTable);
function drawTable() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', 'Salary');
data.addColumn('boolean', 'Full Time Employee');
data.addRows([
['Mike', {v: 10000, f: '$10,000'}, true],
['Jim', {v:8000, f: '$8,000'}, false],
['Alice', {v: 12500, f: '$12,500'}, true],
['Bob', {v: 7000, f: '$7,000'}, true]
]);
var table = new google.visualization.Table(document.getElementById('table_div'));
table.draw(data, {showRowNumber: true, width: '100%', height: '100%'});
}
</script>
<div id="table_div"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Treemap with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {'packages':['treemap']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Location', 'Parent', 'Market trade volume (size)', 'Market increase/decrease (color)'],
['Global', null, 0, 0],
['America', 'Global', 0, 0],
['Europe', 'Global', 0, 0],
['Asia', 'Global', 0, 0],
['Australia', 'Global', 0, 0],
['Africa', 'Global', 0, 0],
['Brazil', 'America', 11, 10],
['USA', 'America', 52, 31],
['Mexico', 'America', 24, 12],
['Canada', 'America', 16, -23],
['France', 'Europe', 42, -11],
['Germany', 'Europe', 31, -2],
['Sweden', 'Europe', 22, -13],
['Italy', 'Europe', 17, 4],
['UK', 'Europe', 21, -5],
['China', 'Asia', 36, 4],
['Japan', 'Asia', 20, -12],
['India', 'Asia', 40, 63],
['Laos', 'Asia', 4, 34],
['Mongolia', 'Asia', 1, -5],
['Israel', 'Asia', 12, 24],
['Iran', 'Asia', 18, 13],
['Pakistan', 'Asia', 11, -52],
['Egypt', 'Africa', 21, 0],
['S. Africa', 'Africa', 30, 43],
['Sudan', 'Africa', 12, 2],
['Congo', 'Africa', 10, 12],
['Zaire', 'Africa', 8, 10]
]);
tree = new google.visualization.TreeMap(document.getElementById('treechart_div'));
tree.draw(data, {
minColor: '#f00',
midColor: '#ddd',
maxColor: '#0d0',
headerHeight: 15,
fontColor: 'black',
showScale: true
});
}
</script>
<div id="treechart_div" style="width: 900px; height: 500px;"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Organisation chart with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {packages:["orgchart"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('string', 'Manager');
data.addColumn('string', 'ToolTip');
// For each orgchart box, provide the name, manager, and tooltip to show.
data.addRows([
[{'v':'Mike', 'f':'Mike<div style="color:red; font-style:italic">President</div>'},
'', 'The President'],
[{'v':'Jim', 'f':'Jim<div style="color:red; font-style:italic">Vice President</div>'},
'Mike', 'VP'],
['Alice', 'Mike', ''],
['Bob', 'Jim', 'Bob Sponge'],
['Carol', 'Bob', '']
]);
// Create the chart.
var chart = new google.visualization.OrgChart(document.getElementById('orgchart_div'));
// Draw the chart, setting the allowHtml option to true for the tooltips.
chart.draw(data, {'allowHtml':true});
}
</script>
</head>
<div id="orgchart_div"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
3D Pie chart with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities',
is3D: true,
};
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
chart.draw(data, options);
}
</script>
<div id="piechart_3d" style="width: 900px; height: 500px;"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Pie chart with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities'
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
<div id="piechart" style="width: 900px; height: 500px;"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Bubble chart with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawSeriesChart);
function drawSeriesChart() {
var data = google.visualization.arrayToDataTable([
['ID', 'Life Expectancy', 'Fertility Rate', 'Region', 'Population'],
['CAN', 80.66, 1.67, 'North America', 33739900],
['DEU', 79.84, 1.36, 'Europe', 81902307],
['DNK', 78.6, 1.84, 'Europe', 5523095],
['EGY', 72.73, 2.78, 'Middle East', 79716203],
['GBR', 80.05, 2, 'Europe', 61801570],
['IRN', 72.49, 1.7, 'Middle East', 73137148],
['IRQ', 68.09, 4.77, 'Middle East', 31090763],
['ISR', 81.55, 2.96, 'Middle East', 7485600],
['RUS', 68.6, 1.54, 'Europe', 141850000],
['USA', 78.09, 2.05, 'North America', 307007000]
]);
var options = {
title: 'Correlation between life expectancy, fertility rate ' +
'and population of some world countries (2010)',
hAxis: {title: 'Life Expectancy'},
vAxis: {title: 'Fertility Rate'},
bubble: {textStyle: {fontSize: 11}} };
var chart = new google.visualization.BubbleChart(document.getElementById('series_chart_div'));
chart.draw(data, options);
}
</script>
<div id="series_chart_div" style="width: 900px; height: 500px;"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
<div class="article">
<div class="articletitle">
Line chart with stuff
</div>
<div class="articlecontents">
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses'],
['2004', 1000, 400],
['2005', 1170, 460],
['2006', 660, 1120],
['2007', 1030, 540]
]);
var options = {
title: 'Company Performance',
curveType: 'function',
legend: { position: 'bottom' }
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
</script>
<div id="curve_chart" style="width: 900px; height: 500px"></div>
</div>
<div class="articlefooter">
sidenotes, disclaimers and signatures
</div>
</div>
</div>
</div>
<?PHP include($siteincludefiles.'footer.inc.php'); ?>
</div>
</body>
</html>