whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
webapp
/
customer
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/views/webapp/customer/dashbord.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')); ?> <style type="text/css"> .box-header.with-border { border-bottom: 1px solid #e3e3e3; } .upload{ display:none!important; } .label{ padding: 0.2em 0.3em 0.2em 0.3em; } .label-purchase{background-color: #d81b60 ;} .label-sales{background-color: #605ca8;} .label-payment{background-color: #001f3f;} .label-receipt{background-color: #ff851b;} .label-contra{background-color: #3d9970;} .label-journal{background-color: #3c8dbc;} .file-body ul li a{width: auto!important; margin-right: 10px;} .nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav-pills>li.active>a:hover{ background-color: #f2dede; } .nav-stacked>li.active>a, .nav-stacked>li.active>a:hover{ border-left-color: #f25858; } .nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav-pills>li.active>a:hover{ color: #f25858!important; } </style> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Dashboard </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> </ol> <?php if($this->session->flashdata('msg')){ echo $this->session->flashdata('msg'); } ?> </section> <!-- Main content --> <section class="content"> <?php /* <div class="row"> <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-aqua"><i class="ion ion-ios-gear-outline"></i></span> <div class="info-box-content"> <span class="info-box-text">Settings</span> <span class="info-box-number">90<small>%</small></span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-red"><i class="fa fa-google-plus"></i></span> <div class="info-box-content"> <span class="info-box-text">Likes</span> <span class="info-box-number">41,410</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <!-- fix for small devices only --> <div class="clearfix visible-sm-block"></div> <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-green"><i class="ion ion-ios-cart-outline"></i></span> <div class="info-box-content"> <span class="info-box-text">Sales</span> <span class="info-box-number">760</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box"> <span class="info-box-icon bg-yellow"><i class="ion ion-ios-people-outline"></i></span> <div class="info-box-content"> <span class="info-box-text">Customers</span> <span class="info-box-number">2,000</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> </div> */ ?> <div class="row"> <div class="row"> <div class="col-sm-8"> <div class="col-sm-12"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title text-primary text-capitalize"> <strong><?php $incr_obj=$cur_year+1; $incr_obj = substr($incr_obj, -2); echo $cur_month.' '.$cur_year.'-'.$incr_obj; ?> </strong> </h3> </div> </div> </div> <?php $code = $userdata[0]['folder_code']; //$entries = ['purchase_invoices', 'sales_invoices', 'cash_payment', 'cash_receipt', 'cheque_paid', 'expense_vouchers', 'debit_notes', 'credit_notes', 'bank_statements', 'cheque_deposited', 'reports', 'others']; $obj_arr = json_decode($struct['stage'], 'TRUE'); $k=0; foreach($obj_arr as $k => $v){ $k++; ?> <div class="col-sm-4"> <div class="box box-primary"> <div class="box-header with-border"> <!--<span data-toggle="tooltip" title="" class="badge bg-yellow pull-right" data-original-title="Alavilable Files">0</span>--> <h3 class="box-title text-blue"> <strong><?php echo strtoupper(str_replace('_', ' ', $v)); ?></strong></h3> </div> <div class="box-body"> <?php $arrayDetail = array( 'code' => $code, 'stage' => $v, 'year' => $cur_year, 'month' => getMonth($cur_month) ); $ad = urlencode(serialize($arrayDetail)); ?> <a href='<?php echo base_url().'webapp/customer/view_files/'.$ad; ?>' class="btn btn-success btn-sm"> <i class="fa fa-eye" aria-hidden="true"></i> </a> <!--<a href="#" class="upload_link"><i class="fa fa-plus-square" aria-hidden="true"></i></a>--> <!-- Button trigger modal --> <?php if($v != 'reports'){ ?> <button title="Upload File" type="button" class="up-btn btn btn-info pull-right btn-sm" data-toggle="modal" data-target="#<?php echo $v; ?>"> <i class="fa fa-upload" aria-hidden="true"></i> </button> <?php } ?> <!-- Modal --> <div class="modal fade" id="<?php echo $v; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <form action="<?php echo base_url().'webapp/customer/upload'; ?>" class="browseForm<?php echo $k; ?>" enctype="multipart/form-data" method="post" accept-charset="utf-8"> <!-- <form class="form-horizontal contactForm_"> --> <input type="hidden" name="dash_url" value="dash_url"> <input type="hidden" name="code" value="<?php echo $code; ?>"> <input type="hidden" name="stage" value="<?php echo $v; ?>"> <input type="hidden" name="year" value="<?php echo $cur_year; ?>"> <input type="hidden" name="month" value="<?php echo getMonth($cur_month); ?>"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button> <h4 class="modal-title" id="myModalLabel">Select File</h4> </div> <div class="modal-body"> <input required="" class="mydoc" id="doc<?php echo $k; ?>" type="file" name="doc[]" multiple="" accept=".png, .jpg, .jpeg, .pdf, .csv, .xls, .xlsb, .xlsx"> </div> <div class="modal-footer" style="text-align:left"> <div class="pull-right"> <progress id="progressBar" value="0" max="100" style="width:300px; display:none;"></progress> <p><strong id="status_<?php echo $k; ?>"></strong> <span id="loaded_n_total"></span></p> </div> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary save-btn" onclick='uploadFile(<?php echo $k.', "'.$v.'"'; ?>)'>Save changes</button> </div> </form></div> <!--</form>--> </div> </div> </div><!-- /.box-body --> <div class="box-footer"> <strong>Status:</strong> <span id="status2_<?php echo $k; ?>"></span> </div> </div> </div> <?php } ?> </div><!--col--> <div class="col-xs-12 col-sm-12 col-md-4"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title text-blue"><strong>Reports</strong></h3> </div> <div class="box-body"> <ul class="nav nav-pills nav-stacked"> <li class="active"><a target="_blank" href="<?php echo base_url().'webapp/attachment/Balance sheet1.pdf' ?>"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> Balance sheet</a></li> <li class="active"><a target="_blank" href="<?php echo base_url().'webapp/attachment/income statement.pdf' ?>"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> <!--Income Statement-->Profit & Loss</a></li> <li class="active"><a target="_blank" href="<?php echo base_url().'webapp/attachment/Invoice tracker.pdf' ?>"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> <!--Invoice Tracker-->Receivable/Payable Report</a></li> <li class="active"><a target="_blank" href="<?php echo base_url().'webapp/attachment/Ratio-Analysis-Template.pdf' ?>"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> Ratio Analysis <!--Template--></a></li> <li class="active"><a target="_blank" href="<?php echo base_url().'webapp/attachment/Stock Report.pdf' ?>"><i class="fa fa-file-pdf-o" aria-hidden="true"></i> Stock Report</a></li> </ul> </div> </div> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title text-blue"><strong>Templates</strong></h3> </div> <div class="box-body"> <ul class="nav nav-pills nav-stacked"> <?php foreach($templates as $k_temp => $v_temp){ $path = $v_temp["ct_code"].'/Templates/'.$v_temp["ct_filename"]; ?> <li class="active"><a href="https://paperpushbucket.s3.ap-south-1.amazonaws.com/<?php echo $path; ?>"> <?php echo $v_temp['ct_filename']; ?></a></li> <?php } ?> </ul> </div> </div> </div> </div><!--row--> </div><!--row--> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php function getMonth($month){ if($month == 'april'){return 'a_april';}elseif($month == 'may'){return 'b_may';}elseif($month == 'june'){return 'c_june';} elseif($month == 'july'){return 'd_july';}elseif($month == 'august'){return 'e_august';}elseif($month == 'september'){return 'f_september';}elseif($month == 'october'){return 'g_october';} elseif($month == 'november'){return 'h_november';}elseif($month == 'december'){return 'i_december';}elseif($month == 'january'){return 'j_january';}elseif($month == 'february'){return 'k_february';} elseif($month == 'march'){return 'l_march';} } require_once(APPPATH.'views/webapp/footer.php');?> <script> /* Script written by Adam Khoury @ DevelopPHP.com */ /* Video Tutorial: http://www.youtube.com/watch?v=EraNFJiY0Eg */ function _(el){ return document.getElementById(el); } function uploadFile(cnt, stage){ // alert(file.name+" | "+file.size+" | "+file.type); alert("Please don't close OR change this tab to see progress bar"); $('.up-btn').hide(); $('.save-btn').hide(); $('#'+stage).modal('hide'); var formdata = new FormData(); $.each($("#doc"+cnt)[0].files, function(i, file) { formdata.append('doc[]', file); }); var other_data = $('.browseForm'+cnt).serializeArray(); $.each(other_data,function(key,input){ formdata.append(input.name,input.value); }); var ajax = new XMLHttpRequest(); // ajax.upload.addEventListener("progress", progressHandler, false); ajax.upload.addEventListener("progress", function(event){ //console.log(event); console.log("test");console.log(cnt); $('#progressBar').show(); _("loaded_n_total").innerHTML = "(Uploaded "+event.loaded+" bytes of "+event.total+")"; var percent = (event.loaded / event.total) * 100; _("progressBar").value = Math.round(percent); _("status_"+cnt).innerHTML = "<span class='text-danger'>"+Math.round(percent)+"% uploaded... wait</span>"; _("status2_"+cnt).innerHTML = "<span class='text-danger'>"+Math.round(percent)+"% uploaded... wait</span>"; }, false); ajax.addEventListener("load", function(event){ _("status_"+cnt).innerHTML = '<span class="text-success">File upload completed</span>'; _("status2_"+cnt).innerHTML = '<span class="text-success">File upload completed</span>'; //_("status").innerHTML = event.target.responseText; _("progressBar").value = 0; $('.up-btn').show(); $('.save-btn').show(); $('.mydoc').val(''); $('#progressBar').hide(); }, false); ajax.addEventListener("error", errorHandler, false); ajax.addEventListener("abort", abortHandler, false); ajax.open("POST", "<?php echo base_url(); ?>webapp/customer/upload"); ajax.send(formdata); } /*function progressHandlerOld(event){ console.log(event); $('#progressBar').show(); _("loaded_n_total").innerHTML = "(Uploaded "+event.loaded+" bytes of "+event.total+")"; var percent = (event.loaded / event.total) * 100; _("progressBar").value = Math.round(percent); _("status").innerHTML = Math.round(percent)+"% uploaded... wait"; _("status2").innerHTML = Math.round(percent)+"% uploaded... wait"; }*/ function completeHandlerOld(event){ _("status").innerHTML = 'File upload completed'; _("status2").innerHTML = 'File upload completed'; //_("status").innerHTML = event.target.responseText; _("progressBar").value = 0; $('.up-btn').show(); $('.save-btn').show(); $('.mydoc').val(''); $('#progressBar').hide(); } function errorHandler(event){ _("status").innerHTML = "Upload Failed"; } function abortHandler(event){ _("status").innerHTML = "Upload Aborted"; } </script>
Copyright ©2021 || Defacer Indonesia