<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>products <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'=>'Products','action'=>'products'),array('escape' => false));?></li>
<li><i class="fa fa-angle-right"></i> products</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'=>'products','action'=>'productsadd',$mykey),array('escape'=>false));?></div>
<div class="filterbar-panel">
<?php echo $this->Form->create('meetings', ['url' => ['controller' => 'products', 'action' => 'products'],'method' => 'get']);?>
<div class="row">
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('category', array('class'=>'form-control','label'=>'category','empty'=>true,'value'=>$this->request->getQuery('category'),'options'=>$categorylist));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('sku', array('class'=>'form-control','label'=>'SKU','value'=>$this->request->getQuery('sku')));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('pricefrom', array('class'=>'form-control','label'=>'PRICE FROM','value'=>$this->request->getQuery('pricefrom')));?></div>
<div class="col-md-3 col-sm-12"><?php echo $this->Form->control('priceto', array('class'=>'form-control','label'=>'PRICE TO','value'=>$this->request->getQuery('priceto')));?></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>PICTURE</th>
<th>CATEGORY</th>
<th>NAME</th>
<th>SKU</th>
<th>MRP</th>
<th>PRICE</th>
<th>STOCK</th>
<th>MODIFIED</th>
<th>ACTION</th>
</tr>
<?php
$i=1;
foreach($querypages as $value)
{	
?>
<tr>
<td><?php echo $i++;?></td>
<td><?php echo $this->Html->image($value['picture1'],array('width'=>'50px'));?></td>
<td class="nowrap"><?php echo $value['category'];?></td>
<td><?php echo $value['name'];?></td>
<td><?php echo $value['sku'];?></td>
<td><?php echo $value['mrp'];?></td>
<td><?php echo $value['price'];?></td>
<td><?php echo $value['stock'];?></td>
<td class="nowrap"><?php echo date_format($value['modifieddate'],'Y-m-d');?></td>
<td class="nowrap">
<?php echo $this->Html->link('<i class="fa fa-globe"></i>',"https://www.meridiofans.com/".$value['url'],array('class'=>'btn','escape'=>false,'target'=>'_new'));?>
<?php echo $this->Html->link('<i class="fa fa-pencil"></i>',array('controller'=>'products','action'=>'productsedit',$value['mykey']),array('class'=>'btn','escape'=>false));?>
<?php echo $this->Html->link('<i class="fa fa-trash"></i>', array('pages'=>'products','action'=>'productsremove',$value['id']),array("onclick"=>"return deleterecord('productsremove/$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";
?>