| 16811 |
manas |
1 |
<div class="appTransactions index">
|
|
|
2 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
|
|
|
3 |
<h2><?php echo __('App Transactions App Wise'); ?></h2>
|
| 16813 |
manas |
4 |
<h4><?php echo __('Total Clicks '.$totalClicks);?></h4>
|
|
|
5 |
<h4><?php echo __('Total Approved '.$totalApproved);?></h4>
|
|
|
6 |
<h4><?php echo __('Overall Conversion Percentage '.ceil(($totalApproved/$totalClicks)*100)) . '%';?></h4>
|
| 16811 |
manas |
7 |
<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/appwise">
|
|
|
8 |
<div><select id="mySelect">
|
|
|
9 |
<option value="today">Today</option>
|
|
|
10 |
<option value="yesterday">Yesterday</option>
|
|
|
11 |
<option value="range">Date Range</option>
|
|
|
12 |
</select></div>
|
|
|
13 |
<div class="input-group col-xs-6 text-left" id="date_range" >
|
|
|
14 |
Date From<input type="date" name="date_from" value="Date"/>
|
|
|
15 |
Date To<input type="date" name="date_to" value="Date"/>
|
|
|
16 |
<div class="input-group col-xs-6 text-right" id="remote">
|
|
|
17 |
<div class="input-group-btn w25px">
|
|
|
18 |
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
|
|
19 |
</div>
|
|
|
20 |
</div>
|
|
|
21 |
</div>
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
</form>
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
<table cellpadding="0" cellspacing="0" class="table table-striped">
|
|
|
28 |
<tr>
|
|
|
29 |
<th><?php echo $this->Paginator->sort('app_id'); ?></th>
|
|
|
30 |
<th><?php echo $this->Paginator->sort('app_name'); ?></th>
|
| 16813 |
manas |
31 |
<th><?php echo $this->Paginator->sort('clicks'); ?></th>
|
| 16811 |
manas |
32 |
<th><?php echo $this->Paginator->sort('approved'); ?></th>
|
|
|
33 |
<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th>
|
|
|
34 |
|
|
|
35 |
</tr>
|
|
|
36 |
|
|
|
37 |
<?php foreach ($appTransactions as $appTransaction): ?>
|
|
|
38 |
<tr>
|
|
|
39 |
<td><?php echo h($appTransaction['AppTransaction']['app_id']); ?> </td>
|
|
|
40 |
<td><?php echo h($appTransaction['AppTransaction']['app_name']); ?> </td>
|
|
|
41 |
<td><?php echo h($appTransaction[0]['count']); ?> </td>
|
|
|
42 |
<td><?php if(!isset($appTransaction['AppTransaction']['approved'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['approved']);}; ?> </td>
|
|
|
43 |
<td><?php if(!isset($appTransaction['AppTransaction']['conversion_percentage'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['conversion_percentage']);}; ?> </td>
|
|
|
44 |
</tr>
|
|
|
45 |
<?php endforeach; ?>
|
|
|
46 |
</table>
|
|
|
47 |
<p>
|
|
|
48 |
<?php
|
|
|
49 |
echo $this->Paginator->counter(array(
|
|
|
50 |
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
|
|
51 |
));
|
|
|
52 |
?> </p>
|
|
|
53 |
<div class="paging">
|
|
|
54 |
<?php
|
|
|
55 |
echo $this->Paginator->prev('< ' . __('previous '), array(), null, array('class' => 'prev disabled'));
|
|
|
56 |
echo $this->Paginator->numbers(array('separator' => ' '));
|
|
|
57 |
echo $this->Paginator->next(__(' next') . ' >', array(), null, array('class' => 'next disabled'));
|
|
|
58 |
?>
|
|
|
59 |
</div>
|
|
|
60 |
<script type="text/javascript">
|
|
|
61 |
$('#mySelect').on('change', function() {
|
|
|
62 |
var value = $(this).val();
|
|
|
63 |
if(value=='yesterday'){
|
|
|
64 |
$('#date_range').hide();
|
|
|
65 |
document.location = '/admin/appTransactions/appwise?date=yesterday';
|
|
|
66 |
}
|
|
|
67 |
if(value=='today'){
|
|
|
68 |
$('#date_range').hide();
|
|
|
69 |
document.location = '/admin/appTransactions/appwise';
|
|
|
70 |
}
|
|
|
71 |
if(value=='range'){
|
|
|
72 |
$('#date_range').show();
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
});
|
|
|
76 |
</script>
|
|
|
77 |
<script type="text/javascript">
|
|
|
78 |
$(document).ready(function() {
|
|
|
79 |
if($("#mySelect").val() == "today"){
|
|
|
80 |
$("#date_range").hide();
|
|
|
81 |
}
|
|
|
82 |
});
|
|
|
83 |
</script>
|
|
|
84 |
</div>
|