-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
205 lines (195 loc) · 9.22 KB
/
profile.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
<?php
include("meta.php");
include("header.php");
include("function/jcd-umum.php");
$iplist = getUserIP2().','.getUserIP2('HTTP_CLIENT_IP').','.getUserIP2('HTTP_X_FORWARDED_FOR').','.getUserIP2('REMOTE_ADDR');
if (isset($_POST["reset_pin"])){
$reqAPIResetPin = array(
"auth" => $authapi,
"domain" => $nonWWW,
"ip" => $iplist,
"device" => $device,
"type" => 1,
"userid" => $login,
);
$respResetPin = sendAPI($url_Api."/account",$reqAPIResetPin,'JSON','02e97eddc9524a1e');
if($respResetPin->status == 500){
$error = $respResetPin->msg;
}else{
$_SESSION["pin"]="";
exit ("<script>window.location='../index.php'</script>");
}
}
if(isset($_POST["submit"])){
$uname = $login;
$old = $_POST["old"];
$new1 = $_POST["new1"];
$new2 = $_POST["new2"];
$bano = $_POST["bano"];
$capt = $_POST["captcha"];
if (! checkCaptcha('CAPTCHAString', $capt)){
$errorReport = "<div class='error-report'>Validasi anda salah.</div>";
$err = 1;
}elseif ($capt == ''){
$errorReport = "<div class='error-report'>Validasi anda salah.</div>";
$err = 1;
}else{
$reqAPIResetPass = array(
"auth" => $authapi,
"domain" => $nonWWW,
"ip" => $iplist,
"device" => $device,
"type" => 2,
"userid" => $login,
"oldpass" => $old,
"npass" => $new1,
"cnpass" => $new2,
'bano' => $bano,
);
$respResetPass = sendAPI($url_Api."/account",$reqAPIResetPass,'JSON','02e97eddc9524a1e');
if($respResetPass->status == 500){
$errorReport = "<div class='error-report'>".$respResetPass->msg."</div>";
}else{
?>
<script>
alert("Sukses ganti password,Silakan Login kembali.");
</script>
<?php
echo "<script>document.location='../logout.php'</script>";
}
}
}
?>
<div id="content">
<div class="container">
<div class="clear space_30"></div>
<div class="wrap">
<div class="full">
<div class="head-wrap">
<h1>Profil</h1>
</div>
<div class="body-wrap">
<form class="form-horizontal" role="form" method="POST">
<?php
if(!isset($errorReport)){$errorReport = '';}
if(!isset($successRegister)){$successRegister = '';}
if ($errorReport){
?>
<div class="alert alert-danger">
<?php
echo $errorReport;
?>
</div>
<?php
}
if ($successRegister){
?>
<div class="alert alert-success">
<?php
echo $successRegister;
?>
</div>
<?php
}
?>
<div class="form-group-full">
<label class="col-lg-1 control-label">user ID </label>
<div class="col-lg-2">
<div class="text-left bold pt7 normal">
<?php echo strtoupper($user_login);?>
</div>
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">game ID</label>
<div class="col-lg-2">
<div class="text-left bold pt7 normal">
<?php echo strtoupper($login);?>
</div>
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">Authcode</label>
<div class="col-lg-2">
<div class="text-left bold pt7 normal">
<?php if(!isset($user_authcode)){$user_authcode = '';} echo $user_authcode;?>
</div>
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">Gambar Avatar</label>
<div class="col-lg-1">
<div class="avatar-default">
<?php
$myDir = substr($login,0,1);
$img_avatar = $path."/avatar/".$myDir."/".$login.".jpg?hi=".date("is");
?>
<div class="avatar" style="background: url(<?php echo $img_avatar?>) no-repeat;background-size:123px 123px;"></div>
</div>
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label"></label>
<div class="col-lg-2">
<div class="text-left bold pt7 normal">
<a href="game-avatar.php">Ganti Avatar</a>
</div>
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">Password Lama</label>
<div class="col-lg-2">
<input type="password" name="old" placeholder="Old Password" data-required="true" class="form-control">
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">Password Baru</label>
<div class="col-lg-2">
<input type="password" name="new1" placeholder="New Password" data-required="true" class="form-control">
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">Konfirmasi Password</label>
<div class="col-lg-2">
<input type="password" name="new2" placeholder="Confirm Password" data-required="true" class="form-control">
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">No Rekening Bank</label>
<div class="col-lg-3">
<?php
$bankno = substr(str_replace('-', '', $bankaccnodis), 0, -4);
$bankdisplay = bank_format($bankno, $bankname);
?>
<input type="text" class="form-control" value="<?php echo substr($bankdisplay, 0, -1); ?>" disabled style="width: 270px"> -
<input type="password" class="form-control" placeholder="4 Digit" maxlength="4" onKeypress="if (event.keyCode < 48 || event.keyCode > 57 || event.keyCode == 13) { if (event.keyCode == 42 || event.keyCode == 13) event.returnValue=true; else event.returnValue = false; }" name='bano' style="width: 115px">
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label">Captcha</label>
<div class="col-lg-3">
<img src='captcha/captcha.php?.png?a=1' alt='CAPTCHA' class="form-captcha"/>
</div>
</div>
<div class="form-group-full">
<label class="col-lg-1 control-label"></label>
<div class="col-lg-3">
<input type="text" name="captcha" placeholder="Validation" data-required="true" class="form-control">
</div>
</div>
<div class="line m-t-large"></div>
<div class="space_10"></div>
<div class="form-group-full">
<button type="submit" name="submit" value="SUBMITS" class="btn btn-submit">Ganti Password</button>
<button type="submit" name="reset_pin" value="SUBMITS" class="btn btn-submit">Reset Pin</button>
</div>
</form>
</div>
</div>
</div>
<div class="clear space_30"></div>
</div>
</div>
<?php
include("footer.php");
?>