ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/viewDuplicateEntries.php |
<?php require_once('header.php'); ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#select_all').on('click',function(){ if(this.checked){ $('.checkbox').each(function(){ this.checked = true; }); }else{ $('.checkbox').each(function(){ this.checked = false; }); } }); $('.checkbox').on('click',function(){ if($('.checkbox:checked').length == $('.checkbox').length){ $('#select_all').prop('checked',true); }else{ $('#select_all').prop('checked',false); } }); $('#select_all').on('click',function(){ if(this.checked){ $('.checkbox').each(function(){ this.checked = true; }); }else{ $('.checkbox').each(function(){ this.checked = false; }); } }); $('.checkbox').on('click',function(){ if($('.checkbox:checked').length == $('.checkbox').length){ $('#select_all').prop('checked',true); }else{ $('#select_all').prop('checked',false); } }); $('#btn_delete_shipments').on('click',function(){ var checkValues = $('input[name=checkboxlist]:checked').map(function(){ return $(this).val(); }).get(); if(checkValues != ''){ var r = confirm("Confirm if You Want to Delete Those Pickup Entry?"); if (r == true) { var ids=[]; ids = checkValues; console.log('Delete ids :'+ids); $.ajax({ url: 'data-tables/custom-function.php', type: 'post', data: {type:'delete_pickup_entry',delete_id:ids}, success: function(response){ console.log(response); //alert("test..."); //$('#status').val(0); window.top.close(); window.location.reload(); } }); } //window.location.href="shipment-picked.php?shipment_id="+ids+"&status="+status; }else{ //alert("Pls Select Min One Pickup Entry to Delete..."); window.top.close(); } }); }); function redirectTo(){ var checkValues = $('input[name=checkboxlist]:checked').map(function() { return $(this).val(); }).get(); // alert(checkValues); var ids=[]; ids = checkValues; // some thing like this you can set value for 1st Param. window.location.href="pk_awb_number_print.php?list_id="+ids; } function redirectTolable(){ var checkValues = $('input[name=checkboxlist]:checked').map(function() { return $(this).val(); }).get(); // alert(checkValues); var ids=[]; ids = checkValues; // some thing like this you can set value for 1st Param. window.location.href="pk_lable_print.php?list_id="+ids; } </script> <section class="content-header"> <div class="content-header-left"> <h1>View Pickup Entry</h1> </div> <div class="row"> <div class="col-md-12"> <div class="col-md-2"> <div class="content-header-right" > <a href="pickup-entry-add.php" class="btn btn-primary btn-sm">Single Pickup Entry</a> </div> </div> </div> </div> </section> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="box box-info"> <div class="box-body table-responsive"> <table id="example1" class="table table-bordered table-striped"> <thead> <tr> <th width="30">SL</th> <th data-sortable="false"><i class="fa fa-check"></i><input type="checkbox" class='checkbox' id="select_all" /></th> <th>id</th> <th>Awb Number</th> <th>Material</th> <th>Current Status</th> <th>Date</th> <th>Company Name</th> <th>Address</th> <th>Pincode</th> <th>Mobile Number</th> <th>Actual Weight</th> <th>Charged Weight</th> <th>No.Of Pics</th> <th>Customer Name</th> </tr> </thead> <tbody> <?php $i=0; $statement = $pdo->prepare("SELECT pickup_entry.*,tbl_user.full_name as client_name,material_desc.full_desc as content,tbl_customer.cust_name as cust_name FROM pickup_entry INNER JOIN tbl_user INNER JOIN tbl_customer INNER JOIN material_desc on pickup_entry.client_id=tbl_user.id AND pickup_entry.content_desc=material_desc.id AND pickup_entry.customer_id=tbl_customer.cust_id WHERE pickup_entry.ref_no=? order by pickup_entry.id DESC"); $statement->execute(array($_REQUEST['id'])); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { $i++; ?> <tr> <td><?php echo $i; ?></td> <td><input type='checkbox' class='checkbox' name='checkboxlist' value="<?php echo $row['id']; ?>"/></td> <td><a href='modicare-pickup-entry-edit.php?id=<?php echo $row['id']; ?>' target='_blank' class='btn btn-primary btn-xs'>Edit</a><?php echo $row['id']; ?></td> <td><?php echo $row['ref_no']; ?></td> <td><?php echo $row['content']; ?></td> <td><?php echo $row['status']; ?></td> <td><?php echo $row['created_at']; ?></td> <td><?php echo $row['client_name']; ?></td> <td><?php echo $row['address']; ?></td> <td><?php echo $row['pincode']; ?></td> <td><?php echo $row['phone']; ?></td> <td><?php echo $row['a_weight']; ?></td> <td><?php echo $row['c_weight']; ?></td> <td><?php echo $row['pics']; ?></td> <td><?php echo $row['cust_name']; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <div class="content-footer-right" style="margin-left:45%"> <button class="btn btn-danger btn-sm" id="btn_delete_shipments"><i class="fa fa-trash-o"></i> Delete Pickup Entry</button> <button class="btn btn-primary btn-sm" onclick="redirectTo();">Print AWB Number</button> <button class="btn btn-primary btn-sm" onclick="redirectTolable();">Print Lable</button> </div> </section> <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Delete Confirmation</h4> </div> <div class="modal-body"> <p>Are you sure want to delete this item?</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <a class="btn btn-danger btn-ok">Delete</a> </div> </div> </div> </div> <?php require_once('footer.php'); ?>