From dfdc6b3682fe0968714af169cc6a781e2b7f1482 Mon Sep 17 00:00:00 2001 From: iAmShorty Date: Wed, 7 May 2014 13:09:54 +0200 Subject: [PATCH] [FIX] removed test script --- scripts/force_payout.php | 90 ---------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 scripts/force_payout.php diff --git a/scripts/force_payout.php b/scripts/force_payout.php deleted file mode 100644 index cafbc888..00000000 --- a/scripts/force_payout.php +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/php -logInfo("Starting Forced Payout..."); - -// Check and see if the sendmany RPC method is available -// This does not test if it actually works too! -$sendmanyAvailable = ((strpos($bitcoin->help('sendmany'), 'unknown') === FALSE) ? true : false); -if ($sendmanyAvailable) - $log->logDebug(' sendmany available in coind help command'); - -// Fetch all users -$users = $user->getAllAssoc(); - -if (!$payoutUsers) { - $mask = "| %6s | %20s | %30s | %20s | %15s |"; - $log->logInfo(sprintf($mask, 'ID', 'Username', 'eMail', 'Last Login', 'Balance')); -} else { - $mask = "| %20s | %15s | %50s |"; - $log->logInfo(sprintf($mask, 'Username', 'Balance', 'Transaction ID')); -} - -$totalSavings = 0; - -foreach ($users as $user) { - $id = $user['id']; - $username = $user['username']; - $lastLogin = $user['last_login']; - $coinAddress = $user['coin_address']; - $mailAddress = $user['email']; - - // get balances - $balances = $transaction->getBalance($id); - $confirmedBalance = $balances['confirmed']; - $totalSavings += $confirmedBalance; - - if(($balancedUsers || $payoutUsers) && $confirmedBalance == 0) - continue; - - if ($payoutUsers) { - if ($bitcoin->validateaddress($coinAddress)) { - $transaction_id = 0; - - $log->logInfo(sprintf($mask, $username, round($confirmedBalance,8), $transaction_id)); - - } else { - - $log->logFatal(' unable to payout user ' . $username . ', no valid payout address'); - - /* - $subject = "Account at " . $setting->getValue('website_name') . "!"; - $body = "Hi ". $username .",\n\nWe have discovered \ - your Payout Address as invalid and you have a Balance of ". $confirmedBalance . " " . $config['currency'] . " left on our Pool. \n - Please set a valid Payout Address at " . . " so we can send the Coins you have mined at our Pool \n\nCheers"; - - if (mail($mailAddress, $subject, $body)) { - echo("Email successfully sent!"); - } else { - echo("Email delivery failed..."); - } - */ - - } - } else { - $log->logInfo(sprintf($mask, $id, $username, $mailAddress, strftime("%Y-%m-%d %H:%M:%S", $lastLogin), round($confirmedBalance,8))); - } -} - -?>