<?php

include('libraryPHP/site_config.php');

include('libraryPHP/session_check_url.php');

?>



<!DOCTYPE html>

<html lang="en">



<head>

    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">

    <title><?php echo $appName ?> | <?php echo $pageTitle ?></title>

    <?php echo $appFaviconHtml ?>

    <!-- theme css start -->

    <?php include("commoncss.php"); ?>

    <!-- theme css end -->
    <style type="text/css">
  
      
  

table td {
word-wrap: break-word;
word-break: break-all;  
white-space:normal !important;

}
    
 </style>

    <style type="text/css">
        .field-icon {
            float: right;
            margin-left: -18px;
            margin-right: 14px;
            margin-top: -30px;
            position: relative;
            z-index: 2;
        }

        .profile-header img {
            height: auto;
            max-width: 800px;
            width: 100%;
        }

        .open_my_popup {

            display: none;

        }

        .open_my_popup .imgae_view_bg {

            width: 100%;

            height: 100vh;

            background: #000;

            position: fixed;

            top: 0px;

            left: 0px;

            opacity: 0.8;

            z-index: 999;

        }

        .open_my_popup .view_popup {

            width: 96%;

            margin: 0px 2%;

            height: 100vh;

            position: fixed;

            top: 0px;

/*            right: 0px;*/

            z-index: 999;

        }

        .open_my_popup .view_popup img {

            width: 100%;

            height: 119vh;

            object-fit: contain;

            padding-top: 84px;

            padding-bottom: 157px;

        }

        .close_my_popup {

            position: fixed;

            top: 75px;

            right: 10px;

            background: #1b79b8;

            width: 30px;

            height: 30px;

            text-align: center;

            z-index: 99999;

            border-radius: 50%;

        }

        .close_my_popup img {

            width: 15px;

            padding-top: 7px;

        }

        #image-holder{
            height: 300px;
        }

        
    </style>

    <!--     <style>

        .open_my_popup {



            display: none;



        }



        .open_my_popup .imgae_view_bg {



            width: 100%;



            height: 100vh;



            background: #000;



            position: fixed;



            top: 0px;



            left: 0px;



            opacity: 0.8;



            z-index: 999;



        }



        .open_my_popup .view_popup {



            width: 96%;



            margin: 0px 2%;



            height: 100vh;



            position: fixed;



            top: 0px;



            right: 0px;



            z-index: 999;



        }



        .open_my_popup .view_popup img {



            width: 100%;



            height: 119vh;



            object-fit: contain;



            padding-top: 84px;



            padding-bottom: 157px;



        }



        .close_my_popup {



            position: fixed;



            top: 75px;



            right: 10px;



            background: #1b79b8;



            width: 30px;



            height: 30px;



            text-align: center;



            z-index: 99999;



            border-radius: 50%;



        }



        .close_my_popup img {



            width: 15px;



            padding-top: 7px;



        }



        .product-detail .product-img {

            border: 1px solid #eff2f7;

            padding: 24px;

            height: 385px !IMPORTANT;

            margin-top: -23px;

            object-fit: contain !IMPORTANT;

        }

        .profile-header img {
    height: auto;
    max-width: 180px!important;
    width: 120px!important;
    height: 120px!important;
}

    </style>
 -->


</head>



