예제 #1
0
         //return;
         if ($resultID) {
             $commentHTML = $objComment->getCommentHTMLByArticle($articleid);
             $arrHeader = global_common::getMessageHeaderArr($banCode);
             //$banCode
             echo global_common::convertToXML($arrHeader, array("rs", "inf", "form"), array(1, 'Gửi bình luận thành công', $commentHTML), array(0, 1, 1));
             return;
         } else {
             echo global_common::convertToXML($arrHeader, array("rs", "info"), array(0, "Input data is invalid"), array(0, 1));
             return;
         }
     } else {
         $modifiedBy = $c_userInfo[global_mapping::UserID];
         $articleID = html_entity_decode($_pgR[global_mapping::ArticleID], ENT_COMPAT, 'UTF-8');
         $currentArticle = $objArticle->getArticleByID($articleID);
         $resultID = $objArticle->update($articleID, null, $title, $fileName, $catalogueID, $content, null, $tags, null, null, $currentArticle[global_mapping::CreatedBy], $currentArticle[global_mapping::CreatedDate], $modifiedBy, global_common::nowSQL(), null, null, 1, null, null, null, null, $companyName, $companyAddress, $companyWebsite, $companyPhone, $adType, $startDate, $endDate, $happyDays, $startHappyHour, $endHappyHour, $addresses, $dictricts, $cities);
         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", "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));
 //}
        $status = $_pgR['Status'];
        $status = global_editor::rteSafe(html_entity_decode($status, ENT_COMPAT, 'UTF-8'));
        $comments = $_pgR['comments'];
        $comments = global_editor::rteSafe(html_entity_decode($comments, ENT_COMPAT, 'UTF-8'));
        $renewedDate = $_pgR['RenewedDate'];
        $renewedDate = global_editor::rteSafe(html_entity_decode($renewedDate, ENT_COMPAT, 'UTF-8'));
        $renewedNum = $_pgR['RenewedNum'];
        $renewedNum = global_editor::rteSafe(html_entity_decode($renewedNum, ENT_COMPAT, 'UTF-8'));
        //$checkProduct = $objMenu->getMenuByName($_pgR['name']);
        //if ($checkProduct && $checkProduct['menu_id']!= $strID) {
        //	echo global_common::convertToXML($arrHeader, array("rs",'info'), array(0,global_common::STRING_NAME_EXIST), array(0,1));
        //	return;
        //}
        //$strName = $_pgR['name'];
        //$strDetail= $_pgR['detail'];
        $resultID = $objArticle->update($articleID, $prefix, $title, $fileName, $articleType, $content, $notificationType, $tags, $catalogueID, $sectionID, $numView, $numComment, $status, $comments, $renewedDate, $renewedNum);
        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"), 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_Article::ACT_CHANGE_PAGE) {
    $intPage = $_pgR['p'];