Unfinished website for an EVE-online corporation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.php 861B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?PHP
  2. require('../api/common.php');
  3. require('../db/evedb.class.php');
  4. require('../model/asset.php');
  5. header('Content-type: text/plain');
  6. $api = new Pheal($_GET['user'], $_GET['key']);
  7. $db = new EveDB();
  8. function getAsset($asset) {
  9. global $db;
  10. $res = new Asset();
  11. $res->id = $asset->itemID;
  12. if (isset($asset->locationID)) {
  13. $res->location = $asset->locationID;
  14. }
  15. $res->quantity = $asset->quantity;
  16. $res->flag = $asset->flag;
  17. $res->singleton = $asset->singleton;
  18. $res->item = $db->items->getById($asset->typeID);
  19. if (isset($asset->contents)) {
  20. $res->contents = array();
  21. foreach($asset->contents as $content) {
  22. $res->contents[] = getAsset($content);
  23. }
  24. }
  25. return $res;
  26. }
  27. foreach ($api->charScope->AssetList(array('characterID' => $_GET['char']))->assets as $asset) {
  28. var_dump(getAsset($asset));
  29. }
  30. ?>