public function parseAssets($rowset, $characterID, $containerID)
 {
     foreach ($rowset as $item) {
         if ($item->count() > 0) {
             $this->parseAssets($item->rowset->row, $characterID, $item->attributes()->itemID);
         }
         if (isset($item->attributes()->locationID)) {
             $locationName = $this->getLocationName($item->attributes()->locationID);
         }
         $invType = Invtypes::Model()->findByPk($item->attributes()->typeID);
         $asset = new CorpAssets();
         $asset->characterID = $characterID;
         $asset->itemID = $item->attributes()->itemID;
         $asset->locationID = $item->attributes()->locationID;
         $asset->typeID = $item->attributes()->typeID;
         $asset->quantity = $item->attributes()->quantity;
         $asset->flag = $item->attributes()->flag;
         $asset->singleton = $item->attributes()->singleton;
         $asset->containerID = $containerID;
         $asset->locationName = $locationName;
         $asset->typeName = $invType->typeName;
         $asset->groupID = $invType->groupID;
         try {
             $asset->save();
         } catch (Exception $e) {
             $e->getMessage();
         }
     }
 }
 public function actionStoreValue()
 {
     $id = $_GET['id'];
     $asset = CorpAssets::Model()->findByPk($id);
     $this->storeSingleAssetValue($asset->typeID);
     $this->renderPartial('storeValue');
 }
Exemple #3
0
'><?php 
        echo $baseAsset->typeName;
        ?>
</td>
					<td style="text-align: right;"><?php 
        echo number_format($baseAsset->quantity, 0);
        ?>
</td>
					<td style="text-align: right"><?php 
        echo number_format($baseAsset->values->value * $baseAsset->quantity / 1000000, 2);
        ?>
M</td>
				</tr>
			<?php 
        //Check the base assets for containership
        $contents = CorpAssets::Model()->with('values')->findAll('containerID=:containerID', array(':containerID' => $baseAsset->itemID));
        if ($contents) {
            $idx = 1;
            foreach ($contents as $content) {
                ?>
					<?php 
                $icon = $this->getIcon($content->typeID);
                $idx++;
                ?>

						<tr id="node-<?php 
                echo $assetLocation->locationID;
                ?>
-<?php 
                echo $baseAsset->itemID;
                ?>