| 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>
|
| 17215 |
naman |
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>
|
| 17215 |
naman |
54 |
<td> <?php //echo h($successSent+ $successFailed) ?>
|
|
|
55 |
<?php //echo $result[$notificationCampaign['NotificationCampaign']['id']]['sent'];?>
|
|
|
56 |
<?php
|
|
|
57 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['sent'])){
|
| 17221 |
naman |
58 |
echo $result[$notificationCampaign['NotificationCampaign']['id']]['sent'];
|
| 17236 |
naman |
59 |
$total = $result[$notificationCampaign['NotificationCampaign']['id']]['sent'];
|
|
|
60 |
}else {echo '0';
|
|
|
61 |
$total = 0;
|
|
|
62 |
}
|
| 17215 |
naman |
63 |
?>
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
</td>
|
| 15575 |
manas |
67 |
|
| 17215 |
naman |
68 |
<td align="center">
|
|
|
69 |
<?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');}?>
|
|
|
70 |
<?php
|
|
|
71 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['0'])){
|
| 17221 |
naman |
72 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['0'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',0));
|
| 17215 |
naman |
73 |
}else {echo h('0');}
|
|
|
74 |
?>
|
|
|
75 |
|
|
|
76 |
</td>
|
| 15575 |
manas |
77 |
|
| 17215 |
naman |
78 |
<td align="center" width="15%">
|
|
|
79 |
<?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',1)); } else {echo h('0');}?>
|
|
|
80 |
<?php
|
|
|
81 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['1'])){
|
| 17221 |
naman |
82 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['1'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',1));
|
| 17236 |
naman |
83 |
$success = $result[$notificationCampaign['NotificationCampaign']['id']]['1'];
|
|
|
84 |
}else {echo h('0');
|
|
|
85 |
$success = 0;
|
|
|
86 |
}
|
| 17215 |
naman |
87 |
?>
|
| 15581 |
manas |
88 |
<br>
|
| 17215 |
naman |
89 |
<?php //echo h('Trackable= '.$notificationWithVersionCode[$key]);?>
|
| 15581 |
manas |
90 |
<br>
|
| 17215 |
naman |
91 |
<?php //echo h('%= '.round((($notificationWithVersionCode[$key])/($successSent+$successFailed))*100));?>
|
| 17236 |
naman |
92 |
<?php echo h('Success %= '.round((($success)/($total))*100));?>
|
| 15581 |
manas |
93 |
</td>
|
| 14955 |
manas |
94 |
|
| 17215 |
naman |
95 |
<td align="center">
|
|
|
96 |
<?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'recieved',1)); } else {echo h('0');}?>
|
|
|
97 |
<?php
|
|
|
98 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){
|
|
|
99 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'recieved',1));
|
|
|
100 |
}else {echo h('0');}
|
|
|
101 |
?>
|
|
|
102 |
|
|
|
103 |
</td>
|
| 14955 |
manas |
104 |
|
| 17215 |
naman |
105 |
<td align="center">
|
|
|
106 |
<?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');}?>
|
|
|
107 |
<?php
|
|
|
108 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['expired'])){
|
|
|
109 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['expired'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'expired',1));
|
|
|
110 |
}else {echo h('0');}
|
|
|
111 |
?>
|
|
|
112 |
</td>
|
| 15575 |
manas |
113 |
|
| 17215 |
naman |
114 |
<?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){$recieved = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']; } else {$recieved =0;}?>
|
|
|
115 |
<?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])){$expired = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']; } else {$expired=0;}?>
|
|
|
116 |
<?php
|
|
|
117 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){
|
|
|
118 |
$recieved = $result[$notificationCampaign['NotificationCampaign']['id']]['recieved'];
|
|
|
119 |
}else {$recieved =0;}
|
|
|
120 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['expired'])){
|
|
|
121 |
$expired = $result[$notificationCampaign['NotificationCampaign']['id']]['expired'];
|
|
|
122 |
}else {$expired =0;}
|
| 17236 |
naman |
123 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['1'])){
|
|
|
124 |
$sent = $result[$notificationCampaign['NotificationCampaign']['id']]['1'];
|
| 17215 |
naman |
125 |
}else {$sent =0;}
|
|
|
126 |
?>
|
|
|
127 |
<td align="center" width="10%">
|
|
|
128 |
<?php //echo($notificationWithVersionCode[$key] - ($recieved+$expired));?>
|
|
|
129 |
<?php echo($sent - ($recieved+$expired));?>
|
|
|
130 |
|
| 15581 |
manas |
131 |
<br>
|
| 17215 |
naman |
132 |
<?php //if($notificationWithVersionCode[$key]!=0){ echo('%= '.round((($notificationWithVersionCode[$key] - ($recieved+$expired))/$notificationWithVersionCode[$key])*100));}else {echo('%= 0');}?>
|
|
|
133 |
<?php if($sent!=0){ echo('%= '.round((($sent - ($recieved+$expired))/$sent)*100));}else {echo('%= 0');}?>
|
| 15581 |
manas |
134 |
</td>
|
| 17215 |
naman |
135 |
<td align="center">
|
|
|
136 |
<?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');}?>
|
|
|
137 |
<?php
|
|
|
138 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['opened'])){
|
|
|
139 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['opened'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'opened',1));
|
|
|
140 |
}else {echo h('0');}
|
|
|
141 |
?>
|
|
|
142 |
|
|
|
143 |
</td>
|
|
|
144 |
<td align="center">
|
|
|
145 |
<?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');}?>
|
|
|
146 |
<?php
|
|
|
147 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['referrer'])){
|
|
|
148 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['referrer'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'referrer',1));
|
|
|
149 |
}else {echo h('0');}
|
|
|
150 |
?>
|
|
|
151 |
</td>
|
|
|
152 |
<td align="center">
|
|
|
153 |
<?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');}?>
|
|
|
154 |
<?php
|
|
|
155 |
if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['login'])){
|
|
|
156 |
echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['login'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'login',1));
|
|
|
157 |
}else {echo h('0');}
|
|
|
158 |
?>
|
|
|
159 |
</td>
|
| 15004 |
manas |
160 |
|
| 14967 |
manas |
161 |
<td align="center" width="15%" class="actions">
|
| 15004 |
manas |
162 |
|
| 14955 |
manas |
163 |
<?php echo $this->Html->link(__('View'), array('action' => 'view', $notificationCampaign['NotificationCampaign']['id'])); ?>
|
|
|
164 |
|
|
|
165 |
<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $notificationCampaign['NotificationCampaign']['id'])); ?>
|
| 17215 |
naman |
166 |
<!--<?php //echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $notificationCampaign['NotificationCampaign']['id']), null, __('Are you sure you want to delete # %s?', $notificationCampaign['NotificationCampaign']['id'])); ?> -->
|
| 14955 |
manas |
167 |
</td>
|
|
|
168 |
</tr>
|
|
|
169 |
<?php endforeach; ?>
|
|
|
170 |
</table>
|
|
|
171 |
<p>
|
|
|
172 |
<?php
|
|
|
173 |
echo $this->Paginator->counter(array(
|
|
|
174 |
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
|
|
175 |
));
|
|
|
176 |
?> </p>
|
|
|
177 |
<div class="paging">
|
|
|
178 |
<?php
|
|
|
179 |
echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
|
|
|
180 |
echo $this->Paginator->numbers(array('separator' => ' '));
|
|
|
181 |
echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
|
|
|
182 |
?>
|
|
|
183 |
</div>
|
| 15575 |
manas |
184 |
</div>
|