ok
Direktori : /proc/thread-self/root/proc/thread-self/root/home2/selectio/www/y1jobportal.in/admin/ |
Current File : //proc/thread-self/root/proc/thread-self/root/home2/selectio/www/y1jobportal.in/admin/clients.php |
<?php include('header.php'); ?> <div class="page-wrapper"> <div class="page-content"> <div class=" card card-body"> <div class="tab-content py-3"> <div class="tab-pane fade show active" id="new" role="tabpanel"> <a href="add-client.php" class="btn btn-success btn-sm" style="float: right;"><i class="fa fa-plus-circle"></i> Add New Client</a> <a hidden href="students-add.php" class="btn btn-success btn-sm" style="float: right;"><i class="fa fa-plus-circle"></i> Add New Students</a> <span class="btn btn-secondary btn-sm filter" style="float: right; margin-right: 5px;"><i class="bi bi-funnel"></i> Show/Hide Filter</span> <button type="button" class="btn btn-sm btn-export" style="float: right; margin-right: 5px;"><i class="lni lni-exit-down"></i> Export as Excel</button> <b style="font-size:14px;"><div class="breadcrumb-title pe-3"><i class="fa fa-users"></i> Client's Details</div></b> <div class="row" style="margin:10px 0px 10px 0px ;"> <div class="col-md-9 col-sm-6" hidden> <div class="row"> <div hidden class="col-md-4 col-sm-6"> <div id="reportrange" class="input-border"> <i class="fa fa-calendar"></i> <span></span> <i class="fa fa-caret-down"></i> </div> </div> </div> </div> <div class="col-md-3 col-sm-3"> </div> <!-- Filter Starts Here --> <div class="row" style="margin: 10px 0px 10px 0px;" id="filter"> <div class="col-sm-3" hidden> <div class="form-group"> <label class="control-label" for="status">Status</label> <select name="status" class="form-control select2" style="width:100%" id="status"> <option value="1">Active</option> <option value="0">In-Active</option> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label for="category_id" class="form-label required">Category</label> <select class="form-control select2" id="category_id" name="category_id" > <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> <div class="col-sm-3"> <div class="form-group"> <label for="state_id" class="form-label required">State</label> <select class="form-control select2" id="state_id" name="state_id" > <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> <div class="col-sm-3"> <div class="form-group"> <label for="district_id" class="form-label required">District</label> <select class="form-control select2" id="district_id" name="district_id" > <option value="">All District</option> <?php $condition =''; $city = $_SESSION['y1_jobs']['city'] ?? null; if($_SESSION['y1_jobs']['role_json'] == 2){ $condition.= " and id IN ($city)" ; } $statement = $pdo->prepare("SELECT * FROM `district` WHERE status=1 AND id IN ( '".$city."' )"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option value="<?=$result['id']?>"><?=$result['district_name']?></option> <?php } ?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label for="business_type" class="form-label required">Business Type</label> <select class="form-control select2" id="business_type" name="business_type" > <option value="">All Business Types</option> <option value="Non Registered">Non Registered</option> <option value="Registered">Registered</option> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label for="payment_status" class="form-label required">Payment Status <?=$city?></label> <select class="form-control select2" id="payment_status" name="payment_status" > <option value="">All Payment Status</option> <option value="0">Pending</option> <option value="1">Completed</option> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label for="created_user" class="form-label required">Created Users</label> <select class="form-control select2" id="created_user" name="created_user" > <option value="">All Created Users</option> <?php $statement = $pdo->prepare("SELECT * FROM `employee` WHERE status=1"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option value="<?=$result['id']?>"><?=$result['first_name']?> <?=$result['last_name']?></option> <?php } ?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label for="followup_id" class="form-label required">Followup</label> <select class="form-control select2" id="followup_id" name="followup_id" > <option value="">All Followup</option> <?php $statement = $pdo->prepare("SELECT * FROM `follow_up_status`"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option value="<?=$result['id']?>"><?=$result['name']?></option> <?php } ?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label for="subscription_id" class="form-label required">Subscription</label> <select class="form-control select2" id="subscription_id" name="subscription_id" > <option value="">All Subscription</option> <?php $statement = $pdo->prepare("SELECT * FROM `subscription`"); $statement->execute(); $resultss = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($resultss as $result) { ?> <option value="<?=$result['id']?>"><?=$result['name']?></option> <?php } ?> </select> </div> </div> </div> <!-- Filter Endsss Here --> </div> <table id="client"> <thead> <tr> <th>Action</th> <th>S.No</th> <th>Client Details</th> <th>Logo</th> <th>Company Details</th> <th>Business Type</th> <th>Current Status</th> <th>Payment 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> <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() { getData(); $('#status, #category_id, #state_id, #district_id, #business_type, #payment_status, #created_user, #followup_id, #subscription_id').change(function() { getData(); }); }); function getData(){ var status = $("#status").val(); var category_id = $("#category_id").val(); var state_id = $("#state_id").val(); var district_id = $("#district_id").val(); var business_type = $("#business_type").val(); var payment_status = $("#payment_status").val(); var created_user = $("#created_user").val(); var followup_id = $("#followup_id").val(); var subscription_id = $("#subscription_id").val(); var dataTable = $('#client').DataTable( { "processing": true, "order":[[0,'asc']], "serverSide": true, "lengthMenu": [[5,10, 25, 50, 100], [5,10, 25, 50, 100]], "destroy":true, "ajax":{ url :"data-tables/client-dt.php", // json datasource data: {category_id:category_id, state_id:state_id, district_id:district_id, business_type:business_type, payment_status:payment_status, created_user:created_user, followup_id:followup_id, subscription_id:subscription_id}, type: "post", // method , by default get error: function(){ // error handling $(".example-error").html(""); $("#client").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>'); $("#client").css("display","none"); } } }); } </script> <script> function custom_view(file_name,id){ $('#new_con').empty(); $('#'+id).load("ui-pages/orders/"+file_name+".php"); } $(document).ready(function(){ }); </script> <?php include('footer.php'); ?> <script> $(document).ready(function(){ $('#filter').hide(); $('.filter').click(function(){ $("#filter").slideToggle(); return false; }); }); </script> <script> function delete_client(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:'client'}, success: function(response) { console.log(response); getData(); } }); } } </script>