<?php
	include('common/header.php');
?>
<div class="">
	<div class="col-xm-12">
		<div class="widget-box light-border">
			
			<div class="widget-body">
				<div class="widget-main">
					<div class="row">
						<div class="col-sm-12">
							<form class="form-horizontal" role="form">
							<div class="">
								<!-- PAGE CONTENT BEGINS -->	
								     <?php 
                        					foreach ($product as $value) {
                          					$product= $value['product_id'];
                          					?>
								<div class="profile-user-info">
									<div class="profile-info-row">
									
										<div class="profile-info-name"><?php echo 'Product Type : '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
												if ($value['product_type']!='') {
													echo $value['product_type'];
												}else{
													echo '-';
												}	
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div>
								
								<?php
								 if ($value['product_category_name']!='') {
								?>
								<div class="profile-user-info">
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Product Category : '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php	
											   if ($value['product_category_name']=='') {
											    echo '-';
											   }else{
											   	echo $value['product_category_name'];
											   }
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div>
								 <?php }?>
								<div class="profile-user-info">
									<div class="profile-info-row">
										
										<div class="profile-info-name">
										<?php 
										if ($value['product_type']=='Dispenser') {
												echo 'Dispenser Name : ';
										}else if($value['product_type']=='Refill'){
											echo 'Refill Name : ';
										}else{
											echo 'Product Name : ';
										}
									 
										?></div>
										<div class="profile-info-value">
											<span>			
											<?php
													if ($value['product_name']!='') {
															echo $value['product_name'];
													}else{
															echo '-';
													}	
											
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div>

								<?php if ($value['product_type']=='Dispenser'||$value['product_type']=='Dispenser-FTU') {?>
								<div class="profile-user-info">
									<div class="profile-info-row">
									
										<div class="profile-info-name"><?php echo 'Refill Name : '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
												if ($value['refill_ids']!='') {
													echo $refill_name=fetch_products($value['refill_ids']); 

												}else{
													echo '-';
												}	
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div><?php }else if($value['product_type']=='Refill'){?>
								<div class="profile-user-info">
									<div class="profile-info-row">
									
										<div class="profile-info-name"><?php echo 'Dispenser Name : '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php												
												$refill_name=fetch_product_dispenser($value['product_id']); 

												if ($refill_name!='') {
													echo $refill_name;	
												}else{
													echo '-';
												}	
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div>
								<?php } ?>

								<?php
								 if ($value['product_prefix']!='') {
								?>
								<div class="profile-user-info">
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Product Prefix: '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
											 if ($value['product_prefix']=='') {
											    echo '-';
											   }else{
											   	echo $value['product_prefix'];
											   }	
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div>
								<?php } ?>
								<div class="profile-user-info">
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Description: '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
												if ($value['description']!='') {
													echo $value['description'];
												}else{
													echo '-';
												}
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
								</div>
								
								<div class="profile-user-info">
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Price (in Rs): '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
												if ($value['price']!='') {
													echo $value['price'];
												}else{
													echo '-';
												}	
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
									
								</div>
								<?php
								 if ($value['refill_duration']!='') {
								?>
								<div class="profile-user-info">
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Refill Duration: '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
												if ($value['refill_duration']!='') {
													echo $value['refill_duration'];
												}else{
													echo '-';
												}	
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
									
								</div>
								
								<?php
								 }
								 if ($value['stock_quantity']!='0') {
								?>
								<div class="profile-user-info">
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Stock Quantity: '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
												if ($value['stock_quantity']!='') {
													echo $value['stock_quantity'];
												}else{
													echo '-';
												}	
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>
									
								</div>
								<?php } ?>
								<?php } ?>
							</div>
							</form>	
						</div>
					</div>
				</div>	
			</div>
		</div>
	</div>
    <!-- /.col -->
</div>
<div class="clearfix form-actions">
	<div class="col-md-5" style="margin-left: 142px">
		<button class="btn btn-info" type="button" onclick="javascript:window.location='<?php echo base_url();?>index.php/gc/products/list_products'">
			Back
		</button>
	</div>
</div>
<div class="space-4"></div>
	<!-- /.page-row -->
    <!-- /.page-content --> 
</div>
<!-- /.main-content -->  
</div>
<!-- /#ace-settings-container --> 
</div>
<!-- /.main-container-inner --> 
<?php
	include('common/footer.php');
?>