<style>
.documentation-div{box-shadow:0 0 1px #28A745;margin-top:20px;}  
label{width:100%;font-weight:600; background:#263571;}
.breadcrumb-item a {text-decoration: none;color:#fff;}

/**,*/
/**:before,*/
/**:after {*/
/*  -webkit-box-sizing: border-box;*/
/*  -moz-box-sizing: border-box;*/
/*  box-sizing: border-box;*/
/*}*/
</style>
<div class="container-fluid mt-3 mb-3 bg-white">
    <div class="row">
        <div class="col-sm-12 pt-3 pb-3">
        <?php
        $sid=$this->uri->segment(3);
        // echo $sid;
        $profile_pic='';
        $previous_report_card='';
        $previous_school_tc='';
        $birth_certificate='';
        $registration_form_front='';
        $registration_form_back='';
        $mothers_profile_pic='';
        $fathers_profile_pic='';


        $table='student';
        $student_data=$this->StudentModel->check_student($sid,$table);
        if($student_data){
            foreach($student_data as $data){
                $student_name=$data['student_name'];
            }   
        }
        $table1='student_data';
        $student_documents_data=$this->StudentModel->get_student_documents_data($sid,$table1);
        if($student_documents_data){
            foreach($student_documents_data as $document_data){
                $profile_pic = $document_data['profile_pic'];
                $previous_report_card=$document_data['previous_report_card'];
                $previous_school_tc = $document_data['previous_school_tc'];
                $birth_certificate = $document_data['birth_certificate'];
                $registration_form_front=$document_data['registration_form_front'];
                $registration_form_back=$document_data['registration_form_back'];
                $mothers_profile_pic=$document_data['mothers_profile_pic'];
                $fathers_profile_pic=$document_data['fathers_profile_pic'];
            }    
        }


        ?>    
    
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>student/my_class_students">All Students</a></li>
                <li class="breadcrumb-item "><a href="<?php echo base_url(); ?>Student/profile/<?php echo $sid; ?>">Profile</a></li>
                <li class="breadcrumb-item "><a href="<?php echo base_url(); ?>Student/documentation/<?php echo $sid; ?>">Documentation</a></li>
                <li class="breadcrumb-item "><?php echo $student_name;  ?></li>
            </ul>    
            <?php  ?>    

            <?php if($success){ ?>
            <div class="alert alert-success alert-dismissible">
                <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong><?php echo $success; ?></strong>
            </div>  
            <?php } ?>
            <?php if($error){ ?>
            <div class="alert alert-success alert-dismissible">
            <button type="button" class="close" data-dismiss="alert">×</button>
            <strong><?php echo $error; ?></strong>
            </div>  
            <?php } ?>        
    
    
        </div>
    </div>
    <div class="row">
        <div class="col-sm-4">
  
            <div class="documentation-div p-3">
                <?php
                if($profile_pic!=''){
                ?>
                <p class="p-3"><img src="<?php echo base_url(); ?>student-data/profile-img/<?php echo $profile_pic; ?>" style="width:100%;height:auto;"></p>
                <?php
                }
                ?>  
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                        <input type="hidden" value="<?php echo $sid;?>" name="sid">
                        <div class="form-group">
                        
                        <?php
                        if($profile_pic!=''){
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                            
                        } 
                        ?>
                        <label class="text-white p-1">Student Profile Picture</label>  
                        <input type="file" class="form-control p-1" name="student_profile_pic" accept="image/*" capture="camera">
                        <br>
                        <input type="submit" name="student_profile_submit" class="btn btn-sm btn-info" value="Submit"> 
                       
                    </div>   

                </form>    
            </div>    
    
        </div>
        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                        
                        <?php
                        if($previous_report_card!=''){
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                            
                        }
                        ?>
                        <label class="text-white p-1">Report Card Last Exam</label>
                        <input type="file" class="form-control p-1" name="student_report_card" accept="image/*" capture="camera">
                        <br>
                        <input type="submit" name="student_report_card_submit" class="btn btn-sm btn-info" value="Submit">     
                        
                    </div>    
                </form>    
            </div>       
        </div>
        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                        
                        <?php
                        if($previous_school_tc!=''){
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                        }
                        ?>
                        <label class="text-white p-1">Previous School TC</label>
                        <input type="file" class="form-control p-1" name="previous_school_tc" accept="image/*" capture="camera">
                        <br>
                        <input type="submit" name="student_tc_submit" class="btn btn-sm btn-info" value="Submit">     
                    </div>    
                </form>    
            </div>       
        </div>


        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                         
                        <?php
                        if($birth_certificate!=''){
                        ?>
                        <!--<label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>-->
                        <?php
                        }else{
                        }
                        ?>
                        <label class="text-white p-1">Birth Certificate</label>
                        <input type="file" class="form-control p-1" name="student_birth_certificate" accept="image/*" capture="camera">
                        <br>
                        <input type="submit" name="birth_certificate_submit" class="btn btn-sm btn-info" value="Submit">

                    </div>    
                </form>    
            </div>       
        </div>
        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                        
                        <?php
                        if($registration_form_front!=''){
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                        }
                        ?>
                        <label class="text-white p-1">Registration Form Front</label>
                        <input type="file" class="form-control p-1" name="registration_form_front" accept="image/*" capture="camera">
                        <br>
                        <input type="submit" name="registration_form_front_submit" class="btn btn-sm btn-info" value="Submit">     
                        

                    </div>    
                </form>    
            </div>       
        </div>
        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                          
                        <?php
                        if($registration_form_back!=''){
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                        }
                        ?>
                        <label class="text-white p-1">Registration Form Back</label>
                        <input type="file" class="form-control p-1" name="registration_form_back" accept="image/*" capture="camera">
                        <br>
                        <button type="submit" name="registration_form_back_submit" class="btn btn-sm btn-info mt-1">Upload</button>
                    </div>    
                </form>    
            </div>       
        </div>


        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                            
                        <?php
                        if($mothers_profile_pic!=''){ 
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                            
                        }
                        ?>
                        <label class="text-white p-1">Mother's Profile Picture</label>
                        <input type="file" class="form-control p-1" name="mothers_profile_pic" accept="image/*" capture="camera">
                        <br>
                        <input type="submit" name="mothers_profile_pic_submit" class="btn btn-sm btn-info" value="Submit">     
                        
                    </div>    
                </form>    
            </div>       
        </div>


        <div class="col-sm-4">
            <div class="documentation-div p-3">
                <form id="profile-pic" method="post" action="" enctype="multipart/form-data">
                    <input type="hidden" value="<?php echo $sid;?>" name="sid">
                    <div class="form-group">
                        
                        <?php
                        if($fathers_profile_pic!=''){
                        ?>
                        <label class="bg-success text-white p-2">Uploaded Successfully <i class="fas fa-check-circle"></i></label>
                        <?php
                        }else{
                            
                        }
                        ?>
                        
                        <label class="text-white p-1">Father's Profile Picture</label>
                        <input type="file" class="form-control" name="fathers_profile_pic" accept="image/*" capture="camera">
                        
                        <input type="submit" name="fathers_profile_pic_submit" class="btn btn-block btn-info" value="Submit">
                    </div>    
                </form>    
            </div>       
        </div>

    </div>
</div>