Rev 18250 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<head><style>table, th, td {border: 1px solid black;}</style></head><div class="notificationCampaigns index"><h2><?php echo __('Notification Campaigns'); ?></h2><table cellpadding="0" cellspacing="0" border="1" class="table table-striped" ><tr><th style="text-align:center"><?php echo $this->Paginator->sort('id'); ?></th><th style="text-align:center"><?php echo $this->Paginator->sort('name'); ?></th><th style="text-align:center"><?php echo $this->Paginator->sort('title'); ?></th><th style="text-align:center"><?php echo $this->Paginator->sort('created'); ?></th><th style="text-align:center"><?php echo $this->Paginator->sort('expiresat'); ?></th><th style="text-align:center">Total</th><th style="text-align:center">Failed</th><th style="text-align:center">Success</th><th style="text-align:center">Recieved</th><th style="text-align:center">Expired</th><th style="text-align:center">Gap</th><th style="text-align:center">Opened</th><th style="text-align:center">Referrer</th><th style="text-align:center">Login</th><th style="text-align:center">Total Sms</th><th style="text-align:center">Failed Sms</th><th style="text-align:center">Success Sms</th><th style="text-align:center">Received Sms</th><th style="text-align:center">Expired Sms</th><th style="text-align:center">Sent To Operator</th><th style="text-align:center">Gap Sms</th><th style="text-align:center" class="actions"><?php echo __('Actions'); ?></th></tr><?php foreach ($notificationCampaigns as $key=> $notificationCampaign): ?><?phpif(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'])){$successSent=$notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['sent'];}else{$successSent=0;}if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'])){$successFailed=$notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['0'];}else{$successFailed=0;}?><tr><td align="center" width="4%"><?php echo h($notificationCampaign['NotificationCampaign']['id']); ?> </td><td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['name']); ?> </td><td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['title']); ?> </td><!-- <td align="center"><?php //echo h($notificationCampaign['NotificationCampaign']['message']); ?> </td> --><td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['created']); ?> </td><td align="center"><?php echo h($notificationCampaign['NotificationCampaign']['expiresat']); ?> </td><td> <?php //echo h($successSent+ $successFailed) ?><?php //echo $result[$notificationCampaign['NotificationCampaign']['id']]['sent'];?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['total'])){//echo $result[$notificationCampaign['NotificationCampaign']['id']]['sent'];echo $result[$notificationCampaign['NotificationCampaign']['id']]['total'];$total = $result[$notificationCampaign['NotificationCampaign']['id']]['total'];}else {echo '0';$total = 0;}?> </td><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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['failed'])){//echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['failed'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',0));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['failed']);}else {echo h('0');}?> </td><td align="center" width="15%"><?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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['success'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['success'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'sent',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['success']);$success = $result[$notificationCampaign['NotificationCampaign']['id']]['success'];}else {echo h('0');$success = 0;}?><br><?php //echo h('Trackable= '.$notificationWithVersionCode[$key]);?><br><?php //echo h('%= '.round((($notificationWithVersionCode[$key])/($successSent+$successFailed))*100));?><?php echo h('Success %= '.round((($success)/($total))*100));?></td><td align="center"><?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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'recieved',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['recieved']);}else {echo h('0');}?> </td><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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['expired'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'recieved',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['expired']);}else {echo h('0');}?> </td><?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){$recieved = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['recieved']; } else {$recieved =0;}?><?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired'])){$expired = $notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['expired']; } else {$expired=0;}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['recieved'])){$recieved = $result[$notificationCampaign['NotificationCampaign']['id']]['recieved'];}else {$recieved =0;}if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['expired'])){$expired = $result[$notificationCampaign['NotificationCampaign']['id']]['expired'];}else {$expired =0;}if(isset($result[$notificationCampaign['NotificationCampaign']['id']]['1'])){$sent = $result[$notificationCampaign['NotificationCampaign']['id']]['1'];}else {$sent =0;}?><td align="center" width="10%"><?php //echo($notificationWithVersionCode[$key] - ($recieved+$expired));?><?php //echo($sent - ($recieved+$expired));?><?php echo($success - ($recieved+$expired));?><br><?php //if($notificationWithVersionCode[$key]!=0){ echo('%= '.round((($notificationWithVersionCode[$key] - ($recieved+$expired))/$notificationWithVersionCode[$key])*100));}else {echo('%= 0');}?><?php if($success!=0){ echo('%= '.round((($success - ($recieved+$expired))/$success)*100));}else {echo('%= 0');}?></td><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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['opened'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['opened'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'opened',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['opened']);}else {echo h('0');}?> </td><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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['referrer'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['referrer'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'referrer',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['referrer']);}else {echo h('0');}?> </td><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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['login'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['login'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'login',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['login']);}else {echo h('0');}?> </td><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');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['smssent'])){echo $result[$notificationCampaign['NotificationCampaign']['id']]['smssent'];$smstotal = $result[$notificationCampaign['NotificationCampaign']['id']]['smssent'];}else {echo h('0');$smstotal=0;}?> </td><td align="center"><?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['smsrejected']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['smsrejected'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['smsrejected'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'smsrejected',1)); } else {echo h('0');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['smsrejected'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['smsrejected'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'smsrejected',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['smsrejected']);}else {echo h('0');}?> </td><td align="center"><?php //if(isset($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['smsrejected']) && !empty($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['smsrejected'])){echo $this->Html->link(__(h($notificationCampaignsCount[$notificationCampaign['NotificationCampaign']['id']]['smsrejected'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'smsrejected',1)); } else {echo h('0');}?><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['smsprocessed'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['smsprocessed'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'smsprocessed',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['smsprocessed']);$smssuccess=$result[$notificationCampaign['NotificationCampaign']['id']]['smsprocessed'];}else {echo h('0');$smssuccess=0;}if($smstotal==0){$successpert = 0;}else{$successpert = round(($smssuccess)/($smstotal)*100);}?> <br><br><?php echo h('Success %= '.$successpert);?></td><td align="center"><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_DELIVRD'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_DELIVRD'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'SMS_DELIVRD',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_DELIVRD']);$receivedsms=$result[$notificationCampaign['NotificationCampaign']['id']]['SMS_DELIVRD'];}else {echo h('0');$receivedsms = 0;}?> </td><td align="center"><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_EXPIRED'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_EXPIRED'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'SMS_EXPIRED',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_EXPIRED']);$expiredsms = $result[$notificationCampaign['NotificationCampaign']['id']]['SMS_EXPIRED'];}else {echo h('0');$expiredsms = 0;}?> </td><td align="center"><?phpif(isset($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_SENT_OPERATOR'])){// echo $this->Html->link(__(h($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_SENT_OPERATOR'])), array('action' => 'show', $notificationCampaign['NotificationCampaign']['id'], 'SMS_SENT_OPERATOR',1));echo h($result[$notificationCampaign['NotificationCampaign']['id']]['SMS_SENT_OPERATOR']);$sentoperator = $result[$notificationCampaign['NotificationCampaign']['id']]['SMS_SENT_OPERATOR'];}else {echo h('0');$sentoperator = 0;}?> </td><td align="center"><?php //echo($notificationWithVersionCode[$key] - ($recieved+$expired));?><?php echo($smssuccess - ($receivedsms+$expiredsms+$sentoperator));?><br><?php if($smssuccess!=0){ echo('%= '.round((($smssuccess - ($receivedsms+$expiredsms+$sentoperator))/$smssuccess)*100));}else {echo('%= 0');}?><br></td><td align="center" width="15%" class="actions"><?php echo $this->Html->link(__('View'), array('action' => 'view', $notificationCampaign['NotificationCampaign']['id'])); ?> <?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $notificationCampaign['NotificationCampaign']['id'])); ?><!--<?php //echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $notificationCampaign['NotificationCampaign']['id']), null, __('Are you sure you want to delete # %s?', $notificationCampaign['NotificationCampaign']['id'])); ?> --></td></tr><?php endforeach; ?></table><!-- <p> --><?php// echo $this->Paginator->counter(array(// 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')// ));?> </p><!-- <div class="paging"> --><?php// echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));// echo $this->Paginator->numbers(array('separator' => ' '));// echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));// ?><ul class="pager"><?php if($page>1):?><li><a href="?page=<?php echo $page-1;?>">Previous</a></li><?php endif;?><li><a href="?page=<?php echo $page+1;?>">Next</a></li></ul></div></div>