<?php

$fa_asset = new fa_asset();

if (!empty($_GET["fa_asset_id"]) && (!is_array($_GET["fa_asset_id"]))) {
 $fa_asset_id = $_GET["fa_asset_id"];
 $fa_asset->findBy_id($fa_asset_id);
 $fa_asset_component_object = fa_asset_component::find_by_parent_id($fa_asset_id);
} else if (!empty($_GET["fa_asset_component_id"]) && (!is_array($_GET["fa_asset_component_id"]))) {
 $fa_ast_comp = fa_asset_component::find_by_id($_GET["fa_asset_component_id"]);
 $fa_asset_id = $fa_ast_comp->fa_asset_id;
 $fa_asset->findBy_id($fa_asset_id);
 $fa_asset_component_object = fa_asset_component::find_by_parent_id($fa_asset_id);
}

//pa($fa_asset_component_object);

if (empty($fa_asset_component_object)) {
 $fa_asset_component_object = [new fa_asset_component()];
}
?>
