Example #1
0
             break;
         }
         if (!isset($_POST['amount' . $x])) {
             break;
         }
         if ($_POST['address' . $x] == '') {
             break;
         }
         if ($_POST['amount' . $x] == '') {
             break;
         }
         if ($_POST['amount' . $x] <= 0) {
             break;
         }
         // Validate address
         if (!$b32_client->validate_address($_POST['address' . $x])) {
             $template->add_message("Invalid payment address, " . $_POST['address' . $x], 'error');
         } else {
             $outputs[$_POST['address' . $x]] = $_POST['amount' . $x];
             $send_amount += $_POST['amount' . $x];
         }
         $x++;
     }
     // Check balance
     $balance = $b32_client->get_balance($_POST['wallet_id']);
     if ($send_amount > $balance) {
         $template->add_message("You do not have enough funds in your wallet to send this transaction.", 'error');
     }
 }
 // Process send, if no errors
 if ($template->has_errors != 1) {