Esempio n. 1
0
        $resultID = $objAdType->insert($adTypeID, $adTypeName, $width, $height, $numOfDay, $displayPage, $sharedItem, $price, $cityID, $status);
        if ($resultID) {
            $arrHeader = global_common::getMessageHeaderArr($banCode);
            //$banCode
            echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(1, $result), array(0, 1));
            return;
        } else {
            echo global_common::convertToXML($arrHeader, array("rs", "info"), array(0, "Input data is invalid"), array(0, 1));
            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_AdType::ACT_UPDATE) {
    if (global_common::isCLogin()) {
        //l?y th?ng tin user
        //$c_userInfo = $_SESSION[consts::SES_C_USERINFO];
        $adTypeID = $_pgR['AdTypeID'];
        $adTypeID = global_editor::rteSafe(html_entity_decode($adTypeID, ENT_COMPAT, 'UTF-8'));
        $adTypeName = $_pgR['AdTypeName'];
        $adTypeName = global_editor::rteSafe(html_entity_decode($adTypeName, ENT_COMPAT, 'UTF-8'));
        $width = $_pgR['Width'];
        $width = global_editor::rteSafe(html_entity_decode($width, ENT_COMPAT, 'UTF-8'));
        $height = $_pgR['Height'];
        $height = global_editor::rteSafe(html_entity_decode($height, ENT_COMPAT, 'UTF-8'));
        $numOfDay = $_pgR['NumOfDay'];
        $numOfDay = global_editor::rteSafe(html_entity_decode($numOfDay, ENT_COMPAT, 'UTF-8'));
        $displayPage = $_pgR['DisplayPage'];
        $displayPage = global_editor::rteSafe(html_entity_decode($displayPage, ENT_COMPAT, 'UTF-8'));
        $sharedItem = $_pgR['SharedItem'];