<div class="col-md-6">
	<div class="contact_form user_contact">
		<form action="<?= base_url('profile/appointment_mail/'.html_escape($slug)); ?>" id="appointment_form">
			<!-- csrf -->
			<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">
			<!-- csrf -->

			<div class="row">
				<div class="col-sm-12 col-xs-12">
					<div class="reg_msg" style="display: none;"></div>
				</div>
			</div>
			<div class="appointment_wapper">
				<div class="form-group">
					<label for=""> <?= !empty(lang('title'))?lang('title'):"Appointment Title";?><span class="required">*</span></label>
					<input type="text" name="title" class="form-control" placeholder="<?= !empty(lang('title'))?lang('title'):"Appointment Title";?>" autocomplete="off" required>
				</div>
				<div class="form-group">
					<label for=""> <?= !empty(lang('msg'))?lang('msg'):"Message";?></label>
					<textarea name="message" class="form-control" id="" cols="10" rows="10" placeholder="<?= !empty(lang('msg'))?lang('msg'):"Message";?>" ></textarea>
				</div>
				
				
				<div class="form-group">
					<label for=""><?= !empty(lang('date'))?lang('date'):"date";?> <span class="required">*</span></label>
					
					<div class="input-group date flatpickr" id="datetimepicker1" data-target-input="nearest">
						<input type="text" name="ap_date" class="form-control datetimepicker" data-target="#datetimepicker1" data-input/>
						<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
							<div class="input-group-text"><i class="fa fa-calendar"></i></div>
						</div>
					</div>
					
				</div>
				

				<div class="form-group">
					<label for=""> <?= !empty(lang('email'))?lang('email'):"Email";?> <span class="required">*</span></label>
					<input type="email" name="email" class="form-control" placeholder="<?= !empty(lang('email'))?lang('email'):"email"?>" required>
				</div>
				
			</div><!-- row -->
			<?php $recapt = $this->common_m->single_select_by_user($id,'user_settings'); ?>
			<?php if(isset($recapt) && !empty($recapt)): ?>
				<?php $cap_setting = json_decode($recapt['recaptcha_config']); ?>
			<?php endif;?>
			<?php if(isset($cap_setting->is_recaptcha) && $cap_setting->is_recaptcha==1): ?>
	            <div class="row mb-5">
	              <div class="col-md-6">
	                <div class="g-recaptcha" data-sitekey="<?= !empty($cap_setting->g_site_key)?$cap_setting->g_site_key:"";?>"></div>
	              </div>
	            </div>
          	<?php endif;?>
			<div class="row">
				<div class="form-group col-sm-12 text-center contact_btn">
					<button type="submit" name="btn" class="btn btn-primary mail_send_btn_2 btn_style_<?= get_user_info_by_slug($slug)['btn_style'];?>" > <?= !empty(lang('submit'))?lang('submit'):"submit";?></button>
				</div>
			</div>

		</form>
	</div>
</div>
<div class="col-md-6"> 
	<div class="appointment_schedule_area">
		<p class="ap_info"><i class="fa fa-info-circle"></i> <?= !empty(lang('booking_msg'))?lang('booking_msg'):"Before booking an appointment please check my availability"?></p>
		<?php $days = get_days(); ?>
		<ul class="appointment_dates">
			<?php foreach ($days as $key=>$day): ?>
				<?php $my_days =get_single_appoinment($key,$id); ?>

				<li class="<?= isset($my_days['days']) && html_escape($my_days['days'])==$key?'available':'not_available';?>">
					<?= isset($my_days['days']) && html_escape($my_days['days'])==$key?'<i class="fa fa-check"></i>':'<i class="fa fa-close"></i>';?> 
					<span><?= !empty(lang($day))?lang($day):$day;?></span> 
					<b><?= isset($my_days['days']) && html_escape($my_days['days'])==$key?'( '.$my_days['start_time'].' - '.$my_days['end_time'].' )':'';?></b>
			</li>

			<?php endforeach ?>
		</ul>
		
	</div>
</div>