    <script type="text/javascript">
        $(document).ready(function() {
            $('#editabledatatable').dataTable({
                "destroy": true,
                "ajax": "<?php echo base_url(); ?>sales/activetickets/getactivetickets",
                "lengthMenu": [[20, 50, 100], [20, 50, 100]],
                "language": {
                    "lengthMenu": "<?php echo $this->lang->line("DISPLAY"); ?> _MENU_ <?php echo $this->lang->line("RECORDSPERPAGE"); ?>",
                    "zeroRecords": "<?php echo $this->lang->line("NOTHINGFOUND"); ?>",
                    "info": "<?php echo $this->lang->line("SHOWINGPAGE"); ?> _PAGE_ <?php echo $this->lang->line("OF"); ?> _PAGES_",
                    "infoEmpty": "<?php echo $this->lang->line("NORECORDSAVAILABLE"); ?>",
                    "infoFiltered": "(<?php echo $this->lang->line("FILTEREDFROM"); ?> _MAX_ <?php echo $this->lang->line("TOTALRECORDS"); ?>)",
                    "search": "<?php echo $this->lang->line("SEARCH"); ?> : ",
                    "paginate": {
                        "previous": "<?php echo $this->lang->line("PREVIOUS"); ?>",
                        "next":"<?php echo $this->lang->line("NEXT"); ?>"
                    }
                },
                "columns": [
                    { "data": "id",
                        render: function (data, type, row, meta) {
                            return meta.row + meta.settings._iDisplayStart + 1;
                        } 
                    },
                    { "data": "NAME" }
                    ]
            });
        } );
        function myFunction(id) { 
            $.ajax({
                url: base_url + 'sales/activetickets/editactivetickets/'+ id,
                success:function(data){
                    var json = $.parseJSON(data);
                    for (var i=0;i<json.length;++i) {
                        $("#id").val(json[i].ID);
                        $("#name").val(json[i].NAME);
                        $("#content").val(json[i].CONTENT);
                    }
                }
            });
        }
    </script>
    <!-- Page Content -->
    <div class="page-content">
        <!-- Page Header -->
        <div class="page-header position-relative">
            <div class="header-title">
                <h1>
                  <?php echo $this->lang->line("ACIVETIKCETS"); ?>
                </h1>
            </div>
            <!--Header Buttons-->
            <div class="header-buttons">
                <a class="sidebar-toggler" href="#">
                    <i class="fa fa-arrows-h"></i>
                </a>
                <a class="refresh" id="refresh-toggler" href="">
                    <i class="glyphicon glyphicon-refresh"></i>
                </a>
                <a class="fullscreen" id="fullscreen-toggler" href="#">
                    <i class="glyphicon glyphicon-fullscreen"></i>
                </a>
            </div>
            <!--Header Buttons End-->
        </div>
        <!-- /Page Header -->
        <!-- Page Body -->
        <div class="page-body">
            <div class="row">
                <div class="col-xs-12 col-md-12">
                    <div class="widget">
                       
                        <div class="widget-body">
                            <div class="table-toolbar">
                                <div id="myModal" class="modal fade" role="dialog">
                                    <div class="modal-dialog">
                                        <!-- Modal content-->
                                        <div class="modal-content">
                                            <form action="<?php echo base_url();?>sales/activetickets/addactivetickets" method="post">
                                              <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal">&times;</button>
                                                <h4 class="modal-title"><?php echo $this->lang->line("ADDNEW"); ?></h4>
                                              </div>
                                              <div class="modal-body">
                                               <div class="row">
                                                    <div class="col-md-12">
                                                        <input type="hidden" id="id" name="id">
                                                        <div class="form-group">
                                                            <input type="text" class="form-control" name="name" id="name" placeholder="<?php echo $this->lang->line("NAME"); ?>" required="">
                                                        </div>
                                                        <div class="form-group">
                                                            <textarea class="form-control" name="content" id="content" placeholder="<?php echo $this->lang->line("CONTENT"); ?>" rows="5" required=""></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                              </div>
                                              <div class="modal-footer">
                                                <button type="submit" class="btn btn-success"><?php echo $this->lang->line("SUBMIT"); ?></button>
                                                <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo $this->lang->line("CLOSE"); ?></button>
                                              </div>
                                          </form>
                                        </div>
                                    </div>
                                    <div class="btn-group pull-right"></div>
                                </div>
                                <div class="table-scrollable" style="border: none;">
                                    <table class="table table-striped table-hover table-bordered editable" id="editabledatatable" style="width: 100%;">
                                        <thead>
                                            <tr role="row">
                                                <th>
                                                    <?php echo $this->lang->line("ID"); ?>
                                                </th>
                                                <th>
                                                    <?php echo $this->lang->line("NAME"); ?>
                                                </th>
                                            </tr>
                                        </thead>
                                    </table>
                                 </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
    </div>
    <!-- /Page Container -->
    <!-- Main Container -->
</div>