$strTableName = user_faq::TBL_T_FAQ; $result = global_common::updateDeleteFlag($contentID, $IDName, $strTableName, $_pgR["status"], $objConnection); } $arrHeader = global_common::getMessageHeaderArr($banCode = 0, 0); $arrKey = array("rs", "id"); $arrValue = array($result ? 1 : 0, $contentID); $arrIsMetaData = array(0, 1); echo global_common::convertToXML($arrHeader, $arrKey, $arrValue, $arrIsMetaData); return; } elseif ($_pgR['act'] == Model_Comment::ACT_BAD_COMMENT) { if (global_common::isCLogin()) { $c_userInfo = $_SESSION[global_common::SES_C_USERINFO]; $commentID = $_pgR["id"]; $isBad = $_pgR["isbad"]; $strTableName = Model_CommentBad::TBL_SL_COMMENT_BAD; $comment = $objComment->getCommentByID($commentID); $user = $objUser->getUserByID($comment[global_mapping::CreatedBy]); if ($user && $comment) { $isSent = true; $description = "Restore Comment"; if ($isBad) { $description = "Bad Comment"; $userEmail = $user[global_mapping::Email]; $fullName = $user[global_mapping::FullName]; $linkArticle = global_common::getHostName() . '/article_detail.php?aid=' . $comment[global_mapping::ArticleID]; $commentDate = global_common::formatDateTimeVN($comment[global_mapping::CreatedDate]); $commentContent = $comment[global_mapping::Content]; $linkPolicy = global_common::getHostName() . '/' . global_common::PAGE_TERM_KM; $arrMailContent = global_common::formatMailContent(global_common::TEAMPLATE_BAD_COMMENT, null, array(global_common::formatOutputText($fullName), $linkArticle, $commentDate, $commentContent, $linkPolicy)); $emailSubject = $arrMailContent[0]; $emailContent = $arrMailContent[1];
} 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_Comment::ACT_CHANGE_PAGE) { $intPage = $_pgR['p']; $outPutHTML = $objComment->getListComment($intPage); echo global_common::convertToXML($strMessageHeader, array('rs', 'inf'), array(1, $outPutHTML), array(0, 1)); return; } elseif ($_pgR['act'] == model_Comment::ACT_SHOW_EDIT) { $strCommentID = $_pgR['id']; $arrComment = $objComment->getCommentByID($strCommentID); echo global_common::convertToXML($strMessageHeader, array('rs', 'CommentID', 'CommentType', 'ArticleID', 'Content', 'Status'), array(1, 'CommentID', 'CommentType', 'ArticleID', 'Content', 'Status'), array(0, 1, 1, 1, 1, 1)); return; } elseif ($_pgR["act"] == model_Comment::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_Comment::ACT_DELETE) { $IDName = "menu_id";