ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/y1jobportal.in/admin/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/y1jobportal.in/admin/customers.php

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

<?php

$staff='';
if($_SESSION['y1_jobs']['role_json']==2){
    $staff=true;
}

?>
<div class="page-wrapper">
	<div class="page-content">
	   <div class=" card card-body">
	       <div class="tab-content ">
<!--new order start-->
    <div class="tab-pane fade show active" id="new" role="tabpanel">
      
<a  href="add-customers.php" class="btn btn-success btn-sm" style="float: right;"><i class="fa fa-plus-circle"></i> Add Employee</a>

<b style="font-size:14px;">Employee Details <?=$_SESSION['y1_jobs']['id']?> </b>
                    





<div class="row" style="margin: 10px 0px 10px 0px;" id="filter">
    
    <div class="col-sm-3">
        <div class="form-group">
            <label class="control-label" for="Process_status">Current Process</label>
            <select name="Process_status" class="form-control select2" style="width:100%" id="Process_status">
                <option value="all">ALL</option>
                <option value="1">Mobile No</option>
                <option value="2">Personal Information</option>
                <option value="3">Category</option>
                <option value="4">Payment</option>
                
            </select>
        </div>
    </div>
    
    
    <div class="col-12 col-lg-3">
    	<label for="Address" class="form-label required">Category</label>
    	<select name="category_id" id="category_id" class="form-select select2" style="font-size: 12px;" required>
			<option value="">All Category</option>
                <?php 
                    $statement = $pdo->prepare("SELECT * FROM `category` WHERE status=1");
                    $statement->execute();
                    $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); 
                    foreach ($resultss as $result) { 
                ?>
                        <option  value="<?=$result['id']?>"><?=$result['name']?></option>
                <?php } ?>
		</select>
	</div>
	<div class="col-12 col-lg-3">
    	<label for="Address" class="form-label required">Subcategory</label>
    	<select name="subcategory" id="subcategory" class="form-select select2" style="font-size: 12px;" required>
			<option value="">Select Subcategory</option>
                
		</select>
	</div>
    <div class="col-12 col-lg-3">
    	<label for="Address" class="form-label required">State</label>
    	<select  name="state_id" id="state_id" class="form-select select2" style="font-size: 12px;" required>
			<option value="">All State</option>
                <?php 
                    $statement = $pdo->prepare("SELECT * FROM `state` WHERE status=1");
                    $statement->execute();
                    $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); 
                    foreach ($resultss as $result) { 
                ?>
                        <option  value="<?=$result['id']?>"><?=$result['state_name']?></option>
                <?php } ?>
		</select>
	</div>
	<div class="col-12 col-lg-3">
    	<label for="Address" class="form-label required">District</label>
    	<select name="district_id" id="district_id" class="form-select select2" style="font-size: 12px;" required>
               
		</select>
	</div>
	<div class="col-12 col-lg-3">
    	<label for="Address" class="form-label required">From Date</label>
    	<input type="date" name="cusfrom_date" id="cusfrom_date" class="form-control" value="<?=date('Y-m-d')?>">
	</div>
	<div class="col-12 col-lg-3">
    	<label for="Address" class="form-label required">To Date</label>
    	<input type="date" name="custo_date" id="custo_date" class="form-control" value="<?=date('Y-m-d')?>">
	</div>

</div>

<div class="row" style="margin:10px 0px 10px 0px;" >
    
</div>
	    <table id="customer" style="width: 100%;" class="dataTable no-footer" role="grid" aria-describedby="DataTable_info">
	        <thead>
	            <tr>
	                <th>Action</th>
	                <th>S.No</th>
    	            <th>Employee Name</th>
    	            <th> Contact </th>
    	            <th> Email </th>
    	            <th>Category</th>
    	            <th>SubCategory</th>
    	            <th>State</th>
    	            <th>district</th>
    	            <th>Process&nbsp;Status</th>
    	            <th>Status</th>
    	        </tr>
	        </thead>
	    </table>

	    
	    
	</div>
<!--new order end-->
			</div>
	    </div>
	</div>
</div>

<style>
    table{ width:100%;font-size:14px;font-family: SFProDisplay-Semibold;}
    th{padding:10px;font-weight:bold;}
    td{padding:7px;}
    tr{margin:5px;}
   thead,tr{
        border: 0 solid transparent;
        margin-bottom: 1.5rem;
        border-radius:5px;
        box-shadow: 0 2px 6px 0 rgb(218 218 253 / 65%), 0 2px 6px 0 rgb(206 206 238 / 54%);
   }.span-success{
        background: #819558;
        color: white;
        padding: 3px 6px 3px 6px;
        border-radius: 15px;
   }
   

   .breadcrumb-title {
    font-size: 20px;
    border-right: 0px solid #ffffff !important;
}
</style>

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



	    <script type="text/javascript">
$(document).ready(function() {
    var start = moment().subtract(0, 'days');
    var end = moment();

    function cb(start, end) {
        $('#reportrange span').html(start.format('D-M-Y') + ' to ' + end.format('D-M-Y'));
        //if(text==''){text='Today';}
        //$('#reportrange span').html(text);
    }

    $('#reportrange').daterangepicker({
        startDate: start,
        endDate: end,
        ranges: {
           'Today': [moment(), moment()],
           'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
           'Last 7 Days': [moment().subtract(6, 'days'), moment()],
           'Last 30 Days': [moment().subtract(29, 'days'), moment()],
           'This Month': [moment().startOf('month'), moment().endOf('month')],
           'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
           'Last 6 Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(6, 'month').endOf('month')]
        }
    }, cb);

    cb(start, end);

});



