|
1
|
|
|
<div id="export-options"> |
|
2
|
|
|
<div class="dropdown pull-right"> |
|
3
|
|
|
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> |
|
4
|
|
|
Export |
|
5
|
|
|
<span class="caret"></span> |
|
6
|
|
|
</button> |
|
7
|
|
|
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1"> |
|
8
|
|
|
<li><a href="<?=base_url("user/history/export/json")?>">Export as JSON</a></li> |
|
9
|
|
|
<li><a href="<?=base_url("user/history/export/csv")?>">Export as CSV</a></li> |
|
10
|
|
|
</ul> |
|
11
|
|
|
</div> |
|
12
|
|
|
<div class="clearfix"></div> |
|
13
|
|
|
</div> |
|
14
|
|
|
|
|
15
|
|
|
<table class="table table-striped table-bordered tablesorter"> |
|
16
|
|
|
<thead> |
|
17
|
|
|
<tr> |
|
18
|
|
|
<th>Updated at</th> |
|
19
|
|
|
<th class="w-50">Title</th> |
|
20
|
|
|
<th>What changed</th> |
|
21
|
|
|
</tr> |
|
22
|
|
|
</thead> |
|
23
|
|
|
<tbody> |
|
24
|
|
View Code Duplication |
<?php foreach($historyData as $row) { ?> |
|
25
|
|
|
<tr> |
|
26
|
|
|
<td><?=$row['updated_at']?></td> |
|
27
|
|
|
|
|
28
|
|
|
<td> |
|
29
|
|
|
<i class="sprite-site sprite-<?=$row['site_sprite']?>" title="<?=$row['site']?>"></i> |
|
30
|
|
|
<a href="<?=$row['title_url']?>"><?=$row['title']?></a> |
|
31
|
|
|
</td> |
|
32
|
|
|
|
|
33
|
|
|
<td><?=$row['status']?></td> |
|
34
|
|
|
</tr> |
|
35
|
|
|
<?php } ?> |
|
36
|
|
|
</tbody> |
|
37
|
|
|
</table> |
|
38
|
|
|
|
|
39
|
|
|
<nav aria-label="Page navigation" style="text-align:center"> |
|
40
|
|
|
<ul class="pagination"> |
|
41
|
|
|
<li class="page-item <?=($currentPage == 1 ? 'disabled' : '')?>"> |
|
42
|
|
|
<a class="page-link" href="<?=base_url("user/history/".($currentPage - 1))?>" aria-label="Previous"> |
|
43
|
|
|
<span aria-hidden="true">«</span> |
|
44
|
|
|
<span class="sr-only">Previous</span> |
|
45
|
|
|
</a> |
|
46
|
|
|
</li> |
|
47
|
|
|
|
|
48
|
|
View Code Duplication |
<?php foreach(range(1, $totalPages) as $page) { ?> |
|
49
|
|
|
<li class="page-item <?=($currentPage == $page ? 'active' : '')?>"><a class="page-link" href="<?=base_url("user/history/{$page}")?>"><?=$page?></a></li> |
|
50
|
|
|
<?php } ?> |
|
51
|
|
|
|
|
52
|
|
|
<li class="page-item <?=(($currentPage == 1 || $currentPage == $totalPages) ? 'disabled' : '')?>"> |
|
53
|
|
|
<a class="page-link" href="<?=base_url("user/history/".($currentPage + 1))?>" aria-label="Next"> |
|
54
|
|
|
<span aria-hidden="true">»</span> |
|
55
|
|
|
<span class="sr-only">Next</span> |
|
56
|
|
|
</a> |
|
57
|
|
|
</li> |
|
58
|
|
|
</ul> |
|
59
|
|
|
</nav> |
|
60
|
|
|
|
|
61
|
|
|
|
|
62
|
|
|
<!--<script src="--><?//=asset_url()?><!--vendor/js/jquery.simplePagination.js" defer></script>--> |
|
|
|
|
|
|
63
|
|
|
<script> |
|
64
|
|
|
const currentPagination = parseInt("<?=$currentPage?>"); |
|
65
|
|
|
const totalPagination = parseInt("<?=$totalPages?>"); |
|
66
|
|
|
const titleID = 0; //Hack |
|
67
|
|
|
</script> |
|
68
|
|
|
|
Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.
As a precaution to avoid these problems better use the long opening tag
<?php.