<body>



    <!-- Main Wrapper -->

    <div class="main-wrapper">



        <!-- Header start  -->

        <?php include("header.php"); ?>

        <!-- /Header end -->



        <!-- Sidebar -->

        <?php include("sidebar.php"); ?>

        <!-- /Sidebar -->



        <!-- Page Wrapper -->

        <div class="page-wrapper">



            <div class="content container-fluid">



                <!-- Page Header -->

                <div class="page-header">

                    <div class="row">

                        <div class="col">

                            <h3 class="page-title">View Inspection</h3>

                            <ul class="breadcrumb">

                                <li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li>

                                <li class="breadcrumb-item"><a href="manage_inspection_request.php">Manage Inspection</a></li>

                                <li class="breadcrumb-item active">View Inspection</li>

                            </ul>

                        </div>

                    </div>

                </div>

                <!-- /Page Header -->



                <!-- start write start -->

                <div class="row">



                    <div class="col-md-4">

                        <div class="profile-header">

                            <div class="row align-items-center">

                                <div class="col-auto profile-image">

                                    <div class="product-img">

                                         <div href="#img_view">

                                            <img src="<?php echo $img_url_user_main . $getUsersData['image_html'];

                                                        ?>" class="m-b-md img-fix img-responsive " name="profile_image" id="image-holder" onerror="this.src='assets/images/placeholder.png';" alt="" onclick="view_img(this,'img')" width="150px" height="250px">



                                            <div class="open_my_popup" id="img_view" style="display: none;">

                                                <div class="imgae_view_bg"></div>



                                                <div class="view_popup">

                                                    <img src="<?php echo $img_url_user_main.$getUsersData['image']; 

                                                                                        ?>" id="image_here">

                                                </div>



                                                <a class="close_my_popup" onclick="closePopup();"><img src="assets/images/close.png"></a>



                                            </div>

                                        </div> 

                                    </div>

                                    <!-- <a href="#">

                                        <img class="rounded-circle" alt="User Image" src="assets/images/image5.png">

                                    </a> -->

                                </div>

                                <div class="col ml-md-n2 profile-user-info">

                                    <!-- <h4 class="user-name mb-0"><?php echo $getUsersData['name'] ?></h4> -->

                                    <!-- <h6 class="text-muted"><?php echo $getUsersData['email'] ?></h6> -->

                                    <!-- <div class="user-Location"><i class="fa fa-map-marker"></i> Florida, United States</div> -->

                                    <!-- <div class="about-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div> -->

                                </div>

                                <!-- <div class="col-auto profile-btn">

										

										<a href="" class="btn btn-primary">

											Edit

										</a>

									</div> -->

                            </div>

                        </div>

                    </div>

                    <div class="col-md-8">

                        <div class="card">

                            <div class="card-body">



                                <div class="card  mb-20">

                                    <div class="card-body">

                                         <div class="d-flex justify-content-end">
                                           <!--  <a href="edit_user.php?id=<?php echo $_GET['id']?>" class="btn btn-primary ">Edit User</a>  -->
                                        </div>

                                          <h5>Enginner Details</h5>
                                          <hr>

                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Name : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['userName'] ?>

                                                </p>

                                            </div>

                                        </div>
                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Email : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['userEmail'] ?>

                                                </p>

                                            </div>

                                        </div>

                                       




                                      





 
                                        



                                            <div class="row">

                                                <div class="col-md-6">

                                                    <p class="text-black">Mobile No. : </p>

                                                </div>

                                                <div class="col-md-6">

                                                    <p class="text-black"><?php echo $getUsersData['userMobile'] ?></p>

                                                </div>

                                            </div>


                                              <h5>Inspection Details</h5>
                                          <hr>

                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Equipment Type : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['equipmentTypeName'] ?>

                                                </p>

                                            </div>

                                        </div>


                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Equipment : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['equipment_name'] ?>

                                                </p>

                                            </div>

                                        </div>


                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Inspection Type : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['inspection_type_name'] ?>

                                                </p>

                                            </div>

                                        </div>


                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Inspection Title : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['inspection_title'] ?>

                                                </p>

                                            </div>

                                        </div>


                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Description : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['description'] ?>

                                                </p>

                                            </div>

                                        </div>



                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Inspection Date: </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['inspection_date'] ?>

                                                </p>

                                            </div>

                                        </div>

                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Inspection Due Date: </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['getAllInspectionDueDate'] ?>

                                                </p>

                                            </div>

                                        </div>


                                        <div class="row">

                                            <div class="col-md-6">

                                                <p class="text-black">Create Date & Time : </p>

                                            </div>

                                            <div class="col-md-6">

                                                <p class="text-black"><?php echo $getUsersData['createtime'] ?>

                                                </p>

                                            </div>

                                        </div>

                                         



                                           

                                             

                                             

                                            

                                            


                                            
                                           

                                            

                                            

                                           

                                            
                                            

                                           
                                           

                                          




                                        


                                       



                                    </div>

                                </div>

                            </div>

                        </div>



                    </div>


                    <div class="row">

                        <div class="col-md-12">

                           <div class="profile-header">



                            </div> 

                             <div class="profile-menu">

                                <ul class="nav nav-tabs nav-tabs-solid">

                                    <li class="nav-item">

                                        <a class="nav-link active" data-bs-toggle="tab" id="tickets_details_tab_nav2" href="#tickets_details_tab_nav2">Inspection History</a>

                                    </li>

                                    

                                     <!-- <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav8" href="#tickets_details_tab_nav8">My Group</a>

                                    </li>
                              

                                     <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav7" href="#tickets_details_tab_nav7">Requirements</a>

                                    </li> -->

                                   
                                    <!-- <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav" href="#tickets_details_tab_nav">Share Images</a>

                                    </li>

                                     <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="job_details_tab_nav" href="#job_details_tab_nav">Share Videos</a>

                                    </li>

                                     <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav1" href="#tickets_details_tab_nav1">Question</a>

                                    </li>

                                    <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav3" href="#tickets_details_tab_nav3">Poll</a>

                                    </li>

                                    <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav5" href="#tickets_details_tab_nav5">News & Updates</a>

                                    </li>

                                    <li class="nav-item">

                                        <a class="nav-link " data-bs-toggle="tab" id="tickets_details_tab_nav6" href="#tickets_details_tab_nav6">Knowledge Snippet</a>

                                    </li>
 -->
                                     

                                </ul>

                            </div> 

                            <div class="tab-content profile-tab-cont">
