<script type="text/javascript">
function export_data(id)
{
      
        var url = "<?php echo site_url('userdata/export_data');?>"+'/'+'0'+'/'+id;
        console.log(url);
        window.location = url;
    
} 
</script>
<?php



//print_r($product_id);
  ?>
  <div id="page-wrapper">
  <div class="container-fluid">
    <div class="table widget">
      <div class="row">
        <div class="col-lg-12">
          <h3 class="page-header"> Survey Details</h3>
          
        </div>
        <div class="col-lg-4 pull-left" style="margin-bottom:10px;">
              <input type="button" name="export" id="export" value="Export" class="btn btn-primary" style=""  onClick="javascript:export_data(<?php echo $id;?>);"> 
              </div>
        <div class="col-lg-12">
         
         
          
          
          Name : <?php echo $name; ?><br>
          Date of Birth : <?php echo  date('d-m-Y', strtotime($dob)); ?><br>
          <?php if(isset($taluk_name) && $taluk_name !='' && $taluk_name !='0'){?>
          Taluk : <?php echo $taluk_name; ?><br>
          <?php } ?>
          <?php if(isset($grama_panchayath) && $grama_panchayath !='' && $grama_panchayath !='0'){?>
          Grama Panchayath : <?php echo $grama_panchayath; ?><br>
          <?php } ?>
          <?php if(isset($ward) && $ward !='' && $ward !='0'){?>
          Ward : <?php echo $ward; ?><br>
          <?php } ?>
          <?php if(isset($cast_certificate) && $cast_certificate !='' && $cast_certificate !='0'){?>
          Cast certificate : <?php echo $cast_certificate; ?><br>
          <?php } ?>
          <?php if(isset($toilet_avail) && $toilet_avail !='' && $toilet_avail !='0'){?>
          Toilet avail : <?php echo $toilet_avail; ?><br>
          <?php } ?>
          <?php if(isset($aadhar) && $aadhar !='' && $aadhar !='0'){?>
          Aadhar : <?php echo $aadhar; ?><br>
          <?php } ?>
          <?php if(isset($aadhar_avail) && $aadhar_avail !='' && $aadhar_avail !='0'){?>
          Aadhar_avail : <?php echo $aadhar_avail; ?><br>
          <?php } ?>
          <?php if(isset($ration_card) && $ration_card !='' && $ration_card !='0'){?>
          Ration_card : <?php echo $ration_card; ?><br>
          <?php } ?>
          <?php if(isset($rationcard_avail) && $rationcard_avail !='' && $rationcard_avail !='0'){?>
          Rationcard_avail : <?php echo $rationcard_avail; ?><br>
          <?php } ?>

          <?php if(isset($jobcard) && $jobcard !='' && $jobcard !='0'){?>
          jobcard : <?php echo $jobcard; ?><br>
          <?php } ?>
          <?php if(isset($jobcard_avail) && $jobcard_avail !='' && $jobcard_avail !='0'){?>
          jobcard_avail : <?php echo $jobcard_avail; ?><br>
          <?php } ?>
          <?php if(isset($name_base_line_survey) && $name_base_line_survey !='' && $name_base_line_survey !='0'){?>
          name_base_line_survey : <?php echo $name_base_line_survey; ?><br>
          <?php } ?>
          <?php if(isset($electric_bill) && $electric_bill !='' && $electric_bill !='0'){?>
          electric_bill : <?php echo $electric_bill; ?><br>
          <?php } ?>

          <?php if(isset($electic_bill_avail) && $electic_bill_avail !='' && $electic_bill_avail !='0'){?>
          electic_bill_avail : <?php echo $electic_bill_avail; ?><br>
          <?php } ?>
          <?php if(isset($back_acc) && $back_acc !='' && $back_acc !='0'){?>
          back_acc : <?php echo $back_acc; ?><br>
          <?php } ?>
          <?php if(isset($bank_name) && $bank_name !='' && $bank_name !='0'){?>
          bank_name : <?php echo $bank_name; ?><br>
          <?php } ?>
          <?php if(isset($branch_name) && $branch_name !='' && $branch_name !='0'){?>
          branch_name : <?php echo $branch_name; ?><br>
          <?php } ?>
          <?php if(isset($bank_account_avail) && $bank_account_avail !='' && $bank_account_avail !='0'){?>
          bank_account_avail : <?php echo $bank_account_avail; ?><br>
          <?php } ?>
          <?php if(isset($ifc_code) && $ifc_code !='' && $ifc_code !='0'){?>
          ifc_code : <?php echo $ifc_code; ?><br>
          <?php } ?>
          <?php if(isset($cat_bpl_apl) && $cat_bpl_apl !='' && $cat_bpl_apl !='0'){?>
          cat_bpl_apl : <?php echo $cat_bpl_apl; ?><br>
          <?php } ?>
          <?php if(isset($cat_sc_st) && $cat_sc_st !='' && $cat_sc_st !='0'){?>
          cat_sc_st : <?php echo $cat_sc_st; ?><br>
          <?php } ?>
          <?php if(isset($cat_farmer) && $cat_farmer !='' && $cat_farmer !='0'){?>
          cat_farmer : <?php echo $cat_farmer; ?><br>
          <?php } ?>
          <?php if(isset($handicapped) && $handicapped !='' && $handicapped !='0'){?>
          handicapped : <?php echo $handicapped; ?><br>
          <?php } ?>
          <?php if(isset($landless_labour) && $landless_labour !='' && $landless_labour !='0'){?>
          landless_labour : <?php echo $landless_labour; ?><br>
          <?php } ?>
          <?php if(isset($women_centric_family) && $women_centric_family !='' && $women_centric_family !='0'){?>
          women_centric_family : <?php echo $women_centric_family; ?><br>
          <?php } ?>
          <?php if(isset($open_place_avil_or_not) && $open_place_avil_or_not !='' && $open_place_avil_or_not !='0'){?>
          open_place_avil_or_not : <?php echo $open_place_avil_or_not; ?><br>
          <?php } ?>
          <?php if(isset($toilet_construction) && $toilet_construction !='' && $toilet_construction !='0'){?>
          toilet_construction : <?php echo $toilet_construction; ?><br>
          <?php } ?>
           <?php if(isset($bank_loan) && $bank_loan !='' && $bank_loan !='0'){?>
          bank_loan : <?php echo $bank_loan; ?><br>
          <?php } ?>
          <?php if(isset($material_for_construction) && $material_for_construction !='' && $material_for_construction !='0'){?>
          material_for_construction : <?php echo $material_for_construction; ?><br>
          <?php } ?>
           <?php if(isset($readymade_toilet) && $readymade_toilet !='' && $readymade_toilet !='0'){?>
          readymade_toilet : <?php echo $readymade_toilet; ?><br>
          <?php } ?>
          <?php if(isset($profile_pic) && $profile_pic !='' && $profile_pic !='0'){
          $temp = explode(".", $profile_pic);

            $filename1 = $temp[0]."_thumb.".$temp[1];?>
          <img  src="<?php echo base_url('uploads/'); ?><?php echo $filename1;?>"/>
         
          <?php } ?>


          
         <!--<h4><b>Questions:</b></h4>
          <?php if(!empty($survey)){?>
          
          <div class="panel-body">
                                <div class="table-responsive">
                                    <table class="table table-bordered table-hover table-striped text-center" >
                                        <thead>
                                            <tr>
                                            <th class="text-center" width="10%">Sl.No.</th>
                                           
                                            <th class="text-center">Question</th>
                                            <th class="text-center">Answer</th>
                                          
                                           
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php
                                            $j=1;
                                            foreach ($survey as $values) {?>
                                            
                                            <tr>
                                              <td><?php echo $j;?></td>
                                              
                                             
                                              <td><?php echo $values['questions'];?></td>

                                              <td><?php echo $values['answer'];?><br>
                                                  <?php echo $values['answer_value']; ?>
                                              </td>
                                             
                                            
                                               

                                            </tr>
                                            <?php 
                                            $j++;
                                            }  ?>
                                        </tbody>
                                    </table>
                                </div>
                               
           </div>
           <?php }else{?>
                <div class="panel-body">
                <p>No Questions Found</p>
                </div>
           <?php }?>-->
          
        
        
      </div>
      
     
    
  
      </div>
    
    
  </div>
  </div>
  </div>
  </div>
  </div>

