public static function deleteVillage_othernames($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $VillageId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_VillageId = 0;
     $retResult = BL_manageVillage_othernames::getVillage_othernamesListByVillageId($VillageId);
     if ($retResult->type == 1) {
         $obj_Village_othernames = $retResult->data[0];
         $obj_result2 = DAL_manageVillage_othernames::deleteVillage_othernames($obj_Village_othernames->VillageId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_VillageId = $obj_Village_othernames->VillageId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Village_othernames";
         }
     } else {
         $msg = "Sorry!!! The Village_othernames you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Village_othernames->VillageId, $msg);
     $obj_mainpacket->main_setPacket();
 }
function getVillage_othernamesByVillageId($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_othernames::getVillage_othernamesListByVillageId($id);
        if ($result->type == 1) {
            $arr_Village_othernamesList = $result->data;
            if (count($arr_Village_othernamesList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                foreach ($arr_Village_othernamesList as $obj_Village_othernames) {
                    $main_result .= getVillage_othernamesXml($obj_Village_othernames);
                }
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}