forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport1.php
61 lines (59 loc) · 2.05 KB
/
report1.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
<div class="row">
<div class="form-group col-sm-3">
<label for="datefrom1" class="col-sm-2 col-form-label"><?php echo __('From'); ?>:</label>
<div class="col-sm-10">
<input type="text" class="form-control datepicker" id="datefrom1">
</div>
</div>
<div class="form-group col-sm-3">
<label for="dateto1" class="col-sm-2 col-form-label"><?php echo __('To'); ?>:</label>
<div class="col-sm-10">
<input type="text" class="form-control datepicker" id="dateto1">
</div>
</div>
<div class="form-group col-sm-3">
<button class="btn btn-primary" id="refresh1"><i class="fa fa-refresh"></i> <?php echo __('Refresh'); ?></button>
</div>
</div>
<table id="dt1" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th><?php echo __('Channel'); ?></th>
<th><?php echo __('View'); ?></th>
</tr>
</thead>
<tfoot>
<tr>
<th><?php echo __('Channel'); ?></th>
<th><?php echo __('View'); ?></th>
</tr>
</tfoot>
</table>
<script type="text/javascript">
function getData1(){
return {
dateFrom: $( "#datefrom1" ).val(),
dateTo: $( "#dateto1" ).val()
};
}
$(document).ready(function () {
$( "#datefrom1" ).datepicker();
$( "#datefrom1" ).datepicker( "setDate", "<?php echo date("m/d/Y", strtotime("-30 days"));?>" );
$( "#dateto1" ).datepicker();
$( "#dateto1" ).datepicker( "setDate", "<?php echo date("m/d/Y");?>" );
$('#refresh1').click(function(){
$('#dt1').DataTable().ajax.reload();
});
$('#dt1').DataTable({
"ajax": {
'type': 'POST',
'url': "<?php echo $global['webSiteRootURL']; ?>view/report1.json.php",
'data': getData1,
},
"columns": [
{"data": "channel"},
{"data": "views"},
]
});
});
</script>