Esempio n. 1
0
                     if ($note) {
                         echo "  note: {$note}\n";
                     }
                 } elseif ($request == $t->TRANFEE) {
                     echo "  tranfee: {$formattedamount} {$assetname}\n";
                 } elseif ($request == $t->COUPONENVELOPE) {
                     $coupon = $item[$t->COUPON];
                     echo "  coupon: {$coupon}\n";
                 } else {
                     echo "Unknown request: \"{$request}\"\n";
                 }
             }
         }
     }
 } elseif ($cmd == 'inbox') {
     $inbox = $client->getinbox();
     if (is_string($inbox)) {
         echo "getinbox error: {$inbox}\n";
     } else {
         if (count($tokens) == 1) {
             foreach ($inbox as $time => $items) {
                 echo "{$time}: ";
                 $first = true;
                 foreach ($items as $entry) {
                     $request = $entry[$t->REQUEST];
                     $fromid = $entry[$t->ID];
                     $msgtime = $entry[$t->MSGTIME];
                     $assetname = $entry[$t->ASSETNAME];
                     $formattedamount = $entry[$t->FORMATTEDAMOUNT];
                     $note = $entry[$t->NOTE];
                     $contact = $client->getcontact($fromid);