<?php

if (!empty($_GET["bom_resource_id"]) && (!is_array($_GET["bom_resource_id"]))) {
 $bom_resource_id = htmlentities($_GET["bom_resource_id"]);
} elseif (!empty($_POST["bom_resource_id"][0])) {
 $bom_resource_id = $_POST["bom_resource_id"][0];
}

if (!empty($bom_resource_id)) {
 if (!empty($bom_resource->osp_item_id)) {
	$item = new item();
	$item_i = $item->findBy_id($bom_resource->osp_item_id);
	$bom_resource->osp_item_number = $item_i->item_number;
	$bom_resource->osp_item_description = $item_i->item_description;
 } else {
	$bom_resource->osp_item_number = null;
	$bom_resource->osp_item_description = null;
 }
}
?>