Esempio n. 1
0
function handleRequest($packagePacketText)
{
    $obj_packagepacket = new packagepacket();
    $obj_packagepacket->set_InPackagePacket($packagePacketText);
    $obj_me = unserialize($_SESSION["user"]);
    foreach ($obj_packagepacket->mainpacketList as $obj_mainpacket) {
        switch ($obj_mainpacket->moduleId) {
            case 1:
                onIncommingMessage($obj_mainpacket);
                break;
            case 2:
                BL_manageAgriculture::onIncommingMessage($obj_mainpacket);
                break;
            case 3:
                BL_manageAlsubjects::onIncommingMessage($obj_mainpacket);
                break;
            case 4:
                BL_manageBusiness::onIncommingMessage($obj_mainpacket);
                break;
            case 5:
                BL_manageBusiness_product::onIncommingMessage($obj_mainpacket);
                break;
            case 6:
                BL_manageBusinesstype::onIncommingMessage($obj_mainpacket);
                break;
            case 7:
                BL_manageForesttype::onIncommingMessage($obj_mainpacket);
                break;
            case 8:
                BL_manageGeographytype::onIncommingMessage($obj_mainpacket);
                break;
            case 9:
                BL_manageGroup::onIncommingMessage($obj_mainpacket);
                break;
            case 10:
                BL_manageGroup_member::onIncommingMessage($obj_mainpacket);
                break;
            case 11:
                BL_manageGroupmissiontype::onIncommingMessage($obj_mainpacket);
                break;
            case 12:
                BL_manageHigherstudysubjects::onIncommingMessage($obj_mainpacket);
                break;
            case 13:
                BL_manageIndustrial::onIncommingMessage($obj_mainpacket);
                break;
            case 14:
                BL_manageLocation::onIncommingMessage($obj_mainpacket);
                break;
            case 15:
                BL_manageLocation_resources::onIncommingMessage($obj_mainpacket);
                break;
            case 16:
                BL_manageOlsubjects::onIncommingMessage($obj_mainpacket);
                break;
            case 17:
                BL_manageOrganization::onIncommingMessage($obj_mainpacket);
                break;
            case 18:
                BL_manageOrganization_subtype::onIncommingMessage($obj_mainpacket);
                break;
            case 19:
                BL_manageOrganizationtype::onIncommingMessage($obj_mainpacket);
                break;
            case 20:
                BL_managePerson::onIncommingMessage($obj_mainpacket);
                break;
            case 21:
                BL_managePerson_address::onIncommingMessage($obj_mainpacket);
                break;
            case 22:
                BL_managePerson_alresult::onIncommingMessage($obj_mainpacket);
                break;
            case 23:
                BL_managePerson_educationlevel::onIncommingMessage($obj_mainpacket);
                break;
            case 24:
                BL_managePerson_highereducation::onIncommingMessage($obj_mainpacket);
                break;
            case 25:
                BL_managePerson_languageskill::onIncommingMessage($obj_mainpacket);
                break;
            case 26:
                BL_managePerson_olresult::onIncommingMessage($obj_mainpacket);
                break;
            case 27:
                BL_managePerson_property::onIncommingMessage($obj_mainpacket);
                break;
            case 28:
                BL_managePerson_talent::onIncommingMessage($obj_mainpacket);
                break;
            case 29:
                BL_managePerson_telephone::onIncommingMessage($obj_mainpacket);
                break;
            case 30:
                BL_managePerson_vocationaltraining::onIncommingMessage($obj_mainpacket);
                break;
            case 31:
                BL_managePerson_workingexperiance::onIncommingMessage($obj_mainpacket);
                break;
            case 32:
                BL_managePlants::onIncommingMessage($obj_mainpacket);
                break;
            case 33:
                BL_managePrimarygeolayertype::onIncommingMessage($obj_mainpacket);
                break;
            case 34:
                BL_manageProduct::onIncommingMessage($obj_mainpacket);
                break;
            case 35:
                BL_manageService::onIncommingMessage($obj_mainpacket);
                break;
            case 36:
                BL_manageSocierytype::onIncommingMessage($obj_mainpacket);
                break;
            case 37:
                BL_manageSociety::onIncommingMessage($obj_mainpacket);
                break;
            case 38:
                BL_manageSociety_member::onIncommingMessage($obj_mainpacket);
                break;
            case 39:
                BL_manageSoiltype::onIncommingMessage($obj_mainpacket);
                break;
            case 40:
                BL_manageTalent::onIncommingMessage($obj_mainpacket);
                break;
            case 41:
                BL_manageTown::onIncommingMessage($obj_mainpacket);
                break;
            case 42:
                BL_manageTrading::onIncommingMessage($obj_mainpacket);
                break;
            case 43:
                BL_manageTraditionalknowledgecategory::onIncommingMessage($obj_mainpacket);
                break;
            case 44:
                BL_manageTransport::onIncommingMessage($obj_mainpacket);
                break;
            case 45:
                BL_manageUser::onIncommingMessage($obj_mainpacket);
                break;
            case 46:
                BL_manageVillage::onIncommingMessage($obj_mainpacket);
                break;
            case 47:
                BL_manageVillage_agriculture::onIncommingMessage($obj_mainpacket);
                break;
            case 48:
                BL_manageVillage_climate::onIncommingMessage($obj_mainpacket);
                break;
            case 49:
                BL_manageVillage_enterance::onIncommingMessage($obj_mainpacket);
                break;
            case 50:
                BL_manageVillage_geologicalvariation::onIncommingMessage($obj_mainpacket);
                break;
            case 51:
                BL_manageVillage_group::onIncommingMessage($obj_mainpacket);
                break;
            case 52:
                BL_manageVillage_history::onIncommingMessage($obj_mainpacket);
                break;
            case 53:
                BL_manageVillage_image::onIncommingMessage($obj_mainpacket);
                break;
            case 54:
                BL_manageVillage_industrial::onIncommingMessage($obj_mainpacket);
                break;
            case 55:
                BL_manageVillage_neartowns::onIncommingMessage($obj_mainpacket);
                break;
            case 56:
                BL_manageVillage_organization::onIncommingMessage($obj_mainpacket);
                break;
            case 57:
                BL_manageVillage_othernames::onIncommingMessage($obj_mainpacket);
                break;
            case 58:
                BL_manageVillage_plant::onIncommingMessage($obj_mainpacket);
                break;
            case 59:
                BL_manageVillage_service::onIncommingMessage($obj_mainpacket);
                break;
            case 60:
                BL_manageVillage_society::onIncommingMessage($obj_mainpacket);
                break;
            case 61:
                BL_manageVillage_trading::onIncommingMessage($obj_mainpacket);
                break;
            case 62:
                BL_manageVillage_traditionalknowledge::onIncommingMessage($obj_mainpacket);
                break;
            case 63:
                BL_manageVillage_transport::onIncommingMessage($obj_mainpacket);
                break;
            case 64:
                BL_manageLanguage::onIncommingMessage($obj_mainpacket);
                break;
        }
    }
    echo $obj_packagepacket->get_OutPackagePacket();
}
 public static function deleteOlsubjects($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $SubjectId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_SubjectId = 0;
     $retResult = BL_manageOlsubjects::getOlsubjectsListBySubjectId($SubjectId);
     if ($retResult->type == 1) {
         $obj_Olsubjects = $retResult->data[0];
         $obj_result2 = DAL_manageOlsubjects::deleteOlsubjects($obj_Olsubjects->SubjectId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_SubjectId = $obj_Olsubjects->SubjectId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Olsubjects";
         }
     } else {
         $msg = "Sorry!!! The Olsubjects you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Olsubjects->SubjectId, $msg);
     $obj_mainpacket->main_setPacket();
 }
Esempio n. 3
0
function getOlsubjectsBySubjectId($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_manageOlsubjects::getOlsubjectsListBySubjectId($id);
        if ($result->type == 1) {
            $arr_OlsubjectsList = $result->data;
            if (count($arr_OlsubjectsList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                foreach ($arr_OlsubjectsList as $obj_Olsubjects) {
                    $main_result .= getOlsubjectsXml($obj_Olsubjects);
                }
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}