当前位置: 首页>>代码示例>>PHP>>正文


PHP jsonRPCClient::sc_getbalance方法代码示例

本文整理汇总了PHP中jsonRPCClient::sc_getbalance方法的典型用法代码示例。如果您正苦于以下问题:PHP jsonRPCClient::sc_getbalance方法的具体用法?PHP jsonRPCClient::sc_getbalance怎么用?PHP jsonRPCClient::sc_getbalance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jsonRPCClient的用法示例。


在下文中一共展示了jsonRPCClient::sc_getbalance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

 if (!get_lock("global")) {
     die("Too many queries. Please try again later.");
 }
 $balance = get_balance($_SESSION["user_id"], "SLC");
 if (count($errors) == 0) {
     $result = withdraw_slc($address);
     if ($result["type"] == "extern") {
         $amountwithfee = floor(($amount + $staticfee) * 10000) / 10000;
     } else {
         $amountwithfee = floor($amount * 10000) / 10000;
     }
     if ($amountwithfee > floor($balance * 10000) / 10000) {
         $errors[] = "You don't have that much.";
     }
 }
 $server_balance = $solidcoin->sc_getbalance("main") / 10000;
 if (count($errors) == 0 && $server_balance < $amountwithfee * 1.05 + 1) {
     $errors[] = "There's currently not enough Solidcoins on the Solidcoin24 servers to fulfill your withdrawal request. Don't worry, a Solidcoin24 admin has been informed and will resolve this for you. You will get an email as soon as the Solidcoins are available. Sorry for the inconvenience, but remember that a big part of the amounts are stored in a seperate wallets for your own security.";
     send_mail("Emergency! Solidcoin balance exhausted ({$server_balance} left)!", "A user with the email address " . $_SESSION["user_email"] . " legitimately tried to withdraw {$amount} Solidcoins. There are still {$server_balance} Solidcoins on the server. The request was denied. Please resolve this and make sure to inform the user.", "admin@solidcoin24.com");
 }
 if (count($errors) == 0) {
     echo "{$amount} Solidcoins are being transferred to {$address}.<br />";
     $result = withdraw_slc($address);
     if ($result["type"] == "extern") {
         $itxid = add_transaction($_SESSION["user_id"], "out", "extern", $amountwithfee, "SLC", "withdrawal", 0, $staticfee);
         $tx = withdraw_slc($address, $amount, "", $itxid);
         $udt_transaction_a = "UPDATE transaction SET info_id = '{$tx['txid']}' WHERE id = '{$itxid}'";
         mysql_query($udt_transaction_a);
         echo "<small>Transaction (extern): " . crypte_transaction($tx["txid"]) . "</small>";
     } else {
         $itxid = add_transaction($_SESSION["user_id"], "out", "intern", $amountwithfee, "SLC", "withdrawal", 0);
开发者ID:rhartness,项目名称:slc24,代码行数:31,代码来源:withdraw_slc_cont.php


注:本文中的jsonRPCClient::sc_getbalance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。