function getLocation_resourcesByResourceId($sessionkey, $appcode, $id) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result .= "<AUTHSTATUS>1</AUTHSTATUS>"; $result = BL_manageLocation_resources::getLocation_resourcesListByResourceId($id); if ($result->type == 1) { $arr_Location_resourcesList = $result->data; if (count($arr_Location_resourcesList) > 0) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; foreach ($arr_Location_resourcesList as $obj_Location_resources) { $main_result .= getLocation_resourcesXml($obj_Location_resources); } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function deleteLocation_resources($obj_mainpacket) { $packet = $obj_mainpacket->packet; $ResourceId = $packet[0]; $msg = "failed"; $result = 0; $result_ResourceId = 0; $retResult = BL_manageLocation_resources::getLocation_resourcesListByResourceId($ResourceId); if ($retResult->type == 1) { $obj_Location_resources = $retResult->data[0]; $obj_result2 = DAL_manageLocation_resources::deleteLocation_resources($obj_Location_resources->ResourceId); if ($obj_result2->type == 1) { $result = 1; $result_ResourceId = $obj_Location_resources->ResourceId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this Location_resources"; } } else { $msg = "Sorry!!! The Location_resources you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_Location_resources->ResourceId, $msg); $obj_mainpacket->main_setPacket(); }