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