Пример #1
0
        } else {
            echo global_common::convertToXML($arrHeader, array("rs"), array(0), array(0));
            return;
        }
    } else {
        echo global_common::convertToXML($arrHeader, array("rs", 'info'), array(0, global_common::STRING_REQUIRE_LOGIN), array(0, 1));
    }
    return;
} elseif ($_pgR['act'] == model_Property::ACT_CHANGE_PAGE) {
    $intPage = $_pgR['p'];
    $outPutHTML = $objProperty->getListProperty($intPage);
    echo global_common::convertToXML($strMessageHeader, array('rs', 'inf'), array(1, $outPutHTML), array(0, 1));
    return;
} elseif ($_pgR['act'] == model_Property::ACT_SHOW_EDIT) {
    $strPropertyID = $_pgR['id'];
    $arrProperty = $objProperty->getPropertyByID($strPropertyID);
    echo global_common::convertToXML($strMessageHeader, array('rs', 'PropertyID', 'PropertyName', 'ProductID', 'PropertyValue', 'DataTypeID', 'Status'), array(1, 'PropertyID', 'PropertyName', 'ProductID', 'PropertyValue', 'DataTypeID', 'Status'), array(0, 1, 1, 1, 1, 1, 1));
    return;
} elseif ($_pgR["act"] == model_Property::ACT_GET) {
    $sectionID = $_pgR["sect"];
    $arrSection = $objMenu->getAllMenuBySection($sectionID);
    if ($arrSection) {
        $strHTML = $objMenu->outputHTMLMenu($arrSection);
        echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(1, $strHTML), array(0, 1));
        return;
    } else {
        echo global_common::convertToXML($arrHeader, array("rs", 'inf'), array(0, 'Kh?ng c? nh?m h?ng'), array(0, 0));
        return;
    }
} elseif ($_pgR['act'] == model_Property::ACT_DELETE) {
    $IDName = "menu_id";
Пример #2
0
        //	$currentProperty = $objProperty->getPropertyByID($propertyID);
        $resultID = $objProperty->update($propertyID, $propertyGroupID, $propertyName, $propertyValue, $dataTypeID, $order, $modifiedBy, $status);
        if ($resultID) {
            $arrHeader = global_common::getMessageHeaderArr($banCode);
            //$banCode
            echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(1, 'Cập nhật thành công'), array(0, 1));
            return;
        } else {
            echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, "Input data is invalid"), array(0, 1));
            return;
        }
    }
    return;
} elseif ($_pgR['act'] == Model_Property::ACT_SHOW_EDIT) {
    $propertyID = $_pgR['id'];
    $property = $objProperty->getPropertyByID($propertyID);
    if ($property) {
        echo global_common::convertToXML($strMessageHeader, array("rs", "content"), array(1, json_encode($property)), array(0, 1));
    } else {
        echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, "Data is invalid. Pleae try again later"), array(0, 1));
    }
    return;
} elseif ($_pgR['act'] == Model_Property::ACT_DELETE) {
    $c_userInfo = $_SESSION[global_common::SES_C_USERINFO];
    $deletedBy = $c_userInfo[global_mapping::UserID];
    $propertyID = $_pgR[global_mapping::PropertyID];
    $status = $_pgR[global_mapping::Status];
    $result = global_common::updateDeleteFlag($propertyID, global_mapping::PropertyID, $deletedBy, Model_Property::TBL_SL_PROPERTY, $status, $objConnection);
    if ($result) {
        $arrHeader = global_common::getMessageHeaderArr($banCode);
        //$banCode