$productID = $_pgR['ProductID']; $productStatusID = html_entity_decode($_pgR['ProductStatusID'], ENT_COMPAT, 'UTF-8'); $cityID = html_entity_decode($_pgR['CityID'], ENT_COMPAT, 'UTF-8'); $price = html_entity_decode($_pgR['Price'], ENT_COMPAT, 'UTF-8'); $shippingDesc = html_entity_decode($_pgR['ShippingDesc'], ENT_COMPAT, 'UTF-8'); $imageLink = html_entity_decode($_pgR['ImageLink'], ENT_COMPAT, 'UTF-8'); $description = html_entity_decode($_pgR['Description'], ENT_COMPAT, 'UTF-8'); $shortDesc = html_entity_decode($_pgR['ShortDesc'], ENT_COMPAT, 'UTF-8'); $boxInfo = html_entity_decode($_pgR['BoxInfo'], ENT_COMPAT, 'UTF-8'); $statusDetail = html_entity_decode($_pgR['StatusDetail'], ENT_COMPAT, 'UTF-8'); $receiveEmail = html_entity_decode($_pgR['ReceiveEmail'], ENT_COMPAT, 'UTF-8'); $status = strtolower($receiveEmail == 'true' ? 1 : 0); //recive email when got comment if ($_pgR["act"] == Model_Retailer::ACT_ADD_PRICE) { $createdBy = $c_userInfo[global_mapping::UserID]; $resultID = $objRetailer->insert($productID, $productStatusID, $statusDetail, $price, $imageLink, $cityID, $shippingDesc, $boxInfo, $shortDesc, $description, $createdBy, $status); if ($resultID) { $arrHeader = global_common::getMessageHeaderArr($banCode); //$banCode echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(1, 'Đăng bán thành công'), array(0, 1)); return; } else { echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, "Đăng bán thất bại. Xin vui lòng thử lại sau."), array(0, 1)); return; } } else { $modifiedBy = $c_userInfo[global_mapping::UserID]; $retailerID = html_entity_decode($_pgR[global_mapping::RetailerID], ENT_COMPAT, 'UTF-8'); $resultID = $objRetailer->update($retailerID, $productID, $productStatusID, $statusDetail, $price, $imageLink, $cityID, $shippingDesc, $boxInfo, $shortDesc, $description, $modifiedBy, $status); if ($resultID) { $arrHeader = global_common::getMessageHeaderArr($banCode);