<?php
include "top.php";
?> 
<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>Notifications <small><?php echo $this->Paginator->counter('{{count}} record(s)');?> </small></h1>
<ol class="breadcrumb">
<li><?php echo $this->Html->link('<i class="fa fa-home"></i>Home', array('controller'=>'Pages','action'=>'page'),array('escape' => false));?></li>
<li><i class="fa fa-angle-right"></i> Page</li>
</ol>
</section>

<section class="content">
<div class="panel-heading">
<div class="filter"><i class="fa fa-filter"></i> Filter</div>
<div class="btn"><?php echo $this->Html->link('Add New',array('controller'=>'pages','action'=>'notificationsadd'),array('escape'=>false));?></div>
<div class="filterbar-panel">
<?php echo $this->Form->create('meetings', ['url' => ['controller' => 'pages', 'action' => 'notifications'],'method' => 'get']);?>
<div class="row">
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('name', array('class'=>'form-control','label'=>'NAME','value'=>$this->request->getQuery('name')));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('createdate', array('id'=>'createdate','class'=>'form-control','label'=>'create date','value'=>$this->request->getQuery('createdate')));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('modifieddate', array('id'=>'modifieddate','class'=>'form-control','label'=>'modified date','value'=>$this->request->getQuery('modifieddate')));?></div>
</div>
<div class="row">
<div class="col-md-3 col-sm-12"><?php echo $this->Form->submit('filter',array( 'div' => false,'name' => 'filter','class'=>'filterbtn'));?></div>
</div>
<?php echo $this->Form->end();?>
</div>
</div>


<table class="table">
<tr>
<th>ID</th>
<th>NAME</th>
<th>CREATED</th>
<th>MODIFIED</th>
<th>ACTION</th>
</tr>
<?php
$i=1;
foreach($querypages as $value)
{	
?>
<tr>
<td><?php echo $i++;?></td>
<td><?php echo $value['name'];?></td>
<td><?php echo date_format($value['createdate'],'Y-m-d');?></td>
<td><?php echo date_format($value['modifieddate'],'Y-m-d');?></td>
<td>
<?php echo $this->Html->link('<i class="fa fa-pencil"></i>',array('controller'=>'pages','action'=>'notificationsedit',$value['id']),array('class'=>'btn','escape'=>false));?>

<?php echo $this->Html->link('<i class="fa fa-trash"></i>', array('pages'=>'products','action'=>'notificationsremove',$value['id']),array("onclick"=>"return deleterecord('notificationsremove/$value[id]')",'class'=>'btn','escape' => false));?>

</td>
</tr>
<?php
}
?>
</table>


<div class="pagination-panel">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="pagination">
<?php echo $this->Paginator->first('First',array('currentTag'=>'a','escape' => false));?>
<?php echo $this->Paginator->numbers();?>
<?php echo $this->Paginator->last('Last', array('currentTag' => 'a', 'escape' => false));?>
</div>
</div>
</div>
</div>
</div>

</section>
</div>
<?php
include "footer.php";
?>