-
Notifications
You must be signed in to change notification settings - Fork 7
/
update_data.php
36 lines (29 loc) · 1.25 KB
/
update_data.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
<?php
require_once("settings.php");
require_once("db.php");
require_once("core.php");
require_once("coinhive.php");
require_once("coinimp.php");
require_once("email.php");
require_once("html.php");
require_once("captcha.php");
db_connect();
$users_array=db_query_to_array("SELECT * FROM `users` WHERE `mined`>0");
foreach($users_array as $user) {
$user_uid=$user['uid'];
$coinhive_id=get_coinhive_id_by_user_uid($user_uid);
$old_hashes=get_user_hashes($user_uid);
$coinhive_balance=coinhive_get_user_balance($coinhive_id);
$coinimp_xmr_balance=coinimp_get_user_balance("xmr",$coinhive_id);
$coinimp_web_balance=coinimp_get_user_balance("web",$coinhive_id);
update_user_results($user_uid,"Coinhive",$coinhive_balance);
update_user_results($user_uid,"Coinimp-XMR",$coinimp_xmr_balance);
update_user_results($user_uid,"Coinimp-WEB",$coinimp_web_balance);
$jse=$user['jsecoin'];
update_user_results($user_uid,"JSECoin",$jse);
$balance=get_user_balance($user_uid);
$balance+=$coinimp_xmr_balance;
$xmr_balance=$balance*0.00005/1000000;
echo "<p>$user_uid balance $balance XMR $xmr_balance</p>\n";
set_user_asset($user_uid,"XMR",$xmr_balance);
}