<!-- 
                                <div class="tab-pane " id="job_details_tabactive">

                                    <div class="row">

                                        <div class="col-lg-12">

                                            <div class="card">

                                                <div class="card-body">


                                                    <div class="table-responsive">
                                                        <table id="job_table" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                                    <th>Sr.No</th>
                                                                    <th>Action</th>
                                                                   
                                                            
                                                           <th>Title</th>
                                                            <th>Description</th>
                                                            <th>Link</th>
                                                            <th>Hashtag</th>
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="tab-pane fade show " id="tickets_details_tabactive">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                            <th>S.No.</th>
                                                            <th>Action</th>
                                                            <th>Title</th>
                                                            <th>Description</th>
                                                            <th>Link</th>
                                                            <th>Hashtag</th>
                                                            
                                                            
                                                            <th>Create Date & Time</th> 
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                  <div class="tab-pane fade show " id="tickets_details_tabactive1">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service1" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                           <th>S.No.</th>

                                           

                                            

                                           
                                            <th>Question title</th>
                                            <th>Description</th>
                                            <th>Live for Days</th>
                                            <th>Hashtags</th>
                                           
                                            
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div> -->

<!-- /// -->
                                  <div class="tab-pane fade show " id="tickets_details_tabactive2">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service2" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                    <th>S.No.</th>
                                                    <th>Title</th>
                                                    <th>Inspection Type</th>
                                                    <th>Inspection Date</th>
                                                    <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
