<div class="users_section">
	<form action="<?= base_url('home/users'); ?>" method="get" class="usersFilter_form">
		<div class="users_banner_area" style="background: url(<?= base_url('assets/images/user_banner.jpg');?>)">
			<div class="user_banner_wrapper">
				<h4><?= $total; ?> <?= !empty(lang('users'))?lang('users'):"Users";?></h4>
				<div class="user_type">
					<div class="col-md-4 offset-md-4">
						<div class="input-group">
							<div class="custom-file">
								<input type="text" class="form-control" name="username" placeholder="<?= !empty(lang('search_with_username'))?html_escape(lang('search_with_username')):'Search with username';?>" value="<?= isset($_GET['username'])?$_GET['username']:"";?>">

							</div>
							<div class="input-group-append">
								<button class="btn btn-outline-secondary" type="submit"><i class="fa fa-search"></i> <?= !empty(lang('search'))?html_escape(lang('search')):'Search';?></button>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	<div class="usersAreaHome">
		<div class="container">
			<div class="row">
				<div class="col-md-6"></div>
				<div class="col-md-6">
					<div class="user_right_btn_area">
						<select name="country" id="" class="form-control usersFilter">
							<option value=""><?= !empty(lang('country'))?lang('country'):"Select Country";?></option>
							<option <?= isset($_GET['country']) && $_GET['country']== 'all'?"selected":"";?>  value=""><?= !empty(lang('all'))?lang('all'):"All";?></option>
							<?php foreach ($countries as $key => $country): ?>
								<option <?= isset($_GET['country']) && $_GET['country']== $country['code']?"selected":"";?>  value="<?= $country['code']; ?>"> <?= $country['name'];?> </option>
							<?php endforeach ?>
						</select>

						<select name="package" id="" class="form-control usersFilter">
							<option value=""><?= !empty(lang('select_package'))?lang('select_package'):"Select Package";?></option>
							<option <?= isset($_GET['package']) && $_GET['package']== 'all'?"selected":"";?>  value=""><?= !empty(lang('all'))?lang('all'):"All";?></option>
							<?php foreach ($all_features as $key => $feature): ?>
								<option <?= isset($_GET['package']) && $_GET['package']== $feature['slug']?"selected":"";?>  value="<?= $feature['slug']; ?>"> <?= $feature['type_name'];?> </option>
							<?php endforeach ?>
						</select>

						<select name="skills" id="" class="form-control usersFilter">
							<option value=""><?= !empty(lang('select_skills'))?lang('select_skills'):"Select Skills";?></option>
							<option <?= isset($_GET['skills']) && $_GET['skills']== 'all'?"selected":"";?>  value=""><?= !empty(lang('all'))?lang('all'):"All";?></option>
							<?php foreach ($skills as $key => $skill): ?>
								<option <?= isset($_GET['skills']) && $_GET['skills']== $skill['title']?"selected":"";?> value="<?= $skill['title']; ?>"><?= $skill['title'];?></option>
							<?php endforeach ?>
						</select>
						
					</div>
				</div>
			</div>
		</form>
			<div class="row">
				<?php foreach ($users as $key => $row): ?>
					<div class="col-sm-4" data-aos="fade-up" data-aos-delay="<?= $key+1;?>00">
						<div class="single_users">
							<div class="single_user_top">
								<div class="home_user_profile">
									<img src="<?php echo base_url(!empty($row['thumb'])?html_escape($row['thumb']):'assets/images/avatar.png'); ?>" alt="">
								</div>
								<label class="badge badge-success"><?= html_escape($row['type_name']);?></label>
							</div>
							<div class="single_user_body">
								<h4 class="username"><?= !empty($row['name'])?html_escape($row['name']):html_escape($row['username'])?></h4>
								<a href="<?php echo base_url(html_escape($row['username'])); ?>" target="blank" class="profile_btn"><i class="fa fa-eye"></i> <?= !empty(lang('view_profile'))?lang('view_profile'):"View Profile";?></a>
								<div class="user_social_sites">
									<ul>
										<?php foreach ($row['my_sites'] as $site): ?> 
											<li><a href="<?php echo redirect_url($site['type'],$site['site_value'],users($row['username'])['dial_code']); ?>" target="blank" title="<?= $site['name'];?>"><?= $site['icon'];?></a></li>
										<?php endforeach ?>
									</ul>
								</div>
							</div>
						</div>
					</div>
				<?php endforeach ?>
			</div>
			
		</div>
	</div>
	<div class="row text-center">
		<?= $this->pagination->create_links(); ;?>
	</div>
</div>

