whoami7 - Manager
:
/
proc
/
thread-self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
webapp
/
master
/
item
/
Upload File:
files >> //proc/thread-self/root/home/papecmvm/www/application/views/webapp/master/item/view.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php');?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Item Category </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Item Category</li> </ol> </section> <!-- Main content --> <section class="content"> <?php $attributes = array('id' => 'formid'); echo form_open("",$attributes); ?> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <div class="text-left"> <a href="<?php echo base_url().'webapp/master/item_cat/add'; ?>" class="btn btn-primary">Add Category</a> </div> </div><!-- /.box-header --> <div class="box-body"> <?php if($this->session->flashdata('msg')){ echo $this->session->flashdata('msg'); } ?> <label class="pull-right"> <input id="search" type="search" class="form-control input-sm" placeholder="Search"> </label> <table id="" class="table table-bordered table-striped"> <thead> <tr> <th>Name</th> <th>Action</th> </tr> </thead> <tbody class="my_search"> <?php foreach ($item as $it) { $enc_id = $this->model->encryptdata($it['cid']); ?> <tr> <td><?php echo $it['cname']; ?></td> <td> <a href="<?php echo base_url().'webapp/master/item_cat/edit/'.$enc_id; ?>" class="btn btn-info"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a> <a href="<?php echo base_url().'webapp/master/item_cat/trash/'.$enc_id; ?>" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this item?');"><i class="fa fa-trash" aria-hidden="true"></i></a> </td> </tr> <?php } ?> </tbody> </table> <span class="page"> <?php echo $this->pagination->create_links(); ?> </span> </div><!-- /.box-body --> </div><!-- /.box --> </div> </div> <!-- /.row --> <?php echo form_close(); ?> </section><!-- /.content --> </div><!-- /.content-wrapper --> <div id="loadingDiv" style="display:none"> <div> <h7>Please wait...</h7> </div> </div> <script type="text/javascript"> $(document).on('keyup', '#search', function(e) { $(".page").hide(); var search = $(this).val(); var controller = 'webapp/master/item_cat'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/search', 'type' : 'POST', 'data' : {'src':search}, 'success' : function(data){ if(search==''){ $('.my_search').html(''); default_cat(); $(".page").show(); $('#loadingDiv').hide(); }else{ console.log(data); $('.my_search').html(data); $('#loadingDiv').hide(); } } }); }); function default_cat(){ var controller = 'webapp/master/item_cat'; var base_url = '<?php echo site_url(); ?>'; $('#loadingDiv').show(); $.ajax({ 'url' : base_url + controller + '/default_cat', 'type' : 'POST', 'success' : function(data){ $('.my_search').html(data); } }); } </script> <script type="text/javascript"> function alerting(){ return confirm('Are you sure you want to delete this item?'); return false; } </script> <?php require_once(APPPATH.'views/webapp/footer.php');?>
Copyright ©2021 || Defacer Indonesia