<style>
    body{background:#EAEDED;}
    a{color:black;}
a:hover{text-decoration:none;}
</style>
<div class="container bg-white p-3 mt-3 mb-3">
    <div class="row">
        <div class="col-sm-12">
        <ul class="breadcrumb">
            <li class="breadcrumb-item"><?php echo $this->session->userdata('ac_year'); ?></li> 
            <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Welcome">Home</a></li> 
            <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>Management/drop_out_list">Drop Out List</a></li> 
            <li class="breadcrumb-item">Promote/Repeat</li>
</ul>
        <div class="">
            <h3>Promote or Repeat Student for </h3>
            <form method="post" class="p-3" style="box-shadow:0 0 4px silver">
                
                <?php
                if($success){
                    ?>
                    <div class="alert alert-success"><?php echo $success;?></div>
                    <?php
                }
                                if($error){
                    ?>
                    <div class="alert alert-danger"><?php echo $error;?></div>
                    <?php
                }
                $sid=$this->uri->segment('3');
                $table1='student';
                $get_item_data=$this->WelcomeModel->get_item_data($sid,$table1);
                if($get_item_data){
                    foreach($get_item_data as $data){
                        ?>
                <div class="form-group">
                    <label>Student Name</label>
                    <input type="hidden" value="<?php echo $sid?>" name="sid">
                    <input type="text" class="form-control" value="<?php echo $data['student_name'];?>" readonly>
                </div>
                <div class="form-group">
                    <label>Current Class</label>
                    <input type="text" class="form-control" value="<?php echo $data['class'];?>" readonly>
                </div>
                <div class="form-group">
                    <label>Current Section</label>
                    <input type="text" class="form-control" value="<?php echo $data['section'];?>" readonly>
                </div>
                
                
                        <?php
                    }
                }
                
                ?>

                
                
                <div class="form-group">
                    <label>Promote to Class</label>
                    <select class="form-control" name="new_course"  required>
                        <option value="">-- select new course -- </option>
                        <?php 
                        $table='courses';
                        $get_courses=$this->WelcomeModel->get_data($table);
                        if($get_courses){
                            foreach($get_courses as $courses){
                                ?>
                                <option id="" value="<?php echo $courses["course"]; ?>"><?php echo $courses["course"]; ?></option>
                                <?php
                            }
                        }
                        ?>
                        
                        
                    </select>
                </div>
                <div class="form-group">
                    <label>New Section</label>
                    <select class="form-control" name="new_section" required>
                        <option value="A">A</option>
                        <option value="B">B</option>
                        <option value="C">C</option>
                        <option value="D">D</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>Acedemic Session</label>
                    
                    <select class="form-control" name="new_acedemic_session" required>
                    <option value="2">New 2021-2022</option>    
                    </select>
                </div>
                
                <div class="form-group">
                    <input type="submit" name="change_ac_session" class="btn btn-sm btn-success" value="Change Session">
                </div>
            </form>
        </div>
        
        </div>
    </div>
</div>