</script>
<script>
$(document).ready(function() {
    
    	$('#Process_status,#district_id,#state_id,#category_id,#subcategory').change(function() {
            getData();
    });
    
    getData();
		     function getData(){
		         
		         var Process_status = $('#Process_status').val();
		         var district_id = $('#district_id').val();
		         var state_id = $('#state_id').val();
		         var category_id = $('#category_id').val();
		         var subcategory = $('#subcategory').val();
		        
		         
				var dataTable = $('#customer').DataTable( {									     
					"processing": true,
					"order":[[0,'asc']],
					"serverSide": true,
					"lengthMenu": [[5,10, 25, 50, 100], [5,10, 25, 50, 100]],
                    "destroy":true,
                    //  columnDefs: [
                    //              {
                    //                  targets: [0], // The index of the column you want to hide
                    //                  visible: false // Set to false to hide the column
                    //              }
                    //          ],
                    "ajax":{
						url :"data-tables/customer-dt.php", // json datasource
						data: {Process_status:Process_status,district_id:district_id,state_id:state_id,category_id:category_id,subcategory:subcategory},
						type: "post",  // method  , by default get
						error: function(){  // error handling
							$(".example-error").html("");
							$("#customer").append('<tbody class="example-error"><tr><th colspan="8" style="text-align:center;"><img src="assets/img/icon/no_orders_found.webp" style="width:200px;"><br>No data Found</th></tr></tbody>');
							$("#customer").css("display","none");
						}
					}
				});
			    }
});
</script>


<script>

$("#state_id").change(function () {
     get_district();
});
$("#category_id").change(function () {
     get_subcategory();
});



function get_district(){
    $('#district_id').empty(); 
    var state_id = $('#state_id').val();
            $.ajax({
                    url: 'api/get-district-api.php',
                    type: 'post',
                    dataType: 'json',
                    data: {type:'get_district',state_id:state_id},
                    success: function (response) {
                        console.log(response);
                         if(response['error']==false){
                                var m='<option value="">All District</option>';
                                for(var n=0;n<response['data'].length;n++){
                                    
                                        m+='<option value='+response['data'][n]['id']+'>'+response['data'][n]['district_name']+'</option>';
                 
                                }
                                $('#district_id').append(m);  
                        }else{
                            var m='<option value="">No District Found</option>';
                            $('#district_id').append(m);  
                        }
                    }
                });
}


function get_subcategory(){
    $('#subcategory').empty(); 
    var category_id = $('#category_id').val();
            $.ajax({
                    url: 'api/get-subcategory-api.php',
                    type: 'post',
                    dataType: 'json',
                    data: {type:'get_subcategory',category_id:category_id},
                    success: function (response) {
                        console.log(response);
                         if(response['error']==false){
                                var m='<option value="">All Subcategory</option>';
                                for(var n=0;n<response['data'].length;n++){
                                    
                                        m+='<option value='+response['data'][n]['id']+'>'+response['data'][n]['name']+'</option>';
                 
                                }
                                $('#subcategory').append(m);  
                        }else{
                            var m='<option value="">No Subcategory Found</option>';
                            $('#subcategory').append(m);  
                        }
                    }
                });
}

</script>
<script>
 function getData(){
		         
		         var Process_status = $('#Process_status').val();
		         var district_id = $('#district_id').val();
		         var state_id = $('#state_id').val();
		         var category_id = $('#category_id').val();
		         var subcategory = $('#subcategory').val();
		        
		         
				var dataTable = $('#customer').DataTable( {									     
					"processing": true,
					"order":[[0,'asc']],
					"serverSide": true,
					"lengthMenu": [[5,10, 25, 50, 100], [5,10, 25, 50, 100]],
                    "destroy":true,
                    //  columnDefs: [
                    //              {
                    //                  targets: [0], // The index of the column you want to hide
                    //                  visible: false // Set to false to hide the column
                    //              }
                    //          ],
                    "ajax":{
						url :"data-tables/customer-dt.php", // json datasource
						data: {Process_status:Process_status,district_id:district_id,state_id:state_id,category_id:category_id,subcategory:subcategory},
						type: "post",  // method  , by default get
						error: function(){  // error handling
							$(".example-error").html("");
							$("#customer").append('<tbody class="example-error"><tr><th colspan="8" style="text-align:center;"><img src="assets/img/icon/no_orders_found.webp" style="width:200px;"><br>No data Found</th></tr></tbody>');
							$("#customer").css("display","none");
						}
					}
				});
			    }
    
    
    function delete_customer(id){
            var result = confirm("Confirm Want to Delete This Details?");
            if (result) {
                    $.ajax({
                    type: 'POST',
                    url: 'api/delete.php',
                    data: {type:'hard_delete',delete_id:id,table:'customer'},                  
                    success: function(response) {
                        console.log(response); 
                        getData();
                    }
                });
            }
         }
</script>

Zerion Mini Shell 1.0