Exemplo n.º 1
0
        $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'];
        $sharedItem = global_editor::rteSafe(html_entity_decode($sharedItem, ENT_COMPAT, 'UTF-8'));
        $price = $_pgR['Price'];
        $price = global_editor::rteSafe(html_entity_decode($price, ENT_COMPAT, 'UTF-8'));
        $cityID = $_pgR['CityID'];
        $cityID = global_editor::rteSafe(html_entity_decode($cityID, ENT_COMPAT, 'UTF-8'));
        $status = $_pgR['Status'];
        $status = global_editor::rteSafe(html_entity_decode($status, ENT_COMPAT, 'UTF-8'));
        //$strName = $_pgR['name'];
        //$strName = global_editor::rteSafe(html_entity_decode($strName,ENT_COMPAT ,'UTF-8' ));
        $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()) {