forked from FALL1N1/User-Control-Panel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_playerside.php
183 lines (173 loc) · 7.43 KB
/
_playerside.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
<?php
include_once('_template/_header.php');
if(!_getUsername())
Header('Location: index.php');
$AuthConnection = _MySQLConnect($AccountDBHost, $DBUser, $DBPassword, $AccountDB);
echo "<script type = 'text/javascript'>";
if(!_isGMAllowed($AuthConnection)) {
echo "
function DoCancel( id, Realm, Guid ) {
$.ajax({
type : 'POST',
url : '_transfer/b_cancel.php',
data : {
cancel : id,
RealmlistList : Realm,
GUID : Guid
},
success : function( data ) {
$( '#' + id ).hide( );
location.reload( true );
alert( data );
},
error : function( XMLHttpRequest, textStatus, errorThrown ) {
alert( textStatus + ' -- ' + errorThrown );
}
});
}";
} else {
echo "
function DoApprove( id, Realm, Guid ) {
$.ajax({
type : 'POST',
url : '_transfer/b_approve.php',
data : {
ID : id,
R : Realm,
GUID : Guid
},
success : function( data ) {
$( '#' + id ).hide( );
location.reload( true );
alert( data );
},
error : function( XMLHttpRequest, textStatus, errorThrown ) {
alert( textStatus + ' -- ' + errorThrown );
}
});
}
function DoDeny( id, Realm, Guid ) {
var Reason = prompt( 'Reason:', '' );
$.ajax({
type : 'POST',
url : '_transfer/b_deny.php',
data : {
ID : id,
R : Realm,
GUID : Guid,
REALSON : Reason,
},
success : function( data ) {
$( '#' + id ).hide( );
location.reload( true );
alert( data );
},
error : function( XMLHttpRequest, textStatus, errorThrown ) {
alert( textStatus + ' -- ' + errorThrown );
}
});
}
function DoResend( id, Realm, Guid ) {
$.ajax({
type : 'POST',
url : '_transfer/b_resend.php',
data : {
ID : id,
R : Realm,
GUID : Guid,
},
success : function( data ) {
$( '#' + id ).hide( );
location.reload( true );
alert( data );
},
error : function( XMLHttpRequest, textStatus, errorThrown ) {
alert( textStatus + ' -- ' + errorThrown );
alert( data );
}
});
}";
}
echo "</script>";
if (isset($_POST['load'])) $step = 1;
else if(isset($_POST['rename'])) $step = 2;
else $step = 3;
switch($step) {
case 1: include('_transfer/step1.php'); break;
case 2: include('_transfer/step2.php'); break;
case 3: _flushStatisticTable($AuthConnection, $GMLevel);
break;
}
include_once('_template/_footer.php');
ob_end_flush();
function _flushStatisticTable($connection, $GMLevel)
{
global $L;
echo "<fieldset>";
if(_isGMAllowed($connection)) {
$query = mysql_query("SELECT * FROM `account_transfer` WHERE `gmAccount` = ". _getAccountID() ." ORDER BY `id` DESC LIMIT 9;", $connection) or die(mysql_error());
echo _BDiv($L[27] ."
<button class = 'btn btn-success'>". $L[13] ."</button>
<button class = 'btn btn-danger'>". $L[14] ."</button>
<button class = 'btn btn-warning'>". $L[15] ."</button>
". $L[28]) ."
<br/>
<table class = 'table table-condensed'>
<tr class = 'menuBar'>
<td>'OUR' & 'OLD' Name: </td>
<td>'OUR' & 'OLD' Realm: </td>
<td>Realmlist: </td>
<td>Account: </td>
<td>Password: </td>
<td>Admin Options: </td>
</tr>";
while($row = mysql_fetch_array($query)) {
if($row["cStatus"] == 0) {
echo "
<tr>
<td>". $row["cNameNEW"] ." / ". $row["cNameOLD"] ."</td>
<td>". _getRealmNameFromID($connection, $row["cRealm"]) ." / ". $row["oRealm"] ."</td>
<td><a href = '".$row["oServer"]."'>". $row["oRealmlist"] ."</a></td>
<td>". $row["oAccount"] ."</td>
<td>". base64_decode($row["oPassword"]) ."</td>
<td width = 240px class = 'text-center'>
<button class = 'btn btn-success' name = 'Approve' id = '".$row["id"]."' onclick = \"DoApprove('".$row["id"]."', '".$row["cRealm"]."', '".$row["GUID"]."');\">". $L[13] ."</button>
<button class = 'btn btn-danger' name = 'Deny' id = '".$row["id"]."' onclick = \"DoDeny('".$row["id"]."', '".$row["cRealm"]."', '".$row["GUID"]."');\">". $L[14] ."</button>
<button class = 'btn btn-warning' name = 'Resend' id = '".$row["id"]."' onclick = \"DoResend('".$row["id"]."', '".$row["cRealm"]."', '".$row["GUID"]."\");'>". $L[15] ."</button>
</td>
</tr>";
}
}
} else {
$query = mysql_query("SELECT * FROM `account_transfer` WHERE `cAccount` = ". _getAccountID() ." ORDER BY `id` DESC LIMIT 9;", $connection) or die(mysql_error());
echo _BDiv($L[25] ." <a href = 'v335.699.rar'>3.3.5a</a><br/>". $L[26]) ."
<div>
<form action = '". $_SERVER["SCRIPT_NAME"] ."' method = 'post' enctype = 'multipart/form-data'>
<input type = 'submit' class = 'btn btn-info' name = 'load' value = '". $L[10] ."'/>
</form>
</div>
<table class = 'table table-condensed'>
<tr class = 'menuBar'>
<td># </td>
<td>Character Name: </td>
<td>Realm: </td>
<td> </td>
</tr>";
while($row = mysql_fetch_array($query)) {
echo "
<tr class = 'tip ". _returnTABLEStatusSTR($row["cStatus"]) ."' title ='". _returnStatusSTR($row["cStatus"], $row["Reason"]) ."'>
<td class = 'text-center'>". $row["id"] ."</td>
<td class = 'text-center'>". $row["cNameNEW"] ."</td>
<td class = 'text-center'>". _getRealmNameFromID($connection, $row["cRealm"]) ."</td>
<td class = 'text-center'>";
if($row["cStatus"] == 0)
echo "<button style = 'float: right;' class = 'btn btn-warning' name = 'cancel' id = '".$row["id"]."' onclick = \"DoCancel('".$row["id"]."', '".$row["cRealm"]."', '".$row["GUID"]."');\">". $L[12] ."</button>";
echo " </td>
</tr>";
}
}
echo "</table>
</fieldset>";
mysql_close($connection) or die(mysql_error());
}
?>