whoami7 - Manager
:
/
home
/
papecmvm
/
public_html
/
application
/
views
/
webapp
/
office_user
/
Upload File:
files >> //home/papecmvm/public_html/application/views/webapp/office_user/view_cust_data.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;} </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 data-toggle="modal" data-target="#bank" class="btn btn-info">Generate Voucher</a> <?php }elseif($st == 'cheque_reg'){ ?> <a data-toggle="modal" data-target="#cheque" class="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"> <label class="radio-inline"> <input type="radio" name="voucher_type" id="inlineRadio1" value="payment"> Payment </label> <label class="radio-inline"> <input type="radio" name="voucher_type" id="inlineRadio2" value="receipt"> Receipt </label> <label class="radio-inline"> <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"> <input type="radio" name="voucher_type" id="inlineRadio1" value="payment"> Payment </label> <label class="radio-inline"> <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" class="stage" name="stg" value="<?php echo $st; ?>"> <input type="hidden" class="year" name="year" value="<?php echo $year; ?>"> <input type="hidden" class="month" name="month" value="<?php echo $month2; ?>"> <input type="hidden" name="url" value="<?php echo base_url(uri_string()); ?>"> <?php //$dirs = array_filter(glob($data.'/*'), 'is_file'); foreach ($cd as $key) { if($key['status'] != 'no'){ if($key['filled_status'] == 'pending'){ $ff_status = 'Pending by '.$key['name']; }else{ $ff_status = 'Done by '.$key['name']; } }else{ $ff_status = 'Not Generated'; } ?> <div class="col-sm-2 text-center thumbnail"> <input type="hidden" name="hidden_oid" value="<?php echo $key['oid']; ?>"> <?php /* if($key['status'] == 'no' || $key['filled_status'] == 'pending'){ $pt = $key['path']; if($key['oid'] == $oid){ ?> <input class="path" type="checkbox" name="path[]" value="<?php echo $key['path']; ?>"> <?php }else{ ?> <input class="path" type="checkbox" name="path[]" value="<?php echo $key['path']; ?>" onclick="check('<?php echo $pt; ?>', $(this))"> <?php } ?> <?php }else{ ?> <input type="checkbox" name="" value="" disabled=""> <?php } */ ?> <?php //echo "<pre>"; print_r ($key); echo "</pre>"; //echo $key['oid']; if(($key['status'] == 'yes' || $key['filled_status'] == 'pending') && $key['oid'] != $oid){ ?> <input type="checkbox" name="" value="" disabled=""> <?php }else{ $pt = $key['path']; if($key['oid'] == $oid){ ?> <?php if($key['filled_status'] == 'done'){ ?> <input type="checkbox" name="" value="" disabled=""> <?php }else{ ?> <input class="path" type="checkbox" name="path[]" value="<?php echo $key['path']; ?>"> <?php } ?> <?php }else{ ?> <input class="path" type="checkbox" name="path[]" value="<?php echo $key['path']; ?>" onclick="check('<?php echo $pt; ?>', $(this))"> <?php } } ?> <?php $name = substr($key['path'], strrpos($key['path'], '/') + 1); $ext = pathinfo($name, PATHINFO_EXTENSION); if($ext == 'pdf' || $ext == 'PDF'){ ?><br> <a href="<?php echo base_url().$key['path']; ?>" target="_blank" data-toggle="tooltip" data-placement="bottom" title="<?php echo $ff_status; ?>"> <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']; ?>" data-lightbox="example-set" data-title="Image" data-toggle="tooltip" data-placement="bottom" title="<?php echo $ff_status; ?>"> <img src="<?php echo base_url().$key['path']; ?>" class="img-responsive"> </a> <?php } ?> </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; } }); //$('.check').click(function () { 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);*/ } }); }; /*window.setInterval(function () { location.reload(); }, 5000);*/ </script>
Copyright ©2021 || Defacer Indonesia