<?php
$user_id = $this->session->userdata('user_id');
?>
<div class="col-sm-10 " >
    <div class="col-sm-12 gray_ttc" style="padding: 0">

        <!-- Upload image part -->

        <div class="col-sm-3" style="padding: 5px" id="profile_image_area">
            <a href="javascript:void(0)">    
                <?php if ($person_info->person_image) { ?>
                    <div>
                        <img id="src_image_file"
                             src="<?php echo base_url() . 'content-library/' . $person_info->url . '/' . $person_info->person_image; ?>" 
                             style="width: 250px;height: 230px; transform: rotate(0deg);" 
                             class="img-responsive">
                    </div>
                <?php } else { ?>
                    <div>
                        <img id="src_image_file"
                             src="<?php echo base_url() ?>image/no_profile_picture.png" 
                             class="img-responsive" 
                             style="width: 230px;height: 230px"></div>
                    <?php } ?>
            </a>

            <span id="image_change_area">
                <span class="col-sm-2">
                    <script>
                        $(":file").filestyle({
                            'iconName', 'glyphicon glyphicon-paperclip'
                        }
                        );</script>
                    <input tabindex="-1" 
                           name="person_image"   
                           onchange="getPersonImage(this)" 
                           id="person_image" 
                           title="Upload File" 
                           type="file" 
                           class="filestyle"
                           data-input="false"
                           data-iconName="glyphicon glyphicon-paperclip" 
                           data-buttonText=""
                           data-badge="false"
                           value="">
                    <br>
                </span>
            </span>
            <a id="changeProfilePicture" href="javascript:void(0)" 
               class="btn btn-sm btn-success"  
               data-toggle="modal" data-target="#ImageModel" 
               style="position: absolute;left: 5px;top: 2px;z-index: 999999;">Change picture
            </a>
        </div>
        
        <?php
        include_once 'edit_profile/modal_edit_image.php';
        ?>

        <!-- Upload image part -->


        <div class="col-sm-9" style="padding-left: 40px" id="main_profile">
            <div class="col-sm-12" style="padding: 0">
                <div class="col-sm-12" style="padding: 0">

                    <span class="pull-left " style="display: block;color: #80c12c;font-size: 24px" id="full_name">
                        <?php echo $person_info->person_first_name . ' ' . $person_info->person_last_name ?>   
                    </span>

                    <a href="javascript:void(0)" 
                       onclick="EditName()"> 
                        <span  class="col-sm-3"  
                               id="edit_pencil" 
                               style="margin-top: 10px;margin-left: -16px">
                            <i class="fa fa-pencil"></i>
                        </span>
                    </a>
                    <form action="" method="post" id="nameForm" >
                        <span class="pull-left col-sm-8"  style="display: none" id="EditNameForm">
                            <br>
                            <input id="personFirstName"  
                                   type="text" class="form-control "  
                                   value="<?php echo $person_info->person_first_name ?>"
                                   onblur="nameRequired(this.value, 'first_name_error', 'btn_save_name')"
                                   aria-describedby="basic-addon1" autofocus="">
                            <span id="first_name_error" style="color:red"></span><br/>
                            <input id="personLastName"  
                                   type="text" class="form-control"  
                                   value="<?php echo $person_info->person_last_name ?>"
                                   onblur="checkLastName(this.value, 'last_name_error', 'btn_save_name')"
                                   aria-describedby="basic-addon1" autofocus="">
                            <span id="last_name_error" style="color:red"></span><br/>
                            <input id="personID"  type="hidden" class="form-control"  value="<?php echo $person_info->person_id ?> " aria-describedby="basic-addon1" autofocus="">
                            <input id="personUrl"  type="hidden" class="form-control"  value="<?php echo $person_info->url ?> " aria-describedby="basic-addon1" autofocus="">
                        </span>
                        <input id="urlID"  type="hidden" value="<?php echo $person_info->url_id ?>">

                        <span class="pull-left col-sm-2"  style="display: none" id="NameSubmit">
                            <br>
                            <a href="javascript:void(0)" id="btn_save_name" onclick="UpdateName('<?php echo base_url(); ?>update-user-name')">   <i class="fa fa-check-circle fa-2x" title="Update" ></i></a>
                            <input type="submit" class="fa fa-check-circle fa-2x">
                        </span>
                    </form>
                </div>

                <div class="col-sm-12"><br></div>
                <div class="col-sm-12" style="padding: 0">
                    <h5>
                        <span class="pull-left" style="padding:0 10px 10px 0">
                            <p ><span id="view_country"></span>
                                <?php
                                if ($user_work_details) {
                                    echo '| <a href="javascript:void(0)">';
                                    foreach ($user_work_details as $v_user_work_details) {
                                        $current_status = $v_user_work_details->work_details_status;
                                        if ($current_status == 1) {
                                            echo $v_user_work_details->company_name;
                                            break;
                                        } else {
                                            echo '';
                                        }
                                    }
                                    echo ' </a>';
                                }
                                ?>
                            </p>
                        </span>
                        <script>
                            var country = getCountryName('<?php echo $person_info->person_country; ?>');
                            document.getElementById('view_country').innerHTML = country;
                        </script>
                    </h5>
                </div>

                <div class="col-sm-12" style="padding: 0">
                    <h5>
                        <span class="pull-left">
                            <?php
                            if ($user_education_details) {
                                echo ' <a href="javascript:void(0)" style="margin-right: 20px">Education</a> 
                                                <a href="javascript:void(0)">';
                                foreach ($user_education_details as $e_value) {
                                    echo $e_value->education_institute_name;
                                    break;
                                }
                                echo ' </a>';
                            }
                            ?>
                        </span>
                    </h5>
                </div>

                <div class="col-sm-12"><br><br></div>
                <div class="col-sm-12" style="padding: 0">
                    <div class="col-sm-4">
                        <a href="<?php echo base_url() . $person_info->url . '/' ?>profile">  <button type="button" class="green-btn btn btn-default">View profile</button></a><br/><br/>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--Start Check Url Part  -->  

    <form action="" method="post">
        <div class="col-sm-12 text-left" style="padding: 10px;background-color: #F0F0F0" >
            <div class="col-sm-1"> 
                <span><img src="<?php echo base_url() ?>image/logo.png" style="width: 20px" class="img-responsive"></span>
            </div>

            <div class="col-sm-9" style="padding: 0;font-size: 14px" >
                <a href="<?php echo base_url() . $person_info->url . '/' ?>profile">
                    <span class="col-sm-4 padding-zero text-right" >                    
                        <?php echo base_url(); ?>
                    </span>
                    <span class="col-sm-5 padding-zero" id="viewURL" style="margin-left: 0px"><?php echo $person_info->url ?></span> </a>
                <input data-errormessage-value-missing="profile url is required!" 
                       oninput="checkUrlExists(this.value,old_url.value)"
                       class="col-sm-6 padding-zero margin-zero" 
                       id="URLfield" style="display: none;" type="text" name="url">
            </div>
            <input type="hidden" id="old_url"  value="<?php echo $person_info->url; ?>">
            <input type="hidden" id="url_validate"  value="">

            <div class="col-sm-2" style="padding: 0;" id="edit_url">
                <a href="javascript:void(0)"  onclick="updateUrlForm()"> 
                    <span  class="btn btn-success " ><i class="fa fa-pencil" title="Update URL Form"> </i> </span>
                </a>
            </div>
            <input id="url_id"  type="hidden" value="<?php echo $person_info->url_id; ?>">
            <div class="col-sm-2" style="padding: 0; display: none" id="save_update_url">
                <a href="javascript:void(0)" id="update_btn" onclick="return updateUrl(url_id.value, URLfield.value, old_url.value)"> 
                    <span  class="btn btn-success " ><i class="fa fa-save" title="Update URL "> </i> </span>
                </a>
            </div>

        </div>
        <span id="message" style="color:red"></span>
    </form>
    <input type="hidden" id="url_change_different" value="<?php echo $url_change_different; ?>">
    <!--END Check Url Part  -->  


