whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
webapp
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/views/webapp/view_directory.php
<?php require_once(APPPATH.'views/webapp/header.php'); require_once(APPPATH.'views/webapp/menu.php'); ?> <div class="content-wrapper"> <section class="content-header"> <h1>View Directory</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">View Directory</li> </ol> <?php if($this->session->flashdata('msg')){ echo "<br>"; echo $this->session->flashdata('msg'); } ?> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-sm-12"> <ul class="nav nav-tabs"> <li role="presentation" class="active"><a href="#">All</a></li> <li role="presentation"><a href="<?php echo base_url().'webapp/people/directory_used/'.$mypath ?>">Used</a></li> <li role="presentation"><a href="<?php echo base_url().'webapp/people/directory_scratched/'.$mypath ?>">Scratched</a></li> </ul> <br> </div> <div class="col-sm-4"> <input type="text" class="form-control search_list" placeholder="Search File..."> </div> </div> <br> <div class="row"> <div class="containerItems"> <?php $path = 'documents/'.$folder.'/'.$year.'/'.$month.'/'.$voucher.'/'; // php get files from directory order by date second way $dir = scandir($path); //echo "<pre>"; print_r ($dir); echo "</pre>"; $i=0; foreach ($dir as $f) { $i++; if(is_file($path.$f)){ ?> <div class="col-sm-3 used<?php echo $i; ?>" data-search="<?php echo $f; ?>"> <div class="thumbnail text-center" data-filter="beroy knightmobile html accion" data-search="<?php echo $f; ?>" style="height: 130px;"> <button data-toggle="tooltip" data-title="Make it used" data-name="<?php echo $f; ?>" data-id="<?php echo $i; ?>" onclick="makeUsed($(this));" class="used btn btn-info btn-xs"><i class="fa fa-check" aria-hidden="true"></i></button> <button data-toggle="tooltip" data-title="Scratched?" data-name="<?php echo $f; ?>" data-id="<?php echo $i; ?>" onclick="makeScratched($(this));" class="issue btn btn-danger btn-xs"><i class="fa fa-times" aria-hidden="true"></i></button> <?php $ext = pathinfo($f, PATHINFO_EXTENSION); if($ext == 'png' || $ext == 'PNG' || $ext == 'jpg' || $ext == 'JPG' || $ext == 'jpeg' || $ext == 'JPEG') { ?> <a class="example-image-link text-primary" href="<?php echo base_url().$path.$f; ?>" data-lightbox="example-set" data-title="<?php echo base_url().$f; ?>"> <img src="<?php echo base_url().$path.$f; ?>" class="" style="height: 100px;"> </a> <?php }else{ ?> <a target="_blank" href="<?php echo base_url().$path.$f; ?>"> <i class="fa fa-file-pdf-o fa-4x text-danger" aria-hidden="true"></i> </a> <?php } ?> <p class="text-center text-danger"><?php echo $f; ?></p> </div> </div> <?php } } ?> </div> </div> </section> </div> <?php require_once(APPPATH.'views/webapp/footer.php'); ?> <script> function makeUsed(obj){ var dataurl = "<?php echo base_url() ?>" + 'webapp/people/makeUsed'; var name = obj.attr('data-name'); var id = obj.attr('data-id'); var folder = '<?php echo $folder; ?>'; var year = '<?php echo $year; ?>'; var month = '<?php echo $month; ?>'; var voucher = '<?php echo $voucher; ?>'; if (confirm('Are you sure')) { $.ajax({ url: dataurl, method: "POST", data:{name:name, folder:folder, year:year, month:month, voucher:voucher}, success: function (status) { $('.used'+id).hide(); } }); } } function makeScratched(obj){ var dataurl = "<?php echo base_url() ?>" + 'webapp/people/makeScratched'; var name = obj.attr('data-name'); var id = obj.attr('data-id'); var folder = '<?php echo $folder; ?>'; var year = '<?php echo $year; ?>'; var month = '<?php echo $month; ?>'; var voucher = '<?php echo $voucher; ?>'; if (confirm('Are you sure')) { $.ajax({ url: dataurl, method: "POST", data:{name:name, folder:folder, year:year, month:month, voucher:voucher}, success: function (status) { $('.used'+id).hide(); } }); } } </script>
Copyright ©2021 || Defacer Indonesia