-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
145 lines (141 loc) · 7.59 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="//code.jquery.com/jquery.min.js"></script>
<title>
Một triệu đô
</title>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link href="//cdn.shopify.com/s/files/1/0691/5403/t/123/assets/style.scss.css?13701263572696252361" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="notifications.css">
<script src="notifications.js"></script>
<script type="text/javascript">
function notifications(msg,color='#a4c400'){
$.smallBox({
title: "Thông Báo",
content: msg,
color:color,
timeout: 4000
})
}
</script>
</head>
<body id="dashboard" class="background-dark template-product" >
<div class="container">
<div class="row text-centered">
<div class="col-md-12 text-center">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Created By Team KTBQ</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label for="account">* Nhập thông tin account :</label>
<textarea style='height: 200px;' id="account" placeholder="account1|password1 account2|password2" class="form-control"></textarea>
</div>
<div class="form-group"><label for="app_id">* Chọn Ứng Dụng :</label>
<select id="app_id" class="form-control">
<option value="6628568379">Facebook For Iphone</option>
<option value="350685531728">Facebook For Android</option>
<option value="165907476854626">PAGES MANAGER FOR IOS</option>
</select>
</div>
<div class="form-group text-center">
<button id="submit" class="btn btn-sm btn-primary">Lấy Token</button>
</div>
<div class='total-wrapper' style="padding-bottom: 5px;"> Số tài khoản đã xử lý : <strong class="total">0/0</strong> </div>
<div class="form-group text-center" id="load_result" style="display:none">
<label for="result">Các ACCESS TOKEN của bạn là :</label>
<textarea readonly style='height: auto; min-height: 200px;' id="result" class="form-control" rows="2"></textarea>
</div>
<div class="form-group text-center" id="account-error" style="display:none">
<label for="result">Account bị lỗi: </label>
<textarea readonly style='height: auto; min-height: 200px;' id="account_die" class="form-control" rows="2"></textarea>
</div>
</div>
</div>
<script>
i=1;
startnum = 0
$(document).ready(function(e) {
$('button#submit').on('click',function(){
$('#load_result').css('display','block');
$('#account-error').css('display','block');
$('button#submit').prop('disabled',true);
$('button#submit').text('Đang lấy token cho anh em...');
_account = $('textarea#account').val().trim();
_app_token = $('#app_id').val().trim();
if(_account == ""){
notifications("Bạn chưa nhập tài khoản.");
$('button#submit').text('Get token lỗi');
}else{
_account_array = _account.split(/\n/);
$(".total").text('0/'+_account_array.length);
ajax();
function ajax(){
var _account = _account_array[startnum];
if(_account){
gettoken(_account);
setTimeout(function() {
startnum++;
ajax();
}, 13 * 1000);
}
}
function gettoken(_account){
var _x86 = _account.split('|');
var _x64 = "|";
if (!_x86[0] || !_x86[1]){
notifications('Hãy nhập đúng cú pháp là username|password');
$('button#submit').text('Get token lỗi');
var htmls = $('#result').text();
htmls = htmls+'Hãy nhập đúng cú pháp là username|password'+"\n";
$('#result').text(htmls);
}
$.ajax({
type: 'POST',
url: '/full.php',
data: {
app_id : _app_token,
email : _x86[0],
password : _x86[1]
},
success: function(graph){
//alert(graph);
data=JSON.parse(graph);
if(data.error_msg){
$('button#submit').text('Get token lỗi');
var htmls = $('#account_die').text();
htmls = htmls + data.error_msg + " - " +_account + "\n";
$('#account_die').text(htmls);
notifications(data.error_msg);
}
if (data.access_token){
notifications('Get token thành công!');
var htmls = $('#result').text();
htmls = htmls+ data.access_token + _x64 + _account +"\n";
$('#result').text(htmls);
//$.post('kiemtra_token.php', {token : graph.access_token});
if (startnum + 1 == _account_array.length){
$('button#submit').text('Đã get xong token');
}
}
},
error: function(e){
notifications(e);
}
});
$(".total").text((startnum+1)+'/'+_account_array.length);
}
}
});
});
</script>
</div>
</div>
</div>
</body>
</html>
<?