ok
Direktori : /home2/selectio/www/vijay-gases/ |
Current File : //home2/selectio/www/vijay-gases/product.php |
<?php include "header.php";?> <div class="content-wrapper"> <div class="col-lg-12 alerts"> <div id="custom-alerts" style="display:none;"> <div class="alert alert-dismissable"> <div class="custom-msg"></div> </div> </div> <?php if ($error) { ?> <div class="alert alert-danger alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-ban"></i> Error</h4> <?= $error; ?> </div> <?php } if ($warning) { ?> <div class="alert alert-warning alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4><i class="icon fa fa-warning"></i> Warning</h4> <?= $warning; ?> </div> <?php } if ($message) { ?> <div class="alert alert-success alert-dismissable"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <h4> <i class="icon fa fa-check"></i> Success</h4> <?= $site_name; ?> </div> <?php } ?> </div> <div class="clearfix"></div> <script type="text/javascript"> <?php $datatable =" var search_table =$('#search_table').val(); var location =$('#location').val(); var gas_type =$('#gas_type').val(); var product_type = $('#product_type').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/product-data-table.php', data:{search:search_table,location:location,gas_type:gas_type,product_type:product_type}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true, 'buttons': [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ] } }, { extend: 'colvis', text: 'Columns'}, ] });"; ?> $(document).ready(function() { emp_data(); function emp_data(){ <?=$datatable?> } $('#search_table').keyup(function() { emp_data(); document.getElementById("search_table").focus(); }); $('#location,#gas_type, #product_type').change(function() { emp_data(); }); }); function delete_users(id){ var result = confirm("Confirm Want to Delete This User?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: {type:'user_delete',delete_id:id}, success: function(response) { console.log(response); emp_datas(); } }); } } function emp_datas(){ <?=$datatable?> } </script> <section class="content"> <?php //if($_SESSION['vijay_gases']['id']=="1"){ ?> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <div class="row" style=""> <div class="col-md-10 col-sm-10 col-xs-8"> <div style="list-style: none; padding-inline-start: 0px; padding: 5px 0px 5px 0px;"> <?php include "header/product_header.php"; ?> </div> </div> <div class="col-md-2 col-sm-2 col-xs-4"> <?php //include "header/buttons-ui.php"; ?> </div> </div> </div> <div class="box-body"> <div class="row"> <div class="col-sm-3"> <div class="form-group"> <label class="control-label required" for="departement_id">Company Name</label> <select name="location" class="form-control select2" style="width:100%" id="location"> <option value="">Select Company Name</option> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_location` where status='1'"); $statement->execute(); $location_result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($location_result as $result) { echo "<option value=".$result['id'].">".$result['name']."</option>"; }?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label class="control-label required" for="departement_id">Gas Type</label> <select name="gas_type" class="form-control select2" style="width:100%" id="gas_type"> <option value="">Select Gas Type</option> <?php $statement = $pdo->prepare("SELECT * FROM `tbl_gas` where status='1'"); $statement->execute(); $location_result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($location_result as $result) { echo "<option value=".$result['id'].">".$result['gas_name']."</option>"; }?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label class="control-label required" for="product_type">Cylinder Type</label> <select name="product_type" class="form-control select2" style="width:100%" id="product_type"> <option value="">Select Cylinder Type</option> <option value="1">Full Cylinder</option> <option value="2">Cylinder in Customer</option> <option value="3">Empty Cylinder</option> </select> </div> </div> </div> <div class="clearfix"></div> <div class="table-responsive"> <table id="StData" class="table table-striped table-bordered table-condensed table-hover" style="margin-bottom:5px;"> <thead> <tr> <td colspan="12" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table" placeholder="Search Here" style="width:100%;background-color: darkblue;color: white;"></td> </tr> <tr class="active"> <th style="width:100px;">Actions</th> <th>S.No</th> <th>Product Name</th> <th>Cylinder No</th> <th>Company Name</th> <th>Full / Empty</th> <th>Current Location</th> <th>Customer Name</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td colspan="12" class="dataTables_empty"><center> Loading Pls Wait Data</center></td> </tr> </tbody> </table> </div> <div class="clearfix"></div> </div> </div> </div> </div> <?php //}else{ ?> <!--<center>Invalid Accesss</center>--> <?php //} ?> </section> <script> /*$(function(){ $('#gas_id').select2({ dropdownParent: $('#myModal') }); });*/ </script> <script> /*$( document ).ready(function() { $('.select2').each(function () { $(this).select2({ theme: 'bootstrap-5', dropdownParent: $(this).parent(), }); }); });*/ </script> <?php include "footer.php";?>