
<?php

if(get_theme_mod('ourclient_area_disable') != 'on' ){
	?>
	<!-- ourclient Area Start -->
	<?php 
	if( get_theme_mod('ourclient_areaTpadding',true) ) {
		$ourclient_areaTpadding = 'padding-top:'.esc_attr(get_theme_mod('ourclient_areaTpadding')).';';
	}
	if( get_theme_mod('ourclient_areaBpadding',true) ) {
		$ourclient_areaBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('ourclient_areaBpadding')).';';
	}
	if( get_theme_mod('ourclient_areaLpadding',true) ) {
		$ourclient_areaLpadding = 'padding-left:'.esc_attr(get_theme_mod('ourclient_areaLpadding')).';';
	}
	if( get_theme_mod('ourclient_areaRpadding',true) ) {
		$ourclient_areaRpadding = 'padding-right:'.esc_attr(get_theme_mod('ourclient_areaRpadding')).';';
	}
	?>		
	<div class="ourclient-area bg-img-1 text-center" id="ourclient" style="<?php echo esc_attr($ourclient_areaTpadding); ?>" "<?php echo esc_attr($ourclient_areaBpadding); ?>" "<?php echo esc_attr($ourclient_areaLpadding); ?>" "<?php echo esc_attr($ourclient_areaRpadding); ?>">

		<?php
		$showStatic = true;
		for( $i = 1; $i < 3; $i++ ){
			$url = get_theme_mod('ourclient_page_url_'.$i, '#');
			$link = get_theme_mod('ourclient_page_link'.$i);
			$ourclient_page_id = get_theme_mod('ourclient_page_icon'.$i); 
			if(!empty($ourclient_page_id)){
				$showStatic = false;
				break;
			}
		}
		?>
		<div class="container">  
			<div class="ourclient-single-area ">  
				<?php
				$cols = get_theme_mod('ourclient_npp_count', 5);
				$cols++;
							// echo '$cold: '.$cols;
				switch($cols){
					case 1:
					$colCls = 'col-md-12 col-sm-12 col-xs-12';
					break;
					case 2:	
					$colCls = 'col-md-6 col-sm-6 col-xs-6';
					break;
					case 3:
					case 9:
					$colCls = 'col-md-4 col-sm-4 col-xs-6';
					break;
					case 5:
					case 6:
					case 9:
					case 10:
					case 11:
					case 12:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					default: 
					$colCls = 'col-md-3 col-sm-3 col-xs-6';
					break;
				}
				$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
				?>

				<?php
				for( $i = 1; $i <= $cols; $i++ ){

					if( get_theme_mod('ourclient_page_TitleColor'.$i,true) ) {
						$ourclient_page_TitleColor = 'color:'.esc_attr(get_theme_mod('ourclient_page_TitleColor'.$i)).';';
					}

					if( get_theme_mod('ourclient_page_ContentColor'.$i,true) ) {
						$ourclient_page_ContentColor = 'color:'.esc_attr(get_theme_mod('ourclient_page_ContentColor'.$i)).';';
					}

					if( get_theme_mod('ourclient_page_ButtonColor'.$i,true) ) {
						$ourclient_page_ButtonColor = 'color:'.esc_attr(get_theme_mod('ourclient_page_ButtonColor'.$i)).';';
					}

					if( get_theme_mod('ourclient_page_ButtonBorderColor'.$i,true) ) {
						$ourclient_page_ButtonBorderColor = 'border-color:'.esc_attr(get_theme_mod('ourclient_page_ButtonBorderColor'.$i)).';';
					}

					if( get_theme_mod('ourclient_page_BoxBorderColor'.$i,true) ) {
						$ourclient_page_BoxBorderColor = 'border-color:'.esc_attr(get_theme_mod('ourclient_page_BoxBorderColor'.$i)).';';
					}

					if($showStatic === false){
						$url = get_theme_mod('ourclient_page_url_'.$i, '#');

						$ourclient_page_title = get_theme_mod('ourclient_page_title_'.$i, 'Design & Coding');
						$ourclient_page_descr = get_theme_mod('ourclient_page_descr_'.$i, 'Lorem ipsumst dolors consectetur adipisicing sed does');
						$ourclient_page_id = get_theme_mod('ourclient_page'.$i); 
						$ourclient_page_icon = get_theme_mod('ourclient_page_icon'.$i);
						if($ourclient_page_icon){
							?>
							<div class="<?php echo $colCls;?>  pd-0" data-wow-duration="2s">
								<div class="ourclients-post">
									<figure class="clientlogobx">
										<img src="<?php echo esc_url($ourclient_page_icon); ?>" class="img-responsive" />								
									</figure>
									<div class="clearfix"></div>
								</div>
							</div>
							<?php
						}
					}else{?>
						<div class="<?php echo $colCls;?> pd-0" data-wow-duration="2s">
							<div class="ourclients-post">
								<figure class="clientlogobx">
									<img src="<?php echo esc_html(get_template_directory_uri()); ?>/images/clogo1.jpg" class="img-responsive" />
								</figure>
								<div class="clearfix"></div>	
							</div>
							
						</div>
					<?php }

				}?>
			</div>
		</div>
	</div> 
	<!-- ourclient Area end -->
	
<?php } 