<div class="col-md-12">
                              <div class="card border-0  shadow mb-4">
                                 <div class="card-header bg-white border-bottom py-3">
                                    <h6 class="m-0 fw-bold text-inherit">Merchant data</h6>
                                 </div>
                                 <div class="card-body">
                                  
                                       <div class="table-responsive ">
                                          <table class="table" id="company_wise">
                                             <thead class="table-light-success">
                                                <tr class="merchant">
                                                   <th class="merchant1" scope="col">Id</th>
                                                   <th class="merchant1" scope="col">User Name</th>
                                                   <th class="merchant1" scope="col">Company Name</th>
                                                   <th class="merchant1" scope="col">Email</th>
                                                   <th class="merchant1" scope="col">Website</th>
                                                   <th class="merchant1" scope="col">Address</th>
                                                   <th class="merchant1" scope="col">Mobile No</th>
                                                   <th class="merchant1" scope="col">Date</th>
                                                   <th class="merchant1" scope="col">Country</th>
                                                   <th scope="col">Status</th>
                                                </tr>
                                             </thead>
                                             <tbody>
                                                <?php  $sql = "SELECT * FROM vendor_master";
    
      $myquery=$conn->query($sql);
   $mydara= $myquery->fetchAll()  ;
   
   $rows_found = $myquery->rowCount();

      foreach( $mydara as $row ) {
            $userId     = $row['rowId'];
            $first_name = $row['full_name'];
            $email_id   = $row['emailid'];
            $mobile_no  = $row['mobileno'];
            $phone   = $row['phone'];
            $company_name  = $row['company_name'];
            $location_country = $row['location_country'];
            $comp_add   = $row['comp_add'];
            $web_add = $row['web_add'];
            $datecreated   = $row['datecreated'];
            $gender  = $row['gender'];
            $profile_pic   = $row['profile_pic'];
            $activestatus  = $row['activestatus']; 
            if($activestatus=='1'){
                $status= '<a href="javascript:void(0);" onclick="takeactionpage_disapproved('.$userId.',0);" class="btn btn-primary btn-sm">Approved</a>';
               
            }
            if($activestatus=='0'){
                $status= '<a href="javascript:void(0);" onclick="takeactionpage('.$userId.',1);" class="btn btn-danger btn-sm">Disapproved</a>';
            }
            
            echo' <tr class="merchant">
      <th class="merchant2">'.$userId  .'</th>
      <td class="merchant2">'.$first_name.'</td>
      <td class="merchant2">'.$company_name.'</td>
      <td class="merchant2">'.$email_id.'</td>
      <td class="merchant2">'.$web_add.'</td>
      <td class="merchant2">'.$comp_add.'</td>
      <td class="merchant2">'.$mobile_no.'</td>
      <td class="merchant2">'.$datecreated.'</td>
      <td class="merchant2"> '.$location_country.'</td>
      <td>'.$status.'</td>
    </tr>';
      }



?>
   
                                                
                                             </tbody>
                                          </table>
                                       </div>
                                       <div class="download-buttons text-center p-1">
                           <button onClick="tableToCSV1()" type="button" class="btn btn-primary bg-success fs-12"><i class="fa fa-refresh me-1" aria-hidden="true"></i> Download
                           CSV</button>
                        </div>
                                       <!--Important message Begin-->
                                       <div class="col-md-12">
                                          <div class="alert alert-primary fs-14 mt-2" role="alert">
                                             <strong>Important message:</strong>  This is a local partner vendor details you can approved and disapproved your end. Read <a href="https://www.icouponworld.com/documentation/local-merchant.html">our documentation</a>.
                                          </div>
                                       </div>
                                       <!--Important message End-->
                                       
                                   
                                 </div>
                              </div>
                           </div>
                           <div class="col-md-12">
                              <div class="card border-0  shadow mb-4">
                                 <div class="card-header bg-white border-bottom py-3">
                                    <h6 class="m-0 fw-bold text-inherit">User data</h6>
                                 </div>
                                 <div class="card-body">
                                   
                                       <div class="table-responsive">
                                          <table class="table" id="merchant">
                                             <thead class="table-light-success">
                                                <tr class="user">
                                                   <th class="user1" scope="col">Id</th>
                                                   <th class="user1" scope="col">User Name</th>
                                                   <th class="user1" scope="col">Company Name</th>
                                                   <th class="user1" scope="col">Email</th>
                                                   <th class="user1" scope="col">Website</th>
                                                   <th class="user1" scope="col">Address</th>
                                                   <th class="user1" scope="col">Mobile No</th>
                                                   <th class="user1" scope="col">Date</th>
                                                  
                                                   
                                                </tr>
                                             </thead>
                                             <tbody>
                                                <?php  $sql = "SELECT * FROM user_master";
    
      $myquery=$conn->query($sql);
   $mydara= $myquery->fetchAll()  ;
   
   $rows_found = $myquery->rowCount();

      foreach( $mydara as $row ) {
            $userId     = $row['rowId'];
            $first_name = $row['full_name'];
            $email_id   = $row['emailid'];
            $mobile_no  = $row['phone'];
            $phone   = $row['phone'];
            $company_name  = $row['company_name'];
            $location_country = $row['location_country'];
            $comp_add   = $row['company_address'];
            $web_add = $row['website_name'];
            $datecreated   = $row['datecreated'];
            $gender  = $row['gender'];
            $profile_pic   = $row['profile_pic'];
           
           
            
            echo' <tr class="user">
      <th class="user2">'.$userId  .'</th>
      <td class="user2">'.$first_name.'</td>
      <td class="user2">'.$company_name.'</td>
      <td class="user2">'.$email_id.'</td>
      <td class="user2">'. $web_add.'</td>
      <td class="user2">'.$comp_add.'</td>
      <td class="user2">'.$mobile_no.'</td>
      <td class="user2">'.$datecreated.'</td>
     
     
    </tr>';
      }



?>
   
                                                
                                             </tbody>
                                          </table>
                                       </div>
                                       <div class="download-buttons text-center p-1">
                           <button onClick="tableToCSV()" type="button" class="btn btn-primary bg-success fs-12"><i class="fa fa-refresh me-1" aria-hidden="true"></i> Download
                           CSV</button>
                        </div>
                                 </div>
                              </div>
                           </div>


                              <script>
                                
        function takeactionpage(user,status){
            swal({
  title: "Are you sure?",
  text: "If you approve the local vendor, then the vendor will be able to upload the coupon!",
  icon: "warning",
  buttons: true,
  dangerMode: true,
})
.then((willDelete) => {
  if (willDelete) {
    swal("Poof! now vendor is approved!", {
      icon: "success",
    });
    
    window.location = "./backend/vendor_status.php?v_id="+user+"&status="+status;

  } else {
    swal("vendor status disapproved!");
  }
});
}
             
       
             
            
         </script>

           <script>
        function takeactionpage_disapproved(user,status){
            swal({
  title: "Are you sure?",
  text: "If you approve the local vendor, then the vendor will not be able to upload the coupon!",
  icon: "warning",
  buttons: true,
  dangerMode: true,
})
.then((willDelete) => {
  if (willDelete) {
    swal("Poof! now vendor is disapproved!", {
      icon: "success",
    });
    
    window.location = "./backend/vendor_status.php?v_id="+user+"&status="+status;

  } else {
    swal("vendor status disapproved!");
  }
});
}
             
      
             
            
         </script>
       