| 14956 |
manas |
1 |
<head>
|
|
|
2 |
<style>
|
|
|
3 |
table, th, td {
|
|
|
4 |
border: 1px solid black;
|
|
|
5 |
}
|
|
|
6 |
</style>
|
|
|
7 |
</head>
|
| 14955 |
manas |
8 |
<div class="notificationCampaigns index">
|
|
|
9 |
|
|
|
10 |
<h2><?php echo __('Notification Campaigns'); ?></h2>
|
|
|
11 |
|
| 14990 |
manas |
12 |
<table cellpadding="0" cellspacing="0" border="1" class="table table-striped" >
|
| 14955 |
manas |
13 |
<tr>
|
| 14956 |
manas |
14 |
<th style="text-align:center"><?php echo $this->Paginator->sort('id'); ?></th>
|
|
|
15 |
<th style="text-align:center"><?php echo $this->Paginator->sort('name'); ?></th>
|
|
|
16 |
<th style="text-align:center"><?php echo $this->Paginator->sort('title'); ?></th>
|
|
|
17 |
<th style="text-align:center"><?php echo $this->Paginator->sort('created'); ?></th>
|
| 14967 |
manas |
18 |
<th style="text-align:center"><?php echo $this->Paginator->sort('expiresat'); ?></th>
|
| 14956 |
manas |
19 |
<th style="text-align:center">Total</th>
|
| 15575 |
manas |
20 |
<th style="text-align:center">Failed</th>
|
| 15004 |
manas |
21 |
<th style="text-align:center">Success</th>
|
| 14956 |
manas |
22 |
<th style="text-align:center">Recieved</th>
|
| 15575 |
manas |
23 |
<th style="text-align:center">Expired</th>
|
|
|
24 |
<th style="text-align:center">Gap</th>
|
| 14956 |
manas |
25 |
<th style="text-align:center">Opened</th>
|
|
|
26 |
<th style="text-align:center">Referrer</th>
|
| 15575 |
manas |
27 |
<th style="text-align:center">Login</th>
|
| 14956 |
manas |
28 |
<th style="text-align:center" class="actions"><?php echo __('Actions'); ?></th>
|
| 14955 |
manas |
29 |
|
|
|
30 |
</tr>
|
|
|
31 |
|
| 15581 |
manas |
32 |
<?php foreach ($notificationCampaigns as $key=> $notificationCampaign): ?>
|
| 15004 |
manas |
33 |
<?php
|
|
|
34 |
if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])){
|
| 15581 |
manas |
35 |
|
|
|
36 |
$successSent=$notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'];}
|
|
|
37 |
else{
|
| 15004 |
manas |
38 |
$successSent=0;
|
|
|
39 |
}
|
|
|
40 |
if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])){
|
|
|
41 |
$successFailed=$notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'];
|
|
|
42 |
}else{
|
|
|
43 |
$successFailed=0;
|
|
|
44 |
}
|
|
|
45 |
?>
|
| 14955 |
manas |
46 |
<tr>
|
| 15004 |
manas |
47 |
|
| 14955 |
manas |
48 |
<td align="center" width="4%"><?php echo h($notificationCampaign['NotificationCampaign']['id']); ?> </td>
|
|
|
49 |
<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['name']); ?> </td>
|
|
|
50 |
<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['title']); ?> </td>
|
| 14967 |
manas |
51 |
<!-- <td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['message']); ?> </td> -->
|
| 14955 |
manas |
52 |
<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['created']); ?> </td>
|
| 14967 |
manas |
53 |
<td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['expiresat']); ?> </td>
|
| 15004 |
manas |
54 |
<td> <?php echo h($successSent+ $successFailed) ?></td>
|
| 15575 |
manas |
55 |
|
|
|
56 |
<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])){ echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',0));} else {echo h('0');}?> </td>
|
|
|
57 |
|
| 15581 |
manas |
58 |
<td align="center" width="15%"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])){echo
|
|
|
59 |
$this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',1)); } else {echo h('0');}?>
|
|
|
60 |
<br>
|
|
|
61 |
<?php echo h('Trackable= '.$notificationWithVersionCode[$key]);?>
|
|
|
62 |
<br>
|
|
|
63 |
<?php echo h('%= '.round((($notificationWithVersionCode[$key])/($successSent+$successFailed))*100));?>
|
|
|
64 |
</td>
|
| 14955 |
manas |
65 |
|
|
|
66 |
<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){echo
|
|
|
67 |
$this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'recieved',1)); } else {echo h('0');}?> </td>
|
|
|
68 |
|
| 15575 |
manas |
69 |
<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'expired',1)); } else {echo h('0');}?> </td>
|
|
|
70 |
|
|
|
71 |
<?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']))
|
|
|
72 |
{$recieved = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']; } else {$recieved =0;}?>
|
|
|
73 |
<?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])){$expired = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']; } else {$expired=0;}?>
|
| 14956 |
manas |
74 |
|
| 15581 |
manas |
75 |
<td align="center" width="10%"><?php echo($notificationWithVersionCode[$key] - ($recieved+$expired));?>
|
|
|
76 |
<br>
|
|
|
77 |
<?php if($notificationWithVersionCode[$key]!=0){ echo('%= '.round((($notificationWithVersionCode[$key] - ($recieved+$expired))/$notificationWithVersionCode[$key])*100));}else {echo('%= 0');}?>
|
|
|
78 |
</td>
|
| 14955 |
manas |
79 |
<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['opened']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['opened'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['opened'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'opened',1)); } else {echo h('0');}?> </td>
|
|
|
80 |
<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['referrer']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['referrer'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['referrer'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'referrer',1)); } else {echo h('0');}?> </td>
|
|
|
81 |
<td align="center"><?php if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['login']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['login'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['login'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'login',1)); } else {echo h('0');}?> </td>
|
| 15004 |
manas |
82 |
|
| 14967 |
manas |
83 |
<td align="center" width="15%" class="actions">
|
| 15004 |
manas |
84 |
|
| 14955 |
manas |
85 |
<?php echo $this->Html->link(__('View'), array('action' => 'view', $notificationCampaign['NotificationCampaign']['id'])); ?>
|
|
|
86 |
|
|
|
87 |
<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $notificationCampaign['NotificationCampaign']['id'])); ?>
|
|
|
88 |
<!--<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $notificationCampaign['NotificationCampaign']['id']), null, __('Are you sure you want to delete # %s?', $notificationCampaign['NotificationCampaign']['id'])); ?> -->
|
|
|
89 |
</td>
|
|
|
90 |
</tr>
|
|
|
91 |
<?php endforeach; ?>
|
|
|
92 |
</table>
|
|
|
93 |
<p>
|
|
|
94 |
<?php
|
|
|
95 |
echo $this->Paginator->counter(array(
|
|
|
96 |
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
|
|
97 |
));
|
|
|
98 |
?> </p>
|
|
|
99 |
<div class="paging">
|
|
|
100 |
<?php
|
|
|
101 |
echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
|
|
|
102 |
echo $this->Paginator->numbers(array('separator' => ' '));
|
|
|
103 |
echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
|
|
|
104 |
?>
|
|
|
105 |
</div>
|
| 15575 |
manas |
106 |
</div>
|