<!-- /// -->

                                  <!-- <div class="tab-pane fade show" id="tickets_details_tabactive3">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service4" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                           <th>S.No.</th>

                                                      
                                                  
                                            
                                                   <th>Question</th>

                                           
                                            <th>Description</th>
                                            <th>Options</th>
                                           
                                            <th>Poll ends in</th>
                                           
                                           
                                            
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>



                                  <div class="tab-pane fade show" id="tickets_details_tabactive5">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service5" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                           <th>S.No.</th>

                                                      
                                                  
                                                  <th>Action</th>
                                                   <th>Title</th>
                                           
                                            <th>Description</th>
                                           
                                            <th>Link</th>
                                            <th>Hashtag</th>
                                           
                                           
                                            
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                 <div class="tab-pane fade show" id="tickets_details_tabactive6">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service6" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                           <th>S.No.</th>

                                                      
                                                  
                                                  <th>Action</th>
                                                   <th>Title</th>
                                           
                                            <th>Description</th>
                                           
                                            <th>Link</th>
                                            <th>Hashtag</th>
                                           
                                           
                                            
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="tab-pane fade show" id="tickets_details_tabactive7">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service7" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                           <th>S.No.</th>

                                                      
                                                  
                                                  <th>Action</th>
                                                   <th>Title</th>
                                           
                                            <th>Description</th>
                                           
                                            <th>Products</th>
                                            <th>Tags</th>
                                           
                                           
                                            
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>



                                    <div class="tab-pane fade show" id="tickets_details_tabactive8">
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="card">
                                                <div class="card-body">
                                                    <div class="table-responsive">
                                                        <table id="table_service8" class="table table-hover table-bordered" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                                            <thead>
                                                                <tr>
                                                           <th>S.No.</th>

                                                      
                                                  
                                                  <th>Action</th>
                                                   <th>Image</th>
                                                   <th>Group Title</th>
                                                   <th>Group Type</th>
                                           
                                            <th>Description</th>
                                           
                                            
                                         
                                           
                                           
                                            
                                           
                                            <th>Create Date & Time</th>
                                                                </tr>
                                                            </thead>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div> -->





                            </div> 

                        </div>

                    </div>






                </div>



                <!-- start write end -->

            </div>

        </div>

        <!-- /Page Wrapper -->

        <!-- footer start -->

        <?php include("footer.php"); ?>

        <!-- footer end -->



    </div>

    <!-- /Main Wrapper -->



    <!-- sctipt start  -->




    <?php include('commonjs.php') ?>

    <?php include_once('extrajs.php') ?>
    <script>
        $('#tickets_details_tabactive2').show();
        // $('#job_details_tabactive').show();
        // $("#tickets_details_tabactive").hide();
        //  $("#tickets_details_tabactive1").hide();
        //  $("#job_details_tabactive").hide();
        //   $("#tickets_details_tabactive5").hide();
        //    $("#tickets_details_tabactive6").hide();
        //    $("#tickets_details_tabactive7").hide();
        //    $("#tickets_details_tabactive8").hide();


        $(document).ready(function() {
            // $("#job_details_tab_nav").click(function() {
            //     $('#job_details_tabactive').show();
            //     $("#tickets_details_tabactive").hide();
            //       $("#tickets_details_tabactive1").hide();
            //       $("#tickets_details_tabactive2").hide();
            //       $("#tickets_details_tabactive3").hide();
            //        $("#tickets_details_tabactive5").hide();
            //         $("#tickets_details_tabactive6").hide();
            //         $("#tickets_details_tabactive7").hide();
            //         $("#tickets_details_tabactive8").hide();
                 
            // });

            // $("#tickets_details_tab_nav").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").show();
            //       $("#tickets_details_tabactive1").hide();
            //       $("#tickets_details_tabactive2").hide();
            //        $("#tickets_details_tabactive3").hide();
            //         $("#tickets_details_tabactive5").hide();
            //          $("#tickets_details_tabactive6").hide();
            //          $("#tickets_details_tabactive7").hide();
            //          $("#tickets_details_tabactive8").hide();
            // });

            // $("#tickets_details_tab_nav1").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").hide();
            //     $("#tickets_details_tabactive1").show();
            //     $("#tickets_details_tabactive2").hide();
            //      $("#tickets_details_tabactive3").hide();
            //       $("#tickets_details_tabactive5").hide();
            //        $("#tickets_details_tabactive6").hide();
            //        $("#tickets_details_tabactive7").hide();
            //        $("#tickets_details_tabactive8").hide();
            // });
            $("#tickets_details_tab_nav2").click(function() {
                // $('#job_details_tabactive').hide();
                // $("#tickets_details_tabactive").hide();
                // $("#tickets_details_tabactive1").hide();
                $("#tickets_details_tabactive2").show();
                 // $("#tickets_details_tabactive3").hide();
                 //  $("#tickets_details_tabactive5").hide();
                 //   $("#tickets_details_tabactive6").hide();
                 //   $("#tickets_details_tabactive7").hide();
                 //   $("#tickets_details_tabactive8").hide();
            });

            // $("#tickets_details_tab_nav3").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").hide();
            //     $("#tickets_details_tabactive1").hide();
            //     $("#tickets_details_tabactive2").hide();
            //      $("#tickets_details_tabactive3").show();
            //       $("#tickets_details_tabactive5").hide();
            //        $("#tickets_details_tabactive6").hide();
            //        $("#tickets_details_tabactive7").hide();
            //        $("#tickets_details_tabactive8").hide();
            // });

            // $("#tickets_details_tab_nav5").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").hide();
            //     $("#tickets_details_tabactive1").hide();
            //     $("#tickets_details_tabactive2").hide();
            //      $("#tickets_details_tabactive3").hide();
            //      $("#tickets_details_tabactive5").show();
            //      $("#tickets_details_tabactive6").hide();
            //      $("#tickets_details_tabactive7").hide();
            //      $("#tickets_details_tabactive8").hide();
            // });
            // $("#tickets_details_tab_nav6").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").hide();
            //     $("#tickets_details_tabactive1").hide();
            //     $("#tickets_details_tabactive2").hide();
            //      $("#tickets_details_tabactive3").hide();
            //      $("#tickets_details_tabactive5").hide();
            //      $("#tickets_details_tabactive6").show();
            //      $("#tickets_details_tabactive7").hide();
            //      $("#tickets_details_tabactive8").hide();
            // });

            // $("#tickets_details_tab_nav7").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").hide();
            //     $("#tickets_details_tabactive1").hide();
            //     $("#tickets_details_tabactive2").hide();
            //      $("#tickets_details_tabactive3").hide();
            //      $("#tickets_details_tabactive5").hide();
            //      $("#tickets_details_tabactive6").hide();
            //      $("#tickets_details_tabactive7").show();
            //      $("#tickets_details_tabactive8").hide();
            // });

            //  $("#tickets_details_tab_nav8").click(function() {
            //     $('#job_details_tabactive').hide();
            //     $("#tickets_details_tabactive").hide();
            //     $("#tickets_details_tabactive1").hide();
            //     $("#tickets_details_tabactive2").hide();
            //      $("#tickets_details_tabactive3").hide();
            //      $("#tickets_details_tabactive5").hide();
            //      $("#tickets_details_tabactive6").hide();
            //      $("#tickets_details_tabactive7").hide();
            //      $("#tickets_details_tabactive8").show();
            // });

        });



        var table = '';
        $(document).ready(function() {

            // $('#job_table').DataTable();
            // getUserTable('first', 'all');

            // $('#table_service').DataTable();
            // getServiceTable('first', 'all');

            //  $('#table_service1').DataTable();
            // getServiceTable1('first', 'all');

             $('#table_service2').DataTable();
            getServiceTable2('first', 'all');


 // $('#table_service4').DataTable();
 //            getServiceTable4('first', 'all');


 //            $('#table_service5').DataTable();
 //            getServiceTable5('first', 'all');

 //             $('#table_service6').DataTable();
 //            getServiceTable6('first', 'all');

 //             $('#table_service7').DataTable();
 //            getServiceTable7('first', 'all');

 //             $('#table_service8').DataTable();
 //            getServiceTable8('first', 'all');





        });



        //  var table = '';
        //   $(document).ready(function() {

        //    $('#job_table').DataTable();
        //   getUserTable('first', 'all');




        // });
    </script>

    <script>
        function getUserTable(event, type) {
            if (event != 'first') {
                $('.view_class').removeClass('active').prop('disabled', false);
                $(event).addClass('active').prop('disabled', true);
            }

            var user_id = "<?php echo $_GET['id'] ?>";

            var link = URLAPI + 'manage_all_controller.php';

            var data = {
                action: 'get_user_share_video',
                type: type,
                user_id: user_id,


            }

            var messsage = msgLoading.blankMessage[language];
            console.log('messsage', messsage);

            apiRequest.get(link, data, messsage).then(function(obj) {
                console.log('obj', obj);
                if (obj.success === true) {
                    var user_arr = obj.data.user_arr;
                    if (user_arr.length >= 0) {
                        //table.destroy();
                        //$('#table_users').empty();
                        $('#job_table').DataTable({
                            data: user_arr,
                            "destroy": true,
                            "paging": true,
                            "lengthChange": true,
                            "searching": true,
                            "ordering": true,
                            "info": true,
                            "autoWidth": false,
                            "responsive": true,
                            "aaSorting": [
                                [0, "asc"]
                            ],
                            "bJQueryUI": "true",
                            "sPaginationType": "full_numbers",
                            "iDisplayLength": 5,
                            "aLengthMenu": [
                                [5, 10, 25, 50, 100, 200, -1],
                                [5, 10, 25, 50, 100, 200, "All"]
                            ],
                            "columns": [ 
                                {
                                    "data": "srno"
                                },
                                 {
                                     "data": "action"
                             },
                            
                                {
                                    "data": "title"
                                },
                                {
                                    "data": "description"
                                },

                                {
                                    "data": "links"
                                },
                                {
                                    "data": "hastags"
                                },
                                    
                                                             
                                
                                 {
                                     "data": "createtime"
                                 },             


                            ],
                            "rowId": "",
                        });
                    } else {
                        dataTable.fnClearTable();
                        dataTable.fnDraw();
                        dataTable.fnDestroy();
                    }
                } else {

                    //------------ Operation Message --------------------
                    var title = msgTitleOperation.blankMessage[language];
                    var messsage = obj.msg[language];
                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');
                    //------------ Operation Message End--------------------
                    return false;
                }
            }, function(err) {
                console.log('err', err);

                //------------ Operation Message --------------------
                var title = msgTitleOperation.errorOnServer[language];
                var messsage = msgOperations.errorOnServer[language];
                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');
                //------------ Operation Message End--------------------
                return false;
            });
        }

        function getServiceTable(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_user_share_image',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.user_arr;
                    // if(project_arr.length>0){
                    $('#table_service').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                                 {
                                     "data": "action"
                             },
                                {
                                    "data": "title"
                                },
                                {
                                    "data": "description"
                                },

                                {
                                    "data": "links"
                                },
                                {
                                    "data": "hastags"
                                },
                                    
                                                             
                                
                                 {
                                     "data": "createtime"
                                 },             


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }

        function getServiceTable1(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_user_question',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.user_arr;
                    // if(project_arr.length>0){
                    $('#table_service1').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                                { "data": "question_title"},
                          
                           
                            { "data": "description" },
                            { "data": "live_for_days" },
                            

                            { "data": "hastags" },
                           
                          
                          
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }

         function getServiceTable2(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_inspection_history',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.user_arr;
                    // if(project_arr.length>0){
                    $('#table_service2').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                            { "data": "srno"},
                            {"data": "inspection_title" },
                            { "data": "inspection_type_name" },
                            { "data": "inspection_date" },
                            // { "data": "date" },
                            // { "data": "time" },
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }


          function getServiceTable4(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_poll_user',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.user_arr;
                    // if(project_arr.length>0){
                    $('#table_service4').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columnDefs": [
    { "width": "30%", "targets": 3 },
  ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                               
                               
                          
                           
                            { "data": "question" },
                            { "data": "description" },
                            { "data": "option_html" },

                            { "data": "poll_end_in" },
                           
                           
                            
                          
                          
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }

         function getServiceTable5(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_news_updates_user',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.sub_arr;
                    // if(project_arr.length>0){
                    $('#table_service5').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                               
                               
                          
                           
                            { "data": "action" },
                            { "data": "title" },
                            { "data": "description" },
                            { "data": "link" },
                            { "data": "hastags" },
                           
                           
                            
                          
                          
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }


        function getServiceTable6(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_knowledge_snippet_user',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.sub_arr;
                    // if(project_arr.length>0){
                    $('#table_service6').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                               
                               
                          
                           
                            { "data": "action" },
                            { "data": "title" },
                            { "data": "description" },
                            { "data": "link" },
                            { "data": "hastags" },
                           
                           
                            
                          
                          
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }

        function getServiceTable7(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_requirement_user',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.sub_arr;
                    // if(project_arr.length>0){
                    $('#table_service7').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                               
                               
                          
                           
                            { "data": "action" },
                            { "data": "title" },
                            { "data": "description" },
                            { "data": "productname" },
                            { "data": "hastags" },
                           
                           
                            
                          
                          
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }


         function getServiceTable8(event, type) {



            if (event != 'first') {

                $('.view_class').removeClass('active').prop('disabled', false);

                $(event).addClass('active').prop('disabled', true);

            }


            var user_id = "<?php echo $_GET['id'] ?>";
            var link = URLAPI + 'manage_all_controller.php';
            var data = {

                action: 'get_business_group',
                type: type,
                user_id: user_id,



            }
            var messsage = '';

            //console.log('messsage',messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {

                console.log('obj', obj);

                if (obj.success === true) {
                    var item_arr = obj.data.sub_arr;
                    // if(project_arr.length>0){
                    $('#table_service8').DataTable({
                        data: item_arr,
                        "destroy": true,
                        "aaSorting": [
                            [0, "asc"]
                        ],
                        "autoWidth": false,
                        "bJQueryUI": "true",
                        "sPaginationType": "full_numbers",
                        "iDisplayLength": 5,
                        "aLengthMenu": [
                            [5, 10, 25, 50, 100, 200, -1],
                            [5, 10, 25, 50, 100, 200, "All"]
                        ],
                        "columns": [ 
                                {
                                    "data": "srno"
                                },
                               
                               
                          
                           
                            { "data": "action" },
                            { "data": "image" },
                            { "data": "group_title" },
                            { "data": "group_type_text" },
                            { "data": "description" },
                          
                           
                           
                            
                          
                          
                            { "data": "createtime" },    


                        ],

                        "rowId": "",
                        dom: 'Blfrtip',
                        buttons: [
                            'csv', 'pdf', 'print'
                        ]

                    });

                    // }

                } else {

                    //------------ Operation Message --------------------

                    var title = msgTitleOperation.CategoryDeleted[language];

                    var messsage = obj.msg[language];

                    msgSuccessErrorHtml.error(title, messsage, '#msgSuccessErrorHtml');

                    //------------ Operation Message End--------------------

                    return false;

                }

            }, function(err) {

                console.log('err', err);

                //alert('Server not responde');
                //------------ Operation Message --------------------

                var title = msgTitleOperation.errorOnServer[language];

                var messsage = msgOperations.errorOnServer[language];

                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');

                //------------ Operation Message End--------------------

                return false;
            });

        }











        function btnUserApproveConfirm(event) {
            var user_id = $(event).attr('data-id');
            swal({
                    // title: msgConfim.msgConfimTitle[language],
                    text: msgConfim.userApprove[language],
                    icon: "warning", //error, success, info
                    buttons: ["Cancel", "Ok"],
                })
                .then((willDelete) => {
                    if (willDelete) {
                        btnUserDeleteContinue1(event, user_id);
                    } else {
                        //swal("Your imaginary file is safe!");
                    }
                });
        }
        // function end For User faq delete confirm

        // If select delete confirm
        function btnUserDeleteContinue1(event, user_id) {
            var link = URLAPI + 'manage_all_controller.php';

            var data = {
                action: 'approve_status',
                user_id: user_id,

            }
            var messsage = msgLoading.blankMessage[language];
            console.log('messsage', messsage);
            apiRequest.get(link, data, messsage).then(function(obj) {
                console.log('obj', obj);
                if (obj.success === true) {
                    //------------ Operation Message --------------------
                    var title = msgTitleOperation.blankMessage[language];
                    var messsage = obj.msg[language];


                    swal({
                        title: title,
                        text: messsage,
                        icon: "success", //error, success, info
                        button: "Ok",
                    }).then((value) => {
                        getUserTable('first', 'all');
                    });

                    // //-------------- DataTable Row Action -----------------
                    // $('#store_table').dataTable().fnUpdate(obj.data.active_flag_html , $('tr#'+user_id),6, false);
                    // $('#store_table').dataTable().fnUpdate(obj.data.action_html , $('tr#'+user_id),1, false);
                    return false;
                } else {
                    var title = msgTitleOperation.errorOnServer[language];
                    //var messsage = msgOperations.errorOnServer[language];
                    var messsage = obj.msg[language];
                    msgSuccessErrorHtml.error(title, messsage, msgSuccessErrorHtmlSelector);
                    swal({
                        title: title,
                        text: messsage,
                        icon: "error", //error, success, info
                        button: "Ok",
                    }).then((value) => {
                        window.location.href = "#";
                    });
                    //------------ Operation Message End--------------------
                    return false;
                }
            }, function(err) {
                console.log('err', err);
                //alert('Server not responde');
                //------------ Operation Message --------------------
                var title = msgTitleOperation.errorOnServer[language];
                var messsage = msgOperations.errorOnServer[language];
                msgSuccessErrorHtml.warning(title, messsage, '#msgSuccessErrorHtml');
                //------------ Operation Message End--------------------
                return false;
            });
        }

        function btnUserActivateDeactivateConfirm(event) {

            var user_id = $(event).attr('data-id');

            var status = $(event).attr('data-user-status');
            console.log('status', status);
            if (status == '1') {
                var text = msgConfim.userActivated[language];
            } else {
                var text = msgConfim.userDeactivated[language];

            }

            swal({
                    title: '',
                    text: text,
                    icon: "warning", //error, success, info
                    buttons: ["Cancel", "Ok"],
                })
                .then((willDelete) => {
                    if (willDelete) {
                        btnUserActivateDeactivateContinue(event, user_id, status);
                    } else {
                        //swal("Your imaginary file is safe!");
                    }
                });
        }

        function btnUserActivateDeactivateContinue(event, user_id, active_flag) {
            //   alert(active_flag);
            var link = URLAPI + 'user_controller.php';
            var data = {
                action: 'activate_deactivate_bussiness',
                user_id: user_id,
                active_flag: active_flag,
            }

            var messsage = msgLoading.blankMessage[language];
            console.log('messsage', messsage);

            apiRequest.get(link, data, messsage).then(function(obj) {
                console.log('obj', obj);
                if (obj.success === true) {


                    //------------ Operation Message --------------------
                    if (active_flag == '0') {
                        var title = msgTitleOperation.blankMessage[language];
                    } else {
                        var title = msgTitleOperation.blankMessage[language];
                    }
                    var messsage = obj.msg[language];
                    msgSuccessErrorHtml.success(title, messsage, msgSuccessErrorHtmlSelector);
                    //------------ Operation Message End--------------------
                    swal({
                        title: title,
                        text: messsage,
                        icon: "success", //error, success, info
                        button: "Ok",
                    }).then((value) => {
                        getUserTable('first', 'all');
                    });

                    // //-------------- DataTable Row Action -----------------
                    // $('#user_table').dataTable().fnUpdate(obj.data.active_flag_html , $('tr#'+user_id),9, false);
                    // $('#user_table').dataTable().fnUpdate(obj.data.action_html , $('tr#'+user_id),1, false);
                    //-------------- DataTable Row Action end -----------------

                    return false;

                } else {
                    //------------ Operation Message --------------------
                    var title = msgTitleOperation.blankMessage[language];
                    var messsage = obj.msg[language];
                    msgSuccessErrorHtml.error(title, messsage, msgSuccessErrorHtmlSelector);
                    swal({
                        title: title,
                        text: messsage,
                        icon: "error", //error, success, info
                        button: "Ok",
                    }).then((value) => {
                        window.location.href = "#";
                    });
                    //------------ Operation Message End--------------------
                    return false;
                }
            }, function(err) {
                console.log('err', err);
                //alert('Server not responde');

                //------------ Operation Message --------------------
                var title = msgTitleOperation.errorOnServer[language];
                var messsage = msgOperations.errorOnServer[language];
                msgSuccessErrorHtml.error(title, messsage, msgSuccessErrorHtmlSelector);
                swal({
                    title: title,
                    text: messsage,
                    icon: "error", //error, success, info
                    button: "Ok",
                }).then((value) => {
                    window.location.href = "#";
                });
                //------------ Operation Message End--------------------
                return false;
            });
        }

        function btnUserDeleteConfirm(event){
            var trip_id = $(event).attr('data-id');
            swal({
              title: '',
              text: 'Are you sure want to delete  proposed trip?',
              icon: "warning", //error, success, info
              buttons:  ["Cancel", "Ok"],
              //dangerMode: true,
            })
            .then((willDelete) => {
              if (willDelete) {
                btnUserDeleteContinue(event, trip_id);
              } else {
                //swal("Your imaginary file is safe!");
              }
            });
        }
     function btnUserDeleteContinue(event, trip_id){
    
        var link = URLAPI+'manage_all_controller.php';
        var data = {
            action:'delete_proposed_trip',
            trip_id:trip_id,
        }
    
        var messsage = msgLoading.blankMessage[language];
        console.log('messsage',messsage);
        
        apiRequest.get(link, data, messsage).then(function(obj){
            console.log('obj',obj);
            if(obj.success === true) { 
            var title = '';
           
            var messsage = obj.msg[language];
            swal_alert(title,messsage,"#","success");
           getUserTable('first', 'all');
     
            //-------------- DataTable Row Action end ---------
            return false;
                
    
            } else {
                //------------ Operation Message --------------------
                var title = msgTitleOperation.userDeleted[language];
                var messsage = obj.msg[language];
                msgSuccessErrorHtml.error(title, messsage, msgSuccessErrorHtmlSelector);
                //------------ Operation Message End--------------------
                return false;
            }
        },function(err){
            console.log('err',err); 
            //alert('Server not responde');
    
            //------------ Operation Message --------------------
            var title = msgTitleOperation.errorOnServer[language];
            var messsage = msgOperations.errorOnServer[language];
            msgSuccessErrorHtml.warning(title, messsage, msgSuccessErrorHtmlSelector);
            //------------ Operation Message End--------------------
            return false;      
        });
    }
      
    </script>




</body>



</html>