-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathovo.php
147 lines (142 loc) · 4.72 KB
/
ovo.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
<?PHP
$auto_connect = 1; //auto connect database;
require_once("config.php");
require_once("_/_session.php");
if(isset($_REQUEST['act'])){
require_once("_act/_ovo.php");
}else{
$csrf = $app->csrf();
}
?>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Daftar OVO - <?PHP echo $c_name; ?></title>
<?PHP require_once("_/css.php")?>
</head>
<body class="with-side-menu">
<?PHP require_once("_/header.php"); ?>
<?PHP require_once("_/sidebar.php"); ?>
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class='col-md-12 col-xs-12 col-lg-12'>
<?PHP
if(isset($_GET['e'],$_SERVER['HTTP_REFERER'])){
?>
<div class="alert alert-danger alert-fill alert-close alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<i class="font-icon font-icon-inline font-icon-warning"></i>
<strong>Ada Masalah!!</strong><br>
<?PHP echo $_SESSION['error_msg']; ?>
</div>
<?PHP } ?>
<?PHP
if(isset($_GET['s'],$_SERVER['HTTP_REFERER'])){
?>
<div class="alert alert-success alert-fill alert-close alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<i class="fa fa-check"></i>
<strong>Berhasil!!</strong><br>
<?PHP echo $_SESSION['success_msg']; ?>
</div>
<?PHP } ?>
<section class="card card-green mb-3">
<header class="card-header">
Masukan Akun Ovo baru untuk transfer bank
</header>
<div class="card-block">
<form action='' method='post'>
<div class="row">
<div class="col-lg-12 col-md-12">
<fieldset class="form-group">
<label class="form-label">Nomor Ovo</label>
<input name='nomor' type="text" class="form-control" placeholder="0859xxxx" required>
</fieldset>
<fieldset class="form-group">
<label class="form-label">Nama Ovo</label>
<input name='nama' type="text" class="form-control" placeholder="DEWA (IN-OUT)" required>
</fieldset>
</div>
</div>
<input type='hidden' name='csrf' value='<?PHP echo $csrf; ?>'/>
<input type='hidden' name='act' value='add'/>
<button class='btn btn-success'>Simpan</button>
</form>
<hr>
<form action='' method='post'>
<div class='alert alert-success'>
Gunakan ini untuk pencatatan topup ke akun ovo
</div>
<div class="row">
<div class="col-lg-6 col-md-6">
<fieldset class="form-group">
<label class="form-label">Pilih Akun OVO</label>
<select name='ovo_id' class='form-control'>
<?PHP
$all = $db->fetch_multiple("select id,number,name from ovo_bank order by id desc");
foreach($all as $a){
echo "<option value='$a[id]'>$a[number] [ $a[name] ]</option>";
}
?>
</select>
</fieldset>
</div>
<div class='col-lg-6 col-md-6'>
<fieldset class="form-group">
<label class="form-label">Masukan Nominal Topup</label>
<input name='nominal' type="text" class="form-control" placeholder="100000" required>
</fieldset>
</div>
</div>
<input type='hidden' name='csrf' value='<?PHP echo $csrf; ?>'/>
<input type='hidden' name='act' value='topup'/>
<button class='btn btn-success'>Simpan</button>
</form>
</div>
</section>
<section class="card card-blue mb-3">
<header class="card-header">
Semua Daftar OVO Bank
</header>
<div class="card-block">
<span class="flash"></span>
<div id="pageData"></div>
</div>
</section>
</div>
</div>
</div><!--.container-fluid-->
</div><!--.page-content-->
<?PHP require_once("_/js.php"); ?>
<script>
$(document).ready(function(){
changePagination('1', 'all', '');
});
function changePagination(page, action, q){
$(".flash").show();
$(".flash").fadeIn(400).html
('Loading...');
var dataString = 'page='+ page;
dataString = dataString + '&action='+action+'&q='+q;
$.ajax({
type: "POST",
url: "ajax/load_ovo.php",
data: dataString,
cache: false,
success: function(result){
$(".flash").hide();
$("#pageData").html(result);
}
});
}
</script>
</body>
</html>