<style>
    .w-50{
        float:left;
        padding:0px 10px;
    }
</style>
<?php 
$period_id=$this->uri->segment("3");
$sch_period_table="time_table_periods";
$get_period_data=$this->TimeTableModel->get_item_data($period_id,$sch_period_table);
if($get_period_data){
    foreach($get_period_data as $period_data){
?>


<div class="container-fluid bg-white mt-3 mb-3">
    <div class="row">
        <div class="col-sm-12 pt-3 pb-3">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Welcome">Home</a></li>
                <li class="breadcrumb-item">
                    <a href="<?php echo base_url(); ?>TimeTableManagement">Time Table</a>
                </li>
                <li class="breadcrumb-item">Update Period Information</li>
            </ul>
            
            <form method="post" action="#">
                <h2 class="main-heading text-center">Update Period Information</h2><hr>
                <div class="form-group w-50">
                    <label>Period No</label>
                    <input type="hidden" name="period_id" value="<?php echo $period_id; ?>">
                    <input type="number" class="form-control" name="period_no" placeholder="Period No" value="<?php echo $period_data['period_order']; ?>">
                </div>
                
                <div class="form-group w-50">
                    <label>Period Title</label>
                    <input type="text" class="form-control" name="period_title" placeholder="Period Title" value="<?php echo $period_data['period']; ?>">
                </div>
                
                <div class="form-group w-50">
                    <label>Start Time</label>
                    <input type="time" class="form-control" name="start_time" placeholder="Start Time" value="<?php echo $period_data['start_time']; ?>">
                </div>
                
                <div class="form-group w-50">
                    <label>End Time</label>
                    <input type="time" class="form-control" name="end_time" placeholder="End Time" value="<?php echo $period_data['end_time']; ?>">
                </div>
                
                <div class="form-group w-50">
                    <button class="btn btn-sm btn-success" type="submit" name="update_period_information">Update</button>
                </div>
            </form>
            
        </div>
    </div>
</div>
<?php
    }
}
?>