<div class="innerBanner container-fluid mb-5">
	<div class="row h-100 align-items-center">
		<div class="col-md-4 col-lg-6">
			<h2 class="whiteColor mb-0">MEMBERS SECTION</h2>
		</div>
		<div class="col-md-8 col-lg-6">
			<ul class="breadcrumb">
				<li><a href="<?php echo base_url(); ?>">Home</a></li>
				<li><a href="javascript:;">Members Section</a></li>
				<li>Members Directory</li>
			</ul>
		</div>
	</div>
</div>
<div class="container-fluid">
	<div class="row">
		<div class="col-lg-3 mb-3">
			<div>
				<!--<div class="blackRect"></div>-->
				<h5 class="text-uppercase mb-3 searchHeading rounded">Search By</h5>
				<form id="searchForm" method='post' action='<?php echo base_url(); ?>member/directory'>
					<div class="form-group">
						<input class="form-control" placeholder="Product" id="product" name="product">
					</div>
					<div class="form-group">
						<input class="form-control" placeholder="Company Name" id="cname" name="cname">
					</div>
					<div class="form-group">
						<input class="form-control" placeholder="City" id="city" name="city">	
					</div>
					<div class="form-group">
						<select class="form-control" id="region" name="region">
							<option value="">Choose Region</option>
							<option value="east">Eastern Region</option>
							<option value="west">Western Region</option>
							<option value="north">Northern Region</option>
							<option value="south">Southern Region</option>
						</select>
					</div>
					<div class="form-group">
						<select class="form-control" id="sort" name="sort">
							<option value="">Sort By</option>
							<option value="">A</option>
							<option value="">B</option>
							<option value="">C</option>
							<option value="">D</option>
							<option value="">E</option>
							<option value="">F</option>
							<option value="">G</option>
							<option value="">H</option>
							<option value="">I</option>
							<option value="">J</option>
							<option value="">K</option>
							<option value="">L</option>
							<option value="">M</option>
							<option value="">N</option>
							<option value="">O</option>
							<option value="">P</option>
							<option value="">Q</option>
							<option value="">R</option>
							<option value="">S</option>
							<option value="">T</option>
							<option value="">U</option>
							<option value="">V</option>
							<option value="">W</option>
							<option value="">X</option>
							<option value="">Y</option>
							<option value="">Z</option>
						</select>
					</div>
					<div class="form-group">
						<input type="submit" class="btn searchBtn grayGradientBg whiteColor" value="search">
					</div>
				</form>
			</div>
		</div>
		<div class="col-lg-9 mb-5" id="innerData">
			<div class="row">
				<h5 class="col-12 mb-3 text-uppercase"><?php echo $total; ?> Members Found</h5>
				<?php 
				if($directory !== "No Data"){ 
					foreach($directory as $val){ 
				?>
				<div class="col-md-6 mb-4">
					<div class="border rounded p-3">
						<h5 class="redColor mb-3"><?php echo ucwords(strtolower($val['MemberName'])); ?></h5>
						<table class="memberTable">
							<?php 
							$address = '';
							$address .= $val['Add1'];

							if($val['Add2'] !== ''){	
								$address .= ', '.$val['Add2'];
							}

							if($val['Add3'] !== ''){	
								$address .= ', '.$val['Add3'];
							}
							?>
							<tr>
								<td>Address	</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $address; ?></td>
							</tr>
							<tr>
								<td>State</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo ucfirst(strtolower($val['StateName'])); ?></td>
							</tr>
							<tr>
								<td>City</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo ucfirst(strtolower($val['CityName'])); ?></td>
							</tr>
							<tr>
								<td>Pincode</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo ucfirst(strtolower($val['Pin'])); ?></td>
							</tr>
							<tr>
								<td>Phone No</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $val['TelNo']; ?></td>
							</tr>
							<tr>
								<td>Fax No</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $val['FaxNo']; ?></td>
							</tr>
							<tr>
								<td>Email</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $val['Email']; ?></td>
							</tr>
							<tr>
								<td>Website</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $val['Website']; ?></td>
							</tr>
							<tr>
								<td>Panel</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $val['panel_name']; ?></td>
							</tr>
							<tr>
								<td>Category</td>
								<td class="semiColon">:</td>
								<td class="boldFont"><?php echo $val['category_name']; ?></td>
							</tr>
						</table>
					</div>
				</div>
				<?php } ?> 
				<div class="col-12">
					<div class="pagination">
          <?php echo $links; ?>
          </div>
				</div>
				<?php } ?>
			</div>
		</div>
	</div>
</div>