<!-- Tab panes -->
<div class="slider slider-for">
<div role="tabpanel" class="tab-pane" id="settings">
<div class="container" style="width:98%">
<div class="row">
<?php
$shop_id = (int)$this->session->userdata('shopid');
$date = $today_date;
$CI =& get_instance();
$CI->load->model('slot_model');
$all_chairs = $CI->slot_model-> get_all_chair_info($shop_id);
$total_chairs = sizeof($all_chairs);
foreach ($all_chairs as $chairs) {
$chair_no = $chairs->chair_no;
$chair_id = $chairs->id;
$count_slots = $CI->slot_model-> get_booked_slot_count($shop_id,$chair_no,$date);
$last= 12/$total_chairs;
$finalcss = 'col-sm-'.$last;
if (sizeof($count_slots) == 0 )
{
?>
<div class="<?php echo $finalcss; ?>"><button type="button" class="btn btn-success btn-block" onclick="block_unblock_slots('<?php echo $shop_id; ?>','<?php echo $chairs->chair_no; ?>','<?php echo $date; ?>','Block') ">Block Chair <?php echo $chairs->chair_no; ?> All Slots</button></div>
<?php
}
else
{
?>
<div class="<?php echo $finalcss; ?>"><button type="button" class="btn btn-danger btn-block" onclick="block_unblock_slots('<?php echo $shop_id; ?>','<?php echo $chairs->chair_no; ?>','<?php echo $date; ?>','Unblock') ">UnBlock Chair <?php echo $chairs->chair_no; ?> All Slots</button></div>
<?php
}
}
?>
</div>
</div>
<div class="tracking-list pulltorefresh">
<?php
if(sizeof($today_bookings) == 0)
{
echo "<h3 style='text-align:center'>No Bookings For Today</h3>";
}
if($start_time < $end_time)
{
while ($start_time < $end_time)
{
$hours = floor($start_time / 60);
$decimalMinutes = $start_time - floor($start_time/60) * 60;
$hoursMinutes = sprintf("%d:%02.0f", $hours, $decimalMinutes);
$time_slot = explode(":", $hoursMinutes);
// var_dump($time_slot);
if($time_slot[0] == 0)
{
$slot_time = "12:".$time_slot[1]." AM";
}
elseif($time_slot[0] < 12)
{
$slot_time = $time_slot[0].":".$time_slot[1]." AM";
}
elseif($time_slot[0] == 12)
{
$slot_time = "12:".$time_slot[1]." PM";
}
elseif($time_slot[0] > 12)
{
$time_slot[0] = $time_slot[0] - 12;
$slot_time = $time_slot[0].":".$time_slot[1]." PM";
}
?>
<table>
<tr>
<div class="tracking-item">
<td>
<div class="tracking-date">
<?php echo $slot_time;?>
<br>
<input class="css-checkbox slotreactivatedbyAdmin" style="display:none" type="checkbox" id="7655" name="option" value="7655" onchange="return save_slot_new(this,'2021-06-18','Block')" tabindex="0">
<label for="7655" style="color:green;cursor:pointer"> <i class="fas fa-circle"></i></label>
<input class="css-checkbox bookedbyUser" disabled="" style="display:none" type="checkbox" id="7695" name="option" value="7695" onchange="return save_slot_new(this,'2021-06-18','Activate')" tabindex="0">
<label for="7695" style="color:pink"> <i class="fas fa-circle"></i></label>
</div>
</td>
<?php
if ($slot_time == '10:15 AM') { ?>
<td>
<div class="tracking-content d-flex align-items-top justify-content-between">
<div><?php echo $name; ?>
<span>Booking Id: SM3456</span>
<span>Booking Chair No: 2</span>
<span>Amount (To Pay) : 130 </span></div>
<div class="actions">
<input type="checkbox" id="SM2924" onchange="toggle_start('SM2924')" style="visibility:hidden;position: absolute;" tabindex="0" value="on">
<label for="SM2924" class="startStopBtn">
<i class="fa fa-play" style="color:green"></i>
</label>
<a onclick="declineBooking('2924')" class="red" tabindex="0">
<i class="fal fa-times"></i>
</a>
</div>
</div>
<div class="tracking-content">
<div class="servicelist"><span>Hair Cut -> Trendy Haircut</span></div>
</div>
</td>
<?php } ?>
</div>
</tr>
<?php
$start_time = $start_time + 15;
}
}
?>
</div>
</table>
</div>
0 Comments