<?php
$id=$this->uri->segment('3');
$class=$this->uri->segment('4');
$section=$this->uri->segment('5');
$table="school_staff";
$get_staff_data=$this->WelcomeModel->get_item_data($id,$table);
if($get_staff_data){
    foreach($get_staff_data as $staff_data){
?>

<div class="container bg-white">
    <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(); ?>">Home</a>
                </li>
                <li class="breadcrumb-item">
                    <a href="<?php echo base_url(); ?>Management/all_active_staff">Staff</a>
                </li>
                <li class="breadcrumb-item">Upload Signature</li>
            </ul>
            
            
            <form method="post" action="#" enctype="multipart/form-data" class="form-outer">
                <h1 class="text-center main-heading">Upload Signature</h1>
                <?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
                }
                ?>
                <div class="form-group w_50">
                    <label>Name</label>
                    <input type="hidden" name="id" value="<?php echo $staff_data['id']; ?>">
                    <input type="text" name="staff_name" class="form-control" value="<?php echo $staff_data['salutation']." ".$staff_data['name']; ?>" readonly>
                </div>
                
                <div class="form-group w_50">
                    <label>Class</label>
                    <input type="text" name="class" class="form-control" value="<?php echo $class."-".$section; ?>" readonly>
                </div>
                
                <div class="form-group">
                    <label>Upload Signature</label>
                    <input type="file" name="signature" class="form-control">
                </div>
                
                <div class="form-group">
                    <button type="submit" name="upload_signature" class="btn btn-sm btn-success">Submit</button>
                </div>
            </form>
            
        </div>
    </div>
</div>
<?php
    }
}
?>