public static function deleteVillage_organization($obj_mainpacket) { $packet = $obj_mainpacket->packet; $VillageId = $packet[0]; $msg = "failed"; $result = 0; $result_VillageId = 0; $retResult = BL_manageVillage_organization::getVillage_organizationListByVillageId($VillageId); if ($retResult->type == 1) { $obj_Village_organization = $retResult->data[0]; $obj_result2 = DAL_manageVillage_organization::deleteVillage_organization($obj_Village_organization->VillageId); if ($obj_result2->type == 1) { $result = 1; $result_VillageId = $obj_Village_organization->VillageId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this Village_organization"; } } else { $msg = "Sorry!!! The Village_organization you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_Village_organization->VillageId, $msg); $obj_mainpacket->main_setPacket(); }
function getVillage_organizationByVillageId($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_manageVillage_organization::getVillage_organizationListByVillageId($id); if ($result->type == 1) { $arr_Village_organizationList = $result->data; if (count($arr_Village_organizationList) > 0) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; foreach ($arr_Village_organizationList as $obj_Village_organization) { $main_result .= getVillage_organizationXml($obj_Village_organization); } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }