Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/product/search.phtml
 <div class="table-box">
	<form method="POST" action="/backoffice/product/search">
	<table class="table">
		<thead>
			<tr>
				<th class="col-md-4" ><?php echo $this->titlePage; ?></th>
			</tr>
		</thead>
		<tbody>
			<tr class="nostriped">
				<td class="col-md-12 ">
					<div class="col-md-4 no-space-top"><input placeholder="Rechercher un nom, une r�f�rence, une description" class="form-control" type="text" size="60" name="search" id="search" value="<?php echo $this->populateForm['search'];?>"></div>
					<div class="col-md-4 no-space-top">
						<div class="col-md-6  no-space-top"><input placeholder="Entre le prix minimum"  class="form-control" type="text" size="10" name="prixMin" id="prixMin" value="<?php echo $this->populateForm['prixMin'];?>"></div>
						<div class="col-md-6 no-space-top"><input placeholder="et le prix maximum" class="form-control" type="text" size="10" name="prixMax" id="prixMax" value="<?php echo $this->populateForm['prixMax'];?>"></div>
					</div>
				</td>
			</tr>
			<tr class="nostriped">
				<td class="col-md-12">
					<div class="col-md-2 no-space-top">
						<div class="col-md-12 no-space-top"><h5>Rechercher un produit actif</h5></div>
						<div class="text-center">
							<input type="radio" class="bluecheckradios" name="active" id="active1" value="0" <?php if ($this->populateForm['active'] == 0) { echo 'checked="checked"';} ?>><label for="active1">&nbsp;Actif</label>
							<input type="radio" class="bluecheckradios" name="active" id="active2" value="1" <?php if ($this->populateForm['active'] == 1) { echo 'checked="checked"';} ?>><label for="active2">&nbsp;Non actif</label>
							<input type="radio" class="bluecheckradios" name="active" id="active3" value="2" <?php if ($this->populateForm['active'] == 2) { echo 'checked="checked"';} ?>><label for="active3">&nbsp;Les deux</label>
						</div>
					</div>
					<div class="col-md-3 no-space-top">
						<div class="col-md-12 no-space-top"><h5>Rechercher un produit ayant une image</h5></div>
						<div class="text-center">
							<input type="radio" class="bluecheckradios" name="image" id="image1" value="0" <?php if ($this->populateForm['image'] == 0) { echo 'checked="checked"';} ?>><label for="image1">&nbsp;Avec</label>
							<input type="radio" class="bluecheckradios" name="image" id="image2" value="1" <?php if ($this->populateForm['image'] == 1) { echo 'checked="checked"';} ?>><label for="image2">&nbsp;Sans</label>
							<input type="radio" class="bluecheckradios" name="image" id="image3" value="2" <?php if ($this->populateForm['image'] == 2) { echo 'checked="checked"';} ?>><label for="image3">&nbsp;Les deux</label>
						</div>
					</div>
					<div class="col-md-3 no-space-top">
						<div class="col-md-12 no-space-top"><h5>Rechercher un produit en promotion</h5></div>
						<div class="text-center">
							<input type="radio" class="bluecheckradios" name="activePromo" id="activePromo1" value="0" <?php if ($this->populateForm['activePromo'] == 0) { echo 'checked="checked"';} ?>><label for="activePromo1">&nbsp;En promotion</label>
							<input type="radio" class="bluecheckradios" name="activePromo" id="activePromo2" value="1" <?php if ($this->populateForm['activePromo'] == 1) { echo 'checked="checked"';} ?>><label for="activePromo2">&nbsp;Hors promotion</label>
							<input type="radio" class="bluecheckradios" name="activePromo" id="activePromo3" value="2" <?php if ($this->populateForm['activePromo'] == 2) { echo 'checked="checked"';} ?> ><label for="activePromo3">&nbsp;Les deux</label>
						</div>
					</div>
					<div class="col-md-4 no-space-top">
						<div class="col-md-12 no-space-top"><h5>Rechercher un produit disponible</h5></div>
						<div class="text-center">
							<input type="radio" class="bluecheckradios" value="0" name="etatstock" id="etatstock1"  <?php if ($this->populateForm['etatstock'] == 0) { echo 'checked="checked"';} ?>><label for="etatstock1">&nbsp;Disponible</label>
							<input type="radio" class="bluecheckradios" value="1" name="etatstock" id="etatstock2"  <?php if ($this->populateForm['etatstock'] == 1) { echo 'checked="checked"';} ?>><label for="etatstock2">&nbsp;En attente</label>
							<input type="radio" class="bluecheckradios" value="2" name="etatstock" id="etatstock3"  <?php if ($this->populateForm['etatstock'] == 2) { echo 'checked="checked"';} ?>><label for="etatstock3">&nbsp;Nous contacter</label>
							<input type="radio" class="bluecheckradios" value="3" name="etatstock" id="etatstock4"  <?php if ($this->populateForm['etatstock'] == 3) { echo 'checked="checked"';} ?>><label for="etatstock4">&nbsp;Tous</label>
						</div>
					</div>
				</td>
			</tr>
			<tr class="nostriped">
				<td class="col-md-12">
					<div class="col-md-6 no-space-top">
						<div class="col-md-12 no-space-top"><h5>Rechercher une caract�ristique du produit</h5></div>
						<div class="col-md-6 no-space-top">
							<select class="form-control" name="optionId" id="optionId">
								<option value="All" <?php if ($this->populateForm['optionId'] == 'All') { echo 'selected="selected"';}?> >Tous</option>
								<?php foreach($this->listoption as $row) { ?>
								<option value="<?php echo $this->escape($row['ID']); ?>" <?php if ($this->populateForm['optionId'] == $this->escape($row['ID'])) { echo 'selected="selected"';}?> > 
									<?php echo $this->escape($row['NOM']); ?>
								</option>
								<?php } ?>
							</select>
						</div>
						<div class="col-md-6 no-space-top">
							<input placeholder="Valeur de la caract�ristique"  class="form-control" type="text" size="10" name="optionValue" id="optionValue" value="<?php echo $this->populateForm['optionValue'];?>">
						</div>
					</div>
					<div class="col-md-6 no-space-top" >
						<div class="col-md-12 no-space-top"><h5>Rechercher une marque</h5></div>
						<div class="col-md-6 no-space-top">
							<select class="form-control" name="idbrend" id="idbrend">
								<option value="All"  <?php if ($this->populateForm['idbrend'] == 'All') { echo 'selected="selected"';}?>>Tous</option>
								<?php foreach($this->listbrend as $row) { ?>
								<option value="<?php echo $this->escape($row['ID']); ?>" <?php if ($this->populateForm['idbrend'] == $this->escape($row['ID'])) { echo 'selected="selected"';}?> >
									<?php echo $this->escape($row['BREND']);?>
								</option>
								<?php } ?>
							</select>
						</div>
					</div>
				</td>
			</tr>
			<tr class="nostriped">
				<td class="col-md-12"> 
					<div class="col-md-6 no-space-top">
						<div class="col-md-12 no-space-top"><h5>Rechercher une cat�gorie</h5></div>
						<div class="col-md-12 no-space-top">
							<select class="form-control" name="idcategorySearch" >
							<option value="All" <?php if ($this->populateForm['idcategorySearch'] == 'All') { echo 'selected="selected"';}?>>Tous</option>
							<?php 
							$show = array();
							foreach($this->listallcategories as $row) { 
							 	for ($level=0 ; $level<11; $level++) { 
									if ((!isset($show['NOM'.$level]) || $show['NOM'.$level] != $row['NOM'.$level]) && $row['NOM'.$level] != null) {
									?>
										<option value="<?php echo $this->escape($row['ID'.$level]); ?>" <?php if ($this->populateForm['idcategorySearch'] == $this->escape($row['ID'.$level])) { echo 'selected="selected"';}?>>
											<?php 
							 				for ($i=0 ; $i<$level; $i++) { 
												echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
											}
											echo $this->escape($row['NOM'.$level]); ?>
										
										</option>
										<?php 
										$show['NOM'.$level] = $row['NOM'.$level];
									}
								 } 
							} ?>
							</select>
						</div>
					</div>
					<div class="col-md-6 text-center">
						<button type="submit" name="searchbtn"  class="btn btn-primary">
						  <span class="glyphicon glyphicon-search"></span> Rechercher
						</button>				
					</div>
				</td>
			</tr>
			<tr>
				<td class="col-md-12"></td>
			</tr>
		</tbody>
	</table>
	</form>
