public static function deleteGroupmissiontype($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $GroupMissionTypeId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_GroupMissionTypeId = 0;
     $retResult = BL_manageGroupmissiontype::getGroupmissiontypeListByGroupMissionTypeId($GroupMissionTypeId);
     if ($retResult->type == 1) {
         $obj_Groupmissiontype = $retResult->data[0];
         $obj_result2 = DAL_manageGroupmissiontype::deleteGroupmissiontype($obj_Groupmissiontype->GroupMissionTypeId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_GroupMissionTypeId = $obj_Groupmissiontype->GroupMissionTypeId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Groupmissiontype";
         }
     } else {
         $msg = "Sorry!!! The Groupmissiontype you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Groupmissiontype->GroupMissionTypeId, $msg);
     $obj_mainpacket->main_setPacket();
 }
function getGroupmissiontypeByGroupMissionTypeId($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_manageGroupmissiontype::getGroupmissiontypeListByGroupMissionTypeId($id);
        if ($result->type == 1) {
            $arr_GroupmissiontypeList = $result->data;
            if (count($arr_GroupmissiontypeList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                foreach ($arr_GroupmissiontypeList as $obj_Groupmissiontype) {
                    $main_result .= getGroupmissiontypeXml($obj_Groupmissiontype);
                }
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}