whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
webapp
/
office_user
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/views/webapp/office_user/view_cust_data_two.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php'); $cur_year = date('Y'); $cur_month = strtolower(date('F')); echo "<style>.file-tree .topyear_".$cur_year.":before{ color:#d81b60!important;}</style>"; echo "<style>.year_".$cur_year." .".$cur_month.":before{ color:#d81b60!important;}</style>"; $voucher = substr($data, strrpos($data, '/') + 1); $ses = $this->session->get_userdata(); $oid = $ses['reg_info'][0]['rid']; ?> <style type="text/css"> .cust-data img{height: 100px!important;} .ht{height: 50px;} </style> <script type="text/javascript"> </script> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Documents </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('admin/webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Documents</li> </ol> <?php if($this->session->flashdata('msg')){ echo $this->session->flashdata('msg'); } ?> </section> <!-- Main content --> <section class="content"> <div class="row"> <?php echo form_open("webapp/office/form"); ?> <span class="pull-right text-capitalize text-primary" style="margin-right: 15px;"> <h3> <?php if($voucher == 'cheque_reg'){echo "Cheque Register";}else{echo $voucher;} ?> </h3> </span> <div class="box-header"> <?php if($st == 'bank'){ ?> <a class="bank btn btn-info">Generate Voucher</a> <?php }elseif($st == 'cheque_reg'){ ?> <a class="cheque btn btn-warning">Generate Voucher</a> <?php }else{ ?> <input type="submit" name="Generate" class="btn btn-danger text-capitalize aprv" value="Generate Voucher"> <?php } ?> </div> <!-- Modal for Bank --> <div class="modal fade" id="bank" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Select Voucher Type</h4> </div> <div class="modal-body"> <div class="block_bank"> </div> <label class="radio-inline payment"> <input type="radio" name="voucher_type" id="inlineRadio1" value="payment" > Payment </label> <label class="radio-inline receipt"> <input type="radio" name="voucher_type" id="inlineRadio2" value="receipt"> Receipt </label> <label class="radio-inline contra"> <input type="radio" name="voucher_type" id="inlineRadio3" value="contra"> Contra </label> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <input type="submit" name="Generate" class="btn btn-primary text-capitalize aprv" value="Generate Voucher"> </div> </div> </div> </div> <!-- Modal for Cheque --> <div class="modal fade" id="cheque" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Select Voucher Type</h4> </div> <div class="modal-body"> <label class="radio-inline payment"> <input type="radio" name="voucher_type" id="inlineRadio1" value="payment" > Payment </label> <label class="radio-inline receipt"> <input type="radio" name="voucher_type" id="inlineRadio2" value="receipt"> Receipt </label> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <input type="submit" name="Generate" class="btn btn-primary text-capitalize aprv" value="Generate Voucher"> </div> </div> </div> </div> <div class="col-xs-12 col-sm-12 col-md-12"> <div class="box box-primary"> <div class="box-body"> <div class="cust-data"> <input type="hidden" name="cid" value="<?php echo $cst_id; ?>"> <input type="hidden" name="stg" value="<?php echo $st; ?>" class="stage"> <input type="hidden" name="year" value="<?php echo $year; ?>" class="year"> <input type="hidden" name="month" value="<?php echo $month2; ?>" class="month"> <?php //$dirs = array_filter(glob($data.'/*'), 'is_file'); foreach ($cd as $key) { $pt = $key['path_two']; ?> <div class="col-sm-2 text-center thumbnail"> <?php if($st == 'bank'){ ?> <?php if($key['voucher_type'] != ''){ $lt_bank = ltrim($key['voucher_type'], '|'); $exp_bank = explode('|',$lt_bank); //echo "<pre>"; print_r ($exp_bank); echo "</pre>"; //$exp_bank = explode('|',$key['voucher_type']); $eb_cnt = count($exp_bank); }else{ $eb_cnt = 0; } if($eb_cnt != '3'){ ?> <?php if($key['oid'] == $oid){ ?> <input if="" data-status="<?php if(!empty($key['voucher_type'])){ echo $lt_bank; }?>" type="checkbox" class="vt" name="path[]" value="<?php echo $key['path_two']; ?>"> <?php }else{ ?> <input esle="" data-status="<?php if(!empty($key['voucher_type'])){ echo $key['voucher_type']; }?>" type="checkbox" class="vt" name="path[]" value="<?php echo $key['path_two']; ?>" onclick="check('<?php echo $pt; ?>', $(this))"> <?php } ?> <?php }else{ ?> <input type="checkbox" name="" disabled=""> <?php } ?> <?php }else{ ?> <?php if($key['voucher_type'] != ''){ $lt = ltrim($key['voucher_type'], '|'); $exp_reg = explode('|',$lt); $er_cnt = count($exp_reg); }else{ $er_cnt = 0; } if($er_cnt != '2'){ ?> <?php if($key['oid'] == $oid){ //$lt2 = ltrim($key['voucher_type'], '|'); ?> <input if="" data-status="<?php if(!empty($key['voucher_type'])){ echo $lt; }?>" type="checkbox" class="vt" name="path[]" value="<?php echo $key['path_two']; ?>"> <?php }else{ ?> <input esle="" data-status="<?php if(!empty($key['voucher_type'])){ echo $key['voucher_type']; }?>" type="checkbox" class="vt" name="path[]" value="<?php echo $key['path_two']; ?>" onclick="check('<?php echo $pt; ?>', $(this))"> <?php } ?> <?php }else{ ?> <input type="checkbox" name="" disabled=""> <?php } ?> <?php } ?> <?php $name = substr($key['path_two'], strrpos($key['path_two'], '/') + 1); $ext = pathinfo($name, PATHINFO_EXTENSION); if($ext == 'pdf' || $ext == 'PDF'){ ?><br> <a href="<?php echo base_url().$key['path_two']; ?>" target="_blank"> <i style="font-size: 7.1em;" class="fa fa-file-pdf-o" aria-hidden="true"></i> </a> <?php }else{ ?> <a class="example-image-link text-primary" href="<?php echo base_url().$key['path_two']; ?>" data-lightbox="example-set" data-title="Image"> <img src="<?php echo base_url().$key['path_two']; ?>" class="img-responsive"> </a> <?php } ?> <div class="ht"> <?php if(!empty($key['voucher_type'])){ ?> <span class="text-success ">Completed as <br> <?php $lt2 = ltrim($key['voucher_type'], '|'); echo str_replace('|', ', ', strtoupper($lt2)); ?></span> <?php }else{ echo '<span class="text-danger "> Pending </span>'; } ?> </div> </div> <?php } ?> </div> </div> </div> </div> <?php form_close(); ?> </div><!--row--> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/webapp/footer.php');?> <script type="text/javascript"> $(".contactForm_").submit(function (event) { event.preventDefault(); var form_data = $(".contactForm").serialize(); $.ajax({ url: 'http://localhost/paper/webapp/users/upload', type: 'POST', data: form_data, success: function (data) { $('.contactForm')[0].reset(); $('.successLabel').show(); }, error: function () { alert("Something went wrong!"); $('.errorLabel').show(); } }); }); function log(path){ //alert(path); var controller = 'webapp/Customer'; var base_url = '<?php echo site_url(); ?>'; $.ajax({ 'url' : base_url + controller + '/log/' + path, 'type' : 'POST', 'success' : function(data){ console.log(data); $('.tot').html(''); $('.tot').html(data); } }); } $(".aprv").click(function(){ var checkboxes = $("input[type='checkbox']"); if(checkboxes.is(":checked")){ //alert("checked"); if (confirm('Are You Sure?')) { return true; } else { return false; } }else{ alert("select at least one checkbox"); return false; } }); </script> <script> $(document).ready(function() { $(".bank").click(function() { var status = []; $.each($(".vt:checked"), function() { //status.push($(this).val()); var st = $(this).attr('data-status'); status.push(st); }); $('#bank').modal('show').on('shown.bs.modal', function() { //$("#getStatus").html("status are: " + status.join(",")); //$('#sts').val(status); var names = status; var nameArr = names.toString().split("|"); var arrr = nameArr.toString().split(","); $.each(arrr , function(index, val) { //console.log(index, val) $("."+val).hide(); }); }); }); }); $(document).ready(function() { $(".cheque").click(function() { var status = []; $.each($(".vt:checked"), function() { //status.push($(this).val()); var st = $(this).attr('data-status'); status.push(st); }); $('#cheque').modal('show').on('shown.bs.modal', function() { //$("#getStatus").html("status are: " + status.join(",")); //$('#sts').val(status); var names = status; //var nameArr = names.toString().split("|"); var arrr = names.toString().split(","); var newArray = arrr.filter(function(v){return v!==''}); $.each(newArray , function(index, val) { //console.log(index, val); //alert("."+val); $("."+val).hide(); }); }); }); }); function check(path, obj){ //alert(check); return false; var stage = $('.stage').val(); var year = $('.year').val(); var month = $('.month').val(); var path = path; var controller = 'webapp/office/check_fs/'; var base_url = '<?php echo site_url(); ?>'; $.ajax({ 'url' : base_url + controller, 'type' : 'POST', data : {stage:stage, year:year, month:month, path:path}, 'success' : function(data){ console.log(data); if(data == 'pending'){ alert('Submission pending by other user'); obj.prop('checked', false); // Unchecks it } /* $('.tot').html(''); $('.tot').html(data);*/ } }); }; </script>
Copyright ©2021 || Defacer Indonesia