</div>
<div class="clearfix"></div>
<div class="table-box">
<?php 
$listPics = $this->listproductpicture; 
?>
<table class="display table" id="productTable" width="100%">
	<thead>
		<tr>
			<th></th>
			<th>Nom</th>
			<th>Description</th>
			<th class="center">Prix</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
	
		<?php foreach($this->listSearch as $row)  { ?>
		<tr>
			<td>
				<ul class="gallerybox">
                	<li>
						<figure>
							<a href="<?php echo $this->baseUrl; ?>/backoffice/product/edit/showProduct/<?php echo $this->escape($row['ID']);?>" target="_blank"><img src="<?php if (isset($listPics[$row['ID']])) { echo '/'.$listPics[$row['ID']]; } else {echo '/items/product/default/default.png'; } ?>"></a>
						</figure>
					</li>
				</ul>
			</td>
			<td>
				<?php echo $row['NOM'];?>
			</td>
			<td>	
				<?php echo $row['DESCRIPTIONSHORT'];?>
				<?php if ($this->escape($row['isPROMO']) == 0) { ?> <br/><br/>En promo<?php } ?>
			</td>
			<td>
				<?php echo $this->escape($row['PRIX']); ?>&nbsp;&#8364;
			</td>
			<td>
				<div class="btn-group">
	             	<a class="btn btn-success" href="<?php echo $this->baseUrl; ?>/backoffice/product/edit/showProduct/<?php echo $this->escape($row['ID']);?>" target="_blank"><span class="glyphicon glyphicon-edit"></span> Modifier</a>
				</div>
			</td>
		</tr>
		<?php } ?>
	</tbody>
</table>
<script>			
	$(document).ready(function() {
		initDataTable('productTable', [[ 1, "asc" ]], [
		                    		                { "orderable": false, "targets": 0, "width": "150px"  },
		                    		                { "orderable": false, "targets": -1, "width": "270px" },
		                    		                { "orderable": true, "targets": 1, "type": "html"},
		                    		                { "orderable": true, "targets": 2, "type": "html"},
		                    		                { "orderable": true, "targets": 3}
		                    		              ]); 	    
	});
</script>
</div>