<!--    Person Work details start  -->
    <div class="col-sm-12"><br></div>
    <div class="col-sm-12 white" style="padding: 0" id="experience_profile">
        <div class="col-sm-12 text-left" style="padding: 20px">
            <span><i class="fa fa-file-text fa-2x">&nbsp;&nbsp;&nbsp;</i>Experience</span>
            <span  class="form-group pull-right" id="add_work_experience_btn">
                <!--Add Work Experience</span>-->
                <a href="javascript:void(0)" onclick="addWorkExperiecneForm('<?php echo base_url() . 'work-exprience-form/' . $person_info->person_id ?>')" style="color: white" class="btn btn-success "><i class="fa fa-plus" title="Add Work Experience"></i></a>
            </span>
        </div>
        <div class="col-sm-12" style="display: none" id="add_new_work_experience"></div>
        <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px" id="work_experience_view">
            <?php foreach ($user_work_details as $v_user_work_details) { ?>
                <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px" id="View_work_experience">
                    <div class="col-sm-12" id="<?php echo 'work_info' . $v_user_work_details->person_work_details_id ?>">    
                        <span class="h4 col-sm-12">
                            <span> <a href="javascript:void(0)"  id="jobExperience1Title" class="jobExperience1Title"><?php echo $v_user_work_details->designation ?></a></span>
                            <span id="workEditBtn"> 
                                <a href="javascript:void(0)" 
                                   id="<?php echo $v_user_work_details->person_work_details_id ?>" 
                                   onclick="viewEditWorkExperience('<?php echo base_url() ?>edit-work-experience-form/<?php echo $v_user_work_details->person_work_details_id; ?>', '<?php echo $v_user_work_details->person_work_details_id; ?>')">
                                    <span  class="form-group btn btn-success " ><i class="fa fa-pencil" title="Update Work Experience"></i></span></a></span>
                        </span>
                        <span class="col-sm-12" id="Experience1OrganizationName" class="Experience1OrganizationName"><?php echo $v_user_work_details->company_name ?></span>
                        <span class="col-sm-12" id="Experience1_Duration">
                            <span id="work_start_date" class="work_start_date">   <?php echo date('F Y', strtotime($v_user_work_details->job_start_date)) ?> </span>
                            <?php
                            $current_status = $v_user_work_details->work_currently_here;
                            if ($current_status == 1) {
                                echo ' At Present Time';
                            } else {
                                echo date('F Y', strtotime($v_user_work_details->job_end_date));
                            }
                            ?> 
                            |
                            <span id="company_office_address" class="company_office_address">
                                <?php echo $v_user_work_details->company_address ?>
                            </span>
                        </span>
                        <span class="col-sm-12"><br></span>
                        <span class="col-sm-12">
                            <p id="Experience1_Details" class="text-justify Experience1_Details"> 
                                <?php echo $v_user_work_details->job_responsibility_details ?>
                            </p>
                        </span>

                    </div>
                </div>
            <?php } ?>
        </div>






        <!----------------------Person Course View-------------------->
        <div class="col-sm-12"><br></div>
        <?php
        if ($person_info->person_role == 2) {
            
        } else if ($person_info->person_role != 5) {
            ?>
            <div class="col-sm-12 white" style="padding: 0">
                <div class="col-sm-12 text-left" style="padding: 5px 0 0 20px">
                    <span><i class="fa fa-book fa-2x">&nbsp;&nbsp;&nbsp;</i>Course</span>
                </div>

                <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px">
                    <?php
                    if ($person_course_info) {
                        ?>
                        <h4><a href="javascript:void(0)">Created By <?php echo $person_info->person_first_name . ' ' . $person_info->person_last_name; ?>  </a></h4>
                        <?php
                    }
                    if ($person_course_info) {
                        foreach ($person_course_info as $v_person_course_info) {
                            ?>
                            <p class="text-justify"><i class="fa fa-book">&nbsp;&nbsp;</i> 
                                <?php echo $v_person_course_info->course_name; ?>
                            </p>
                            <?php
                        }
                    }
                    if (isset($person_course_with_organization_info)) {
                        ?>
                        <h4><a href="javascript:void(0)">Created By <?php echo $organization_name; ?>  </a></h4>  
                        <?php
                        foreach ($person_course_with_organization_info as $v_person_course_info) {
                            ?>
                            <p class="text-justify"><i class="fa fa-book">&nbsp;&nbsp;</i> 
                                <?php echo $v_person_course_info->course_name; ?>
                            </p>

                            <?php
                        }
                        ?>
                    <?php }
                    ?>
                </div>
            </div>
        <?php } else { ?>
            <div class="col-sm-12 white" style="padding: 0">
                <div class="col-sm-12 text-left" style="padding: 5px 0 0 20px">
                    <span><i class="fa fa-book fa-2x">&nbsp;&nbsp;&nbsp;</i>Course</span>
                </div>

                <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px">
                    <?php foreach ($person_organization_name as $o_value) { ?>
                        <h4><a href="javascript:void(0)"><?php echo $o_value->organization_name; ?></a></h4>
                        <?php foreach ($person_orgaanization_course_name[$o_value->organization_id] as $c_value) {
                            ?>
                            <p class="text-justify"><i class="fa fa-book">&nbsp;&nbsp;</i><?php echo $c_value->course_name; ?></p>
                            <?php
                        }
                    }
                    ?>
                </div>
            </div>
        <?php } ?>




        <!-----------------language view------------------>
        <div class="col-sm-12"><br></div>
        <div class="col-sm-12 white" style="padding: 0" id="language">
            <div class="col-sm-12 text-left" style="padding: 5px 0 0 20px">
                <span><i class="fa fa-globe fa-2x">&nbsp;&nbsp;&nbsp;</i>Language</span>
                <span  class="form-group  pull-right" id="add_language_btn" style="display: block;padding-right: 20px">
                    <a class="btn btn-success" href="javascript:void(0)" onclick="addLanguageForm('<?php echo base_url() . 'profile/add_language_form/' . $person_info->person_id ?>')" style="color: white"><i title="Add Langunage" class="fa fa-plus"></i></a>
                </span>
                <div class="col-sm-12" id="add_language_form" style="display: none"></div>

            </div>
            <div id="edit_language_form" style="display: none;"></div>
            <div class="col-sm-12 text-left gray" id="view_language" style="display: block;">
                <?php foreach ($person_language as $l_value) { ?>
                    <div class="col-sm-6 " style="padding: 5px 0 0 20px">
                        <span class="col-sm-8 h4" style="text-align: left !important"><?php echo $l_value->person_language; ?></span>
                        <span class="col-sm-4  text-right" style="padding-top: 20px">
                            <a href="javascript:void(0)" onclick="editLanguage('<?php echo base_url() . 'profile/edit_langiage_by_id/' . $l_value->person_language_id . '/' . $person_info->person_id ?>')" > <i class="fa fa-edit" title="Edit"></i></a>
                            <a href="javascript:void(0)" onclick="checkLanguageAction('<?php echo base_url() . 'profile/delete_language_by_language_id/' . $l_value->person_language_id . '/' . $person_info->person_id ?>', 'Delete')" ><i class="fa fa-trash-o" title="Delete"></i></a>
                        </span><br>
                        <p class="col-sm-12"><?php
                            switch ($l_value->person_language_proficiency) {
                                case 0:
                                    echo 'No Proficiency';
                                    break;
                                case 1:
                                    echo 'Elementary Proficiency';
                                    break;
                                case 2:
                                    echo 'Limited Working Proficiency';
                                    break;
                                case 3:
                                    echo 'Professional Working Proficiency';
                                    break;
                                case 4:
                                    echo 'Full Professional Proficiency';
                                    break;
                                case 5:
                                    echo 'Native or Bilingual Proficiency';
                                    break;
                            }
                            ?></p>
                    </div>
                <?php } ?>
            </div>
        </div>




        <!-----------------Self Assessment Skills---------------------------->
        <div class="col-sm-12"><br></div> 
        <div class="col-sm-12 white" style="padding: 0">
            <div class="col-sm-12 text-left" style="padding: 5px 0 0 20px">
                <span><i class="fa fa-globe fa-2x">&nbsp;&nbsp;&nbsp;</i>Skills</span>
            </div>
            <div class="col-sm-12 text-left white" style="padding-left: 20px" id="self_asssesment">
                <h4 class="col-sm-10"><a href="#">Self Assessment Skills</a></h4>
                <?php if ($person_self_assessmet_skills) { ?>
                    <span class="col-sm-2 " id="Assessment_update_btn">
                        <a href="javascript:void(0)" onclick="UpdatePersonAssessmentForm('<?php echo base_url() . 'self-assesment-form/' . $person_info->person_id; ?>')" ><span  class="btn btn-success " ><i class="fa fa-pencil" title="Update Person Assessment Information"> </i> </span></a>
                    </span>   
                <?php } else { ?>
                    <span  class="form-group pull-right" style="padding-right: 10px">
                        <a class="btn btn-success" href="javascript:void(0)" onclick="UpdatePersonAssessmentForm('<?php echo base_url() . 'profile/edit_self_assesment_form/' . $person_info->person_id; ?>')" style="color: white">
                            <i class="fa fa-plus" title="Add Assessment Information"></i> 
                        </a> 
                    </span>
                <?php } ?> 
                <?php if ($person_self_assessmet_skills) { ?>
                    <span class="col-sm-12" id="View_Assessment_skill">
                        <?php
                        foreach ($person_self_assessmet_skills as $s_value) {
                            echo '<span class="btn btn-success" style="margin-left: 5px; margin-bottom: 10px">' . $s_value->self_assessment_skills_name . '</span>';
                        }
                        ?>           
                    </span>
                <?php } ?>
            </div>
        </div>

        <!--Education part-->

        <div class="col-sm-12"><br></div>
        <div class="col-sm-12 white" style="padding: 0">
            <div class="col-sm-12 text-left" style="padding: 5px 0 0 20px">
                <span><i class="fa fa-plane fa-2x">&nbsp;&nbsp;&nbsp;</i>Education</span>

                <span  class="form-group  pull-right" id="add_education_btn" style="display: block;padding-right:20px ">
                    <a class="btn btn-success" href="javascript:void(0)" onclick="addEducationForm('<?php echo base_url() . 'add-education-form/' . $person_info->person_id ?>')" style="color: white">
                        <i class="fa fa-plus" title="Add Education"></i>
                    </a>
                </span>
            </div>


            <!--Add Education form-->
            <div class="col-sm-12" id="add_education_form" style="display:none"></div>

            <!--View Education-->
            <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px" id="view_education_details">
                <?php
                foreach ($user_education_details as $e_value) {
                    ?>
                    <div class="col-sm-12" id="<?php echo 'education_form_view' . $e_value->person_education_details_id; ?>">
                        <h4>
                            <a href="javascript:void(0)"><?php echo $e_value->education_institute_name; ?></a>
                            <span id="Assessment_update_btn">
                                <a href="javascript:void(0)" onclick="viewEditEducation('<?php echo base_url() . 'edit-education-form/' . $e_value->person_education_details_id; ?>', '<?php echo $e_value->person_education_details_id ?>')"><span  class="btn btn-success " ><i class="fa fa-pencil" title="Update Person Education Form"> </i> </span></a>
                            </span>
                        </h4>
                        <span id="view_educational_description"><?php echo $e_value->educational_description; ?></span><br>
                        <span><?php echo date('Y', strtotime($e_value->start_time_period)) ?></span> –<span> 
                            <?php
                            if ($e_value->person_current_education_instute == 1) {
                                echo ' At Present Time';
                            } else {
                                echo date('Y', strtotime($e_value->end_time_period));
                            }
                            ?></span>

                    </div>
                    <div class="col-sm-12"><br></div>
                <?php } ?>
            </div>
        </div>

        <!---------------------------Person interest field------------------------->
        <div class="col-sm-12"><br></div>
        <div class="col-sm-12 white" style="padding: 0">
            <div class="col-sm-12 text-left" style="padding: 5px 0 0 20px">
                <span><i class="fa fa-refresh fa-2x">&nbsp;&nbsp;&nbsp;</i>Additional Info</span>
            </div>
            <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px" id="view_interest">
                <span class="col-sm-10"> <a class="h4">Interests </a></span>
                <?php if ($interest_field_info_all) { ?>
                    <span class="col-sm-2">
                        <a href="javascript:void(0)" onclick="editPersonInterestForm('<?php echo base_url() . 'profile/edit_persson_interest_form/' . $person_info->person_id; ?>')" >
                            <span  class="btn btn-success " ><i class="fa fa-pencil" title="Update Personal Interest Infromation"> </i> </span></a>
                    </span>
                <?php } else { ?>
                    <span  class="form-group  pull-right" style="padding-right: 20px">
                        <a class="btn btn-success" href="javascript:void(0)" onclick="editPersonInterestForm('<?php echo base_url() . 'profile/edit_persson_interest_form/' . $person_info->person_id; ?>')" style="color: white"><i class="fa fa-plus" title="Add Interest"></i></a>
                    </span>
                <?php } ?>
                <span class="col-sm-12"><br></span>
                <?php if ($interest_field_info_all) { ?>
                    <div class="col-sm-12 text-left gray" style="padding: 5px 0 0 20px">
                        <span><?php
                            foreach ($interest_field_info_all as $v_interest_field_info_all) {
                                if ($v_interest_field_info_all) {
                                    echo '<span class="btn btn-success" style="margin-left: 5px; margin-bottom: 10px">' . $v_interest_field_info_all->field_of_interest_name . '</span>';
                                }
                            }
                            ?>
                        </span><br></br>
                    </div>
                <?php } ?>
                <div class="col-sm-12"><br><br></div>
            </div>





            <!-------------personal details-----------------> 
            <div class="col-sm-12 col-xs-12 text-left white" style="padding: 20px">
                <span class="col-sm-11"> <h4><a href="javasccript:void(0)">Personal Details</a></h4></span>
                <a href="javascript:void(0)" 
                   onclick="editPersonDetailForm('<?php echo base_url() . 'profile/edit_person_detail_form/' . $person_info->person_id ?>')">
                    <span  class="btn btn-success pull-right col-sm-1" ><i class="fa fa-pencil" title="Update Personal Infromation"></i>
                    </span>
                </a>
                <span id="personal_information_form"  style="display: none"></span> 
                <span id="personal_information" style="display: block;">   
                    <span class="col-sm-12 col-xs-12 form-group"> 
                        <span class="col-sm-4 padding-zero text-left">Join TT</span>
                        <span class="col-sm-4 padding-zero text-left" id="view_join_tt_date"><?php echo date('d F Y', strtotime($person_info->person_join_tt)) ?></span> 
                        <span class="col-sm-4"></span>
                    </span>

                    <?php
                    if ($person_info->person_email) {
                        ?>

                        <span class="col-sm-12 col-xs-12 form-group"> 
                            <span class="col-sm-4 padding-zero text-left">Email Address</span>
                            <span class="col-sm-4 padding-zero text-left" id="view_contact"><?php echo $person_info->person_email; ?></span>
                            <span class="col-sm-4" id="email">
                                <?php
                                switch ($person_feature_details->person_email_view_status) {
                                    case 1:
                                        ?>
                                        <a href="javascript:void(0)" style="color: red"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_talha_user/email/2/' . $person_feature_details->person_id; ?>', 'email')" >
                                            <i class="fa fa-users" title="Public"></i>
                                        </a>
                                        <?php
                                        break;
                                    case 2:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_link/email/3/' . $person_feature_details->person_id; ?>', 'email')" >
                                            <img src="<?php echo base_url()?>image/dashboard-tt-icon.png" title="TT User" alt="TT User">
                                        </a>
                                        <?php
                                        break;
                                    case 3:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_only_me/email/5/' . $person_feature_details->person_id; ?>', 'email')" >
                                            <i class="fa fa-link" title="My Link"></i>
                                        </a>
                                        <?php
                                        break;
                                    case 5:
                                        ?>
                                        <a href="javascript:void(0)" style="color: green"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_public/email/1/' . $person_feature_details->person_id; ?>', 'email')" >
                                            <i class="fa fa-user" title="Only Me"></i>
                                        </a>
                                        <?php
                                        break;
                                }
                                ?>
                            </span>
                        </span>
                    <?php } ?>

                    <?php
                    if ($person_info->person_contact_number) {
                        ?>

                        <span class="col-sm-12 col-xs-12 form-group"> 
                            <span class="col-sm-4 padding-zero text-left">Contact Number</span>
                            <span class="col-sm-4 padding-zero text-left" id="view_contact"><?php echo $person_info->person_contact_number ?></span>

                            <span class="col-sm-4 padding-zero text-left" id="contact">
                                <?php
                                switch ($person_feature_details->person_contact_number_view_status) {
                                    case 1:
                                        ?>
                                        <a href="javascript:void(0)" style="color: red"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_talha_user/contact/2/' . $person_feature_details->person_id; ?>', 'contact')" >
                                            <i class="fa fa-users" title="Public" style="padding-left: 18px"></i>
                                        </a>
                                        <?php
                                        break;
                                    case 2:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_link/contact/3/' . $person_feature_details->person_id; ?>', 'contact')" >
                                            <img src="<?php echo base_url()?>image/dashboard-tt-icon.png" title="TT User" alt="TT User" style="padding-left: 18px">
                                        </a>

                                        <?php
                                        break;
                                    case 3:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_only_me/contact/5/' . $person_feature_details->person_id; ?>', 'contact')" >
                                            <i class="fa fa-link" title="My Link" style="padding-left: 18px"></i>
                                        </a>

                                        <?php
                                        break;
                                    case 5:
                                        ?>
                                        <a href="javascript:void(0)" style="color: green"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_public/contact/1/' . $person_feature_details->person_id; ?>', 'contact')" >
                                            <i class="fa fa-user" title="Only Me" style="padding-left: 18px"></i>
                                        </a>
                                        <?php
                                        break;
                                }
                                ?>
                            </span>
                        </span>
                    <?php } ?>


                    <span class="col-sm-12 col-xs-12 form-group"> 
                        <span class="col-sm-4 padding-zero text-left">Country</span>
                        <span class="col-sm-4 padding-zero text-left" id="view_country1"></span>
                        <span class="col-sm-4"></span>
                    </span>
                    <script>
                        var country = getCountryName('<?php echo $person_info->person_country; ?>');
                        document.getElementById('view_country1').innerHTML = country;
                    </script>


                    <span class="col-sm-12 col-xs-12 form-group"> 
                        <span class="col-sm-4 padding-zero text-left">City</span>
                        <span class="col-sm-4 padding-zero text-left" id="view_city"><?php echo $person_info->person_city; ?></span>
                        <span class="col-sm-4"></span>
                    </span>

                    <?php
                    if ($person_info->person_address) {
                        ?>

                        <span class="col-sm-12 col-xs-12 form-group"> 
                            <span class="col-sm-4 padding-zero text-left">Address</span>
                            <span class="col-sm-4 padding-zero text-left" id="view_address"><?php echo $person_info->person_address ?></span>
                            <span class="col-sm-4 padding-zero text-left" id="address">
                                <?php
                                switch ($person_feature_details->person_address_view_status) {
                                    case 1:
                                        ?>
                                        <a href="javascript:void(0)" style="color: red"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_talha_user/address/2/' . $person_feature_details->person_id; ?>', 'address')" >
                                            <i class="fa fa-users" title="Public" style="padding-left: 18px"></i>
                                        </a>

                                        <?php
                                        break;
                                    case 2:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_link/address/3/' . $person_feature_details->person_id; ?>', 'address')" >
                                            <img src="<?php echo base_url()?>image/dashboard-tt-icon.png" title="TT User" alt="TT User" style="padding-left: 18px">
                                        </a>

                                        <?php
                                        break;
                                    case 3:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_only_me/address/5/' . $person_feature_details->person_id; ?>', 'address')" >
                                            <i class="fa fa-link" title="My Link" style="padding-left: 18px"></i>
                                        </a>

                                        <?php
                                        break;
                                    case 5:
                                        ?>
                                        <a href="javascript:void(0)" style="color: green"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_public/address/1/' . $person_feature_details->person_id; ?>', 'address')" >
                                            <i class="fa fa-user" title="Only Me" style="padding-left: 18px"></i>
                                        </a>
                                        <?php
                                        break;
                                }
                                ?>
                            </span>
                        </span>
                    <?php } ?>


                    <span class="col-sm-12 col-xs-12 form-group"> 
                        <span class="col-sm-4 padding-zero text-left">Gender</span>
                        <span class="col-sm-4 padding-zero text-left">
                            <?php
                            $gender = $person_info->person_gender;
                            if ($gender == 1) {
                                echo 'Male';
                            } else if ($gender == 2) {
                                echo 'Female';
                            } else {
                                echo 'Other';
                            }
                            ?></span>
                        <span class="col-sm-4 padding-zero text-left"></span>
                    </span>

                    <?php
                    if ($person_info->person_birthday) {
                        ?>

                        <span class="col-sm-12 col-xs-12 form-group"> 
                            <span class="col-sm-4 padding-zero text-left">Birthday</span>
                            <span class="col-sm-4 padding-zero text-left" id="view_birthday"><?php echo $person_info->person_birthday; ?></span>
                            <span class="col-sm-4 padding-zero text-left" id="birthday">
                                <?php
                                switch ($person_feature_details->person_birthday_view_status) {
                                    case 1:
                                        ?>
                                        <a href="javascript:void(0)" style="color: red"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_talha_user/birthday/2/' . $person_feature_details->person_id; ?>', 'birthday')" >
                                            <i class="fa fa-users" title="Public" style="padding-left: 18px"></i>
                                        </a>

                                        <?php
                                        break;
                                    case 2:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_link/birthday/3/' . $person_feature_details->person_id; ?>', 'birthday')" >
                                            <img src="<?php echo base_url()?>image/dashboard-tt-icon.png" title="TT User" alt="TT User" style="padding-left: 18px">
                                        </a>

                                        <?php
                                        break;
                                    case 3:
                                        ?>
                                        <a href="javascript:void(0)"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_only_me/birthday/5/' . $person_feature_details->person_id; ?>', 'birthday')" >
                                            <i class="fa fa-link" title="My Link" style="padding-left: 18px"></i>
                                        </a>

                                        <?php
                                        break;
                                    case 5:
                                        ?>
                                        <a href="javascript:void(0)" style="color: green"
                                           onclick="checkAction('<?php echo base_url() . 'profile/change_status_to_public/birthday/1/' . $person_feature_details->person_id; ?>', 'birthday')" >
                                            <i class="fa fa-user" title="Only Me" style="padding-left: 18px"></i>
                                        </a>
                                        <?php
                                        break;
                                }
                                ?>
                            </span>

                        </span>
                    <?php } ?>

                    <span class="col-sm-12 col-xs-12 form-group"> 
                        <span class="col-sm-4 padding-zero text-left">Link</span>
                        <span class="col-sm-4 padding-zero text-left"><a href='<?php echo base_url() . $person_info->url ?>/my-link'><?php echo $total_friends ?></a></span>
                        <span class="col-sm-4"></span>
                    </span>


                    <span class="col-sm-12 col-xs-12 form-group"> 
                        <span class="col-sm-4 padding-zero text-left">Change Password</span>
                        <span class="col-sm-4 padding-zero text-left"><a href="javascript:void(0)"
                                                                         onclick="getChangedPasswordForm('<?php echo base_url() . 'get-password-form' ?>', '<?php echo $user_id; ?>')">Click Here</a></span>
                        <span class="col-sm-4"></span>
                    </span>

                    <span class="col-sm-8 col-xs-12 form-group" id="changePasswordForm" style="display: none"> 

                    </span>
                </span>  

            </div>

        </div>
    </div>
<!--    Person Work details End  -->
</div>

<script type="text/javascript">
    function WorkStatus12(GivenText) {
//    alert(GivenText);
        var workEndDate = document.getElementById('workEndDate11');
        if (GivenText == 2) {
            workEndDate.setAttribute('style', 'display:block');
        } else {
            workEndDate.setAttribute('style', 'display:none');
        }
    }

</script>

<script type="text/javascript" src="<?php echo base_url()?>front_end_resource/profile/edit_profile.js"></script>

<script>    
    select_institute_url = '<?php echo base_url(); ?>profile/select_institute/';
    get_education_value_url = '<?php echo base_url(); ?>super_admin_profile/get_education_value/';    
    getWorkEXperienceValue = '<?php echo base_url(); ?>super_admin_profile/get_work_experience_value/';
</script>