function getHigherstudysubjectsBySubjectId($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_manageHigherstudysubjects::getHigherstudysubjectsListBySubjectId($id); if ($result->type == 1) { $arr_HigherstudysubjectsList = $result->data; if (count($arr_HigherstudysubjectsList) > 0) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; foreach ($arr_HigherstudysubjectsList as $obj_Higherstudysubjects) { $main_result .= getHigherstudysubjectsXml($obj_Higherstudysubjects); } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function deleteHigherstudysubjects($obj_mainpacket) { $packet = $obj_mainpacket->packet; $SubjectId = $packet[0]; $msg = "failed"; $result = 0; $result_SubjectId = 0; $retResult = BL_manageHigherstudysubjects::getHigherstudysubjectsListBySubjectId($SubjectId); if ($retResult->type == 1) { $obj_Higherstudysubjects = $retResult->data[0]; $obj_result2 = DAL_manageHigherstudysubjects::deleteHigherstudysubjects($obj_Higherstudysubjects->SubjectId); if ($obj_result2->type == 1) { $result = 1; $result_SubjectId = $obj_Higherstudysubjects->SubjectId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this Higherstudysubjects"; } } else { $msg = "Sorry!!! The Higherstudysubjects you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_Higherstudysubjects->SubjectId, $msg); $obj_mainpacket->main_setPacket(); }