File: /home/mbkashyap/public_html/wp-content/plugins/astrology-booking/templates/admin-availability.php
<?php
if (!defined('ABSPATH')) {
exit;
}
?>
<div class="wrap">
<h1>Manage Availability</h1>
<form method="post">
<table class="form-table">
<tr>
<th>Date</th>
<td><input type="date" name="avail_date" required></td>
</tr>
<tr>
<th>Start Time</th>
<td><input type="time" name="start_time" required></td>
</tr>
<tr>
<th>End Time</th>
<td><input type="time" name="end_time" required></td>
</tr>
<tr>
<th>Price (₹)</th>
<td><input type="number" step="0.01" name="price" value="<?php echo esc_attr(get_option('astro_booking_default_price', 1000.00)); ?>" required></td>
</tr>
</table>
<?php submit_button('Add Availability', 'primary', 'astro_booking_save_availability'); ?>
</form>
<h2>Available Slots</h2>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th>Date</th>
<th>Start Time</th>
<th>End Time</th>
<th>Price (₹)</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($availabilities as $avail) : ?>
<tr>
<td><?php echo esc_html($avail->avail_date); ?></td>
<td><?php echo esc_html($avail->start_time); ?></td>
<td><?php echo esc_html($avail->end_time); ?></td>
<td><?php echo esc_html($avail->price); ?></td>
<td><a href="?page=astro-availability&delete_id=<?php echo esc_attr($avail->id); ?>" class="button button-secondary">Delete</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>