<?php
include "top.php";
?> 
<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>users <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'=>'users','action'=>'manage'),array('escape' => false));?></li>
<li><i class="fa fa-angle-right"></i> users</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'=>'users','action'=>'usersadd'),array('escape'=>false));?></div>
<div class="filterbar-panel">
<?php echo $this->Form->create('meetings', ['url' => ['controller' => 'users', 'action' => 'manage'],'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('email', array('class'=>'form-control','label'=>'EMAIL','value'=>$this->request->getQuery('email')));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('platform', array('type'=>'select','class'=>'form-control','label'=>'PLATFORM','options'=>array('Admin'=>'Admin','Website'=>'Website','Facebook'=>'Facebook','Google'=>'Google'),'empty'=>true,'default'=>$this->request->getQuery('platform')));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('date', array('id'=>'createdate','class'=>'form-control','label'=>'create date','value'=>$this->request->getQuery('createdate')));?></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>EMAIL</th>
<th>CREATED</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 $value['email'];?></td>
<td><?php echo date_format($value['date'],'Y-m-d');?></td>
<td><?php echo $this->Html->link('Edit',array('controller'=>'users','action'=>'usersedit',$value['id']),array('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";
?>