-
Notifications
You must be signed in to change notification settings - Fork 0
/
v_dashboard_new.php
370 lines (337 loc) · 14.5 KB
/
v_dashboard_new.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="../../../../../almazing/application/modules/dashboard/views/assets/img">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>e-Payment System</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
<link href="<?php echo base_url().'css/bootstrap.min.css' ?>" rel="stylesheet" type="text/css">
<link href="<?php echo base_url().'css/font-awesome.min.css' ?>" rel="stylesheet" type="text/css">
<link href="<?php echo base_url().'css/ionicons.min.css' ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url().'css/datatables/dataTables.bootstrap.css' ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url().'css/daterangepicker/daterangepicker-bs3.css' ?>" rel="stylesheet">
<link href="<?php echo base_url().'css/load.css' ?>" rel="stylesheet" type="text/css">
<link href="<?php echo base_url().'css/AdminLTE.css' ?>" rel="stylesheet" type="text/css">
</head>
<body class="skin-blue">
<div id="loading" style="display:none"></div>
<!-- header logo: style can be found in header.less -->
<header class="header">
<a href="<?php echo site_url().'home' ?>" class="logo">
<!-- Add the class icon to your logo image or logo icon to add the margining -->
JNE e-payment
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" title="Sisa Poin"><?php echo 'BRANCH : '.$this->session->userdata('branch')?></a>
</li>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
<span><?php echo $this->session->userdata('user')?> <i class="caret"></i></span>
</a>
<ul class="dropdown-menu">
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="#" class="btn btn-default btn-flat">Profile</a>
</div>
<div class="pull-right">
<a href="<?php echo site_url().'log_out'?>" class="btn btn-default btn-flat">Sign out</a>
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
<!-- Left side column. contains the logo and sidebar -->
<aside class="left-side sidebar-offcanvas">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- search form -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" disabled/>
<span class="input-group-btn">
<button type='submit' name='seach' id='search-btn' class="btn btn-flat"></button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="active">
<a href="<?php echo site_url().'home'?>">
<i class="fa fa-money"></i> <span>Payment</span>
</a>
</li>
<li>
<a href="<?php echo site_url().'history'?>">
<i class="fa fa-calendar"></i> <span>History</span>
</a>
</li>
<li>
<a href="<?php echo site_url().'report'?>">
<i class="fa fa-list-alt"></i> <span>Report</span>
</a>
</li>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Right side column. Contains the navbar and content of the page -->
<aside class="right-side">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
System
<small>Control panel</small>
</h1>
</section>
<!-- Main content -->
<section class="content">
<?php echo $this->load->view($main_view)?>
</section><!-- /.content -->
</aside><!-- /.right-side -->
</div>
<script>
var getDataScan = "<?php echo site_url().'payment/c_payment/cek_data'?>";
var url_get_count = "<?php echo site_url().'payment/c_payment/count'?>";
var getDataType = "<?php echo site_url().'payment/c_payment/data_type'?>";
var url_get_data = "<?php echo site_url().'payment/c_payment/get_data'?>";
var url_get_amount = "<?php echo site_url().'payment/c_payment/amount'?>";
var url_get_cnote = "<?php echo site_url().'payment/c_payment/list_cnote'?>";
var proses = "<?php echo site_url().'payment/c_payment/proses'?>";
var url_cekCd = "<?php echo site_url().'payment/c_payment/cek_cd'?>";
</script>
<script src="<?php echo base_url().'js/jquery.min.js' ?>"></script>
<script src="<?php echo base_url().'js/bootstrap.min.js' ?>"></script>
<script src="<?php echo base_url().'js/plugins/datatables/jquery.dataTables.js' ?>" type="text/javascript"></script>
<script src="<?php echo base_url().'js/plugins/datatables/dataTables.bootstrap.js' ?>" type="text/javascript"></script>
<script src="<?php echo base_url().'js/plugins/input-mask/jquery.inputmask.js' ?>" type="text/javascript"></script>
<script src="<?php echo base_url().'js/plugins/input-mask/jquery.inputmask.date.extensions.js' ?>" type="text/javascript"></script>
<script src="<?php echo base_url().'js/plugins/input-mask/jquery.inputmask.extensions.js' ?>" type="text/javascript"></script>
<script src="<?php echo base_url().'js/plugins/daterangepicker/daterangepicker.js' ?>"></script>
<script src="<?php echo base_url().'js/AdminLTE/app.js' ?>"></script>
<script src="<?php echo base_url().'js/my_script.js' ?>"></script>
<script>
// var ppm = setInterval(function(){
// $.ajax({
// type : "POST",
// url : url_get_data,
// //data : '',
// success : function(data){
// $("#cnote").html(data);
// }
// });
// },500);
// var ppm = setInterval(function(){
// $.ajax({
// type : "POST",
// url : url_get_count,
// //data : '',
// success : function(data){
// $("#jum").html(data);
// }
// });
// },500);
// var ppm = setInterval(function(){
// $.ajax({
// type : "POST",
// url : url_get_amount,
// //data : '',
// success : function(data){
// $("#vamount").html(data);
// $("#amount").html(data);
// }
// });
// },500);
// var ppm = setInterval(function(){
// $.ajax({
// type : "POST",
// url : url_get_cnote,
// //data : '',
// success : function(data){
// $("#dataCnote").html(data);
// }
// });
// },500);
// var ppm = setInterval(function(){
// var trans_no = $("#trans_no").val();
// var datastring = "trans_no=" + trans_no;
// $.ajax({
// type : "POST",
// url : url_cekCd,
// data : datastring,
// success : function(data){
// if(data != ''){
// window.location.assign("https://e-payment.jne.co.id/wait/"+data);
// }
// }
// });
// },7000);
function get_data() {
$.ajax({
type: "POST",
url: url_get_data,
success: function(data) {
$("#cnote").html(data);
}
});
}
function get_count() {
$.ajax({
type : "POST",
url : url_get_count,
//data : '',
success : function(data){
$("#jum").html(data);
}
});
}
function get_amount() {
$.ajax({
type : "POST",
url : url_get_amount,
//data : '',
success : function(data){
$("#vamount").html(data);
$("#amount").html(data);
}
});
}
function get_cnote() {
$.ajax({
type : "POST",
url : url_get_cnote,
//data : '',
success : function(data){
$("#dataCnote").html(data);
}
});
}
function cek_cd(trans_no) {
var datastring = "trans_no=" + trans_no;
$.ajax({
type : "POST",
url : url_cekCd,
data : datastring,
success : function(data){
if(data != ''){
window.location.assign("https://e-payment.jne.co.id/wait/"+data);
}
}
});
}
function refresh_data() {
get_data();
get_count();
get_amount();
get_cnote();
}
function scan_new(no_scan){
var datastring = "no_scan=" + no_scan;
$.ajax({
type :'POST',
url : getDataScan,
data : datastring,
dataType:'json',
success : function(data){
if(data == 0){
$('#myNotif').modal('show');
}else if(data == 2){
$('#myNotifEr').modal('show');
}else if(data == 3){
$('#myNotifEr2').modal('show');
}else{
$("#no_scan").val('');
$("#payer").val(data.satu);
$("#phone").val(data.dua);
refresh_data();
}
}
});
}
$(function() {
$("#example1").dataTable({
"aaSorting": [[ 1, "desc" ]],
});
refresh_data();
$("#no_scan").bind('blur keyup', function(e) {
if(e.type === 'keyup' && e.keyCode !== 10 && e.keyCode !== 13) return;
var cnote = $(this).val();
if (cnote != '') {
scan_new(cnote);
}
});
//Datemask dd/mm/yyyy
$("#datemask").inputmask("dd/mm/yyyy", {"placeholder": "dd/mm/yyyy"});
//Datemask2 mm/dd/yyyy
$("#datemask2").inputmask("mm/dd/yyyy", {"placeholder": "mm/dd/yyyy"});
//Money Euro
$("[data-mask]").inputmask();
//Date range picker
$('#reservation').daterangepicker();
//Date range picker with time picker
$('#reservationtime').daterangepicker({timePicker: true, timePickerIncrement: 30, format: 'MM/DD/YYYY h:mm A'});
//Date range as a button
$('#daterange-btn').daterangepicker(
{
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
'Last 7 Days': [moment().subtract('days', 6), moment()],
'Last 30 Days': [moment().subtract('days', 29), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
startDate: moment().subtract('days', 29),
endDate: moment()
},
function(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
);
//iCheck for checkbox and radio inputs
$('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
checkboxClass: 'icheckbox_minimal',
radioClass: 'iradio_minimal'
});
//Red color scheme for iCheck
$('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
checkboxClass: 'icheckbox_minimal-red',
radioClass: 'iradio_minimal-red'
});
//Flat red color scheme for iCheck
$('input[type="checkbox"].flat-red, input[type="radio"].flat-red').iCheck({
checkboxClass: 'icheckbox_flat-red',
radioClass: 'iradio_flat-red'
});
//Colorpicker
//$(".my-colorpicker1").colorpicker();
//color picker with addon
//$(".my-colorpicker2").colorpicker();
//Timepicker
//$(".timepicker").timepicker({
// showInputs: false
//});
});
</script>
</body>
</html>