public static function deleteGroup($obj_mainpacket) { $packet = $obj_mainpacket->packet; $GroupId = $packet[0]; $msg = "failed"; $result = 0; $result_GroupId = 0; $retResult = BL_manageGroup::getGroupListByGroupId($GroupId); if ($retResult->type == 1) { $obj_Group = $retResult->data[0]; $obj_result2 = DAL_manageGroup::deleteGroup($obj_Group->GroupId); if ($obj_result2->type == 1) { $result = 1; $result_GroupId = $obj_Group->GroupId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this Group"; } } else { $msg = "Sorry!!! The Group you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_Group->GroupId, $msg); $obj_mainpacket->main_setPacket(); }
function getGroupByGroupId($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_manageGroup::getGroupListByGroupId($id); if ($result->type == 1) { $arr_GroupList = $result->data; if (count($arr_GroupList) > 0) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; foreach ($arr_GroupList as $obj_Group) { $main_result .= getGroupXml($obj_Group); } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }