Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/admin/
Upload File :
Current File : /home2/wtmwscom/public_html/admin/product_list.php

<?php
$title = "Product List";
include 'header.php';
?>

<br/>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12">
            <div class="page-title-box">
                <h4 class="page-title">Product List</h4>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="index.php">Home</a></li>
                    <li class="breadcrumb-item"><a href="#">Users</a></li>
                    <li class="breadcrumb-item active">Users Profile</li>

                </ol>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-15">
            <div class="card m-b-20">
                <div class="card-body">


                    <table class="table mb-0 table-bordered table-striped" id="datatable-ajax-page">
                        <thead>
                            <tr>
                                <th>
                                    P. ID
                                </th>
                                <th>
                                    P Code
                                </th>
                                <th>
                                    P Name
                                </th>
                                <th>
                                    MRP
                                </th>
                                <th>
                                    PV
                                </th>
                                <th>
                                    P. Cost
                                </th>
                                <th>
                                   Cgst
                                </th>
                                <th>
                                   Sgst
                                </th>
                                <th>
                                 Hsn Code
                                </th>
                                <th>
                                    Qty.
                                </th>
                                <th>Edit</th>
                                <th>
                                    Delete
                                </th>
                            </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
<?php //echo $pager->renderFullNav();       ?>  
                </div>
            </div>
        </div> <!-- end col -->
    </div>
    <!--table content ends here-->
</div>
<script type="text/javascript">
    var start;
    $(document).ready(function () {
        var table = $('#datatable-ajax-page').DataTable({
            "ajax": {
                "url": "./report/product_list_json.php",
                "type": "POST",
                dataType: 'json',
                data: function (d) {

                    var formData = $("#search-form").serializeArray();
                    $.each(formData, function (i, field) {
                        d[field.name] = field.value;

                    });
                },
            },
            "processing": true,
            "serverSide": true,
            "pageLength": 500,
            //"lengthMenu": [[100, 500, 1000, 2000, -1], [100, 500, 1000, 2000, "All"]],
            "lengthMenu": [[100, 500, 1000, 2000, 5000], [100, 500, 1000, 2000, 5000]],
            "dom": 'B<"top">rt<"bottom"lp><"clear">',
            buttons: [
                'excel', 'csv', 'pdf', 'print'
            ],
            "columns": [
                {"data": "pid"},
//                {"title": "User", "data": "name",
//                    "render": function (data, type, full, meta) {
//                        return '<a href="edit_profile.php?uid=' + full.uid + '">' + full.login_id + '</a>';
//                    }},
                /* { "data": "parentRoleId" }, */
//                {"title": "User", "data": "name",
//                    "render": function (data, type, full, meta) {
//                        return '<a href="user_login_process.php?uid=' + full.uid + '" title="Login this user" target="_blank">' + full.name + '</a>';
//                    }},
                {"data": "pcode"},
                {"data": "pname"},
                {"data": "mrp"},
                {"data": "pv"},
                {"data": "pcost"},
                {"data": "tax_rate"},
                {"data": "sgst"},
                {"data": "hsn_code"},
                {"data": "quantity"},
//                {"data": "pid",
//                    render": function (data, type, full, meta) {
//                    return '<a href="product_edit.php?pid='+full.pid+'">'+'</a>';
//                }},
          
            {"data": "pid",
                    "render": function (data, type, full, meta) {
                        return '<a href="product_edit.php?pid=' + full.pid + '" class="btn btn-primary">'+ "edit"+'</a>';
                    }},
                {"data": "pid",
                    "render": function (data, type, full, meta) {
                        return '<a href="delete_product.php?pid=' + full.pid + '" class="btn btn-primary">'+ "delete"+'</a>';
                    }},
            ],
        }
        );
        $("#search-form").submit(function (e) {
            table.ajax.reload();
            e.preventDefault(); // avoid to execute the actual submit of the form.
        });

        table.on('xhr', function () {
            start = table.ajax.json().start;

        });
    });


    function processBlock(uid, login_id, status) {
        var r = confirm("Do you want Block user ID " + login_id);
        var url = status == 0 ? "process_block.php" : "process_unblock.php";

        if (r) {
            $.get(url, {'uid': uid}, function (data) {
                alert(data);
                location.reload();
            });
        }
    }
    /*function processUnblock(uid, login_id) {
     var r = confirm("Do you want Unblock user ID " + login_id);
     if (r) {
     $.get("process_unblock.php", {'uid': uid}, function (data) {
     alert(data);
     location.reload();
     });
     }
     }*/

    function processFieldUpdate(uid, login_id, field_name, field_value) {
        var r = confirm("Do you want to update status of this id " + login_id);
        if (r) {
            $.get("process_field_update.php", {table_name: 'user', where_field_name: 'uid', id: uid, field_name: field_name, field_value: field_value}, function (data) {
                alert(data);
                location.reload();
            });
        }
    }
//    function searchform(){
//        table.ajax.reload();
//    }
</script>
<?php
include('footer.php');
?>