本文整理汇总了PHP中CForumNew::GetNowTime方法的典型用法代码示例。如果您正苦于以下问题:PHP CForumNew::GetNowTime方法的具体用法?PHP CForumNew::GetNowTime怎么用?PHP CForumNew::GetNowTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForumNew
的用法示例。
在下文中一共展示了CForumNew::GetNowTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
$error = !empty($res);
}
if ($error) {
$strErrorMessage .= GetMessage("F_ERRRO_FILE_NOT_UPLOAD");
unset($_REQUEST["FILES"]);
}
}
if (!empty($strErrorMessage)) {
} else {
if ($arResult["VIEW"] == "N") {
$arFieldsG = array("POST_MESSAGE" => $_REQUEST["POST_MESSAGE"], "USE_SMILES" => $_REQUEST["USE_SMILES"], "ICON" => $_REQUEST["ICON"], "FILES" => array());
if ($arParams["SHOW_VOTE"] == "Y" && !empty($_REQUEST["QUESTION"])) {
$VOTE_ID = $arResult["MESSAGE"]["PARAM1"] == 'VT' ? intval($arResult["MESSAGE"]["PARAM2"]) : 0;
$arVote = array("CHANNEL_ID" => $arParams["VOTE_CHANNEL_ID"], "TITLE" => $_REQUEST["TITLE"], "DATE_END" => $_REQUEST["DATE_END"], "QUESTIONS" => array());
if ($VOTE_ID <= 0) {
$pointOfTime = CForumNew::GetNowTime();
$arVote["DATE_START"] = GetTime($pointOfTime, "FULL");
$_REQUEST["DATE_END"] = trim($_REQUEST["DATE_END"]);
if (!empty($_REQUEST["DATE_END"])) {
$arVote["DATE_END"] = GetTime(MakeTimeStamp($_REQUEST["DATE_END"]), "FULL");
} else {
$arVote["DATE_END"] = GetTime($pointOfTime + 2592000, "FULL");
}
}
foreach ($_REQUEST["QUESTION"] as $key => $val) {
$res = array("QUESTION" => trim($val), "MULTI" => $_REQUEST["MULTI"][$key] == "Y" ? "Y" : "N", "ANSWERS" => array());
if (is_set($arResult["~QUESTIONS"], $_REQUEST["QUESTION_ID"][$key])) {
$res["ID"] = intval($_REQUEST["QUESTION_ID"][$key]);
if ($_REQUEST["QUESTION_DEL"][$key] == "Y") {
$res["DEL"] = "Y";
}
示例2: intVal
********************************************************************/
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$TID1 = $arParams["MESSAGE_TYPE"] == "NEW" ? 0 : intVal($arParams["TID"]);
$MID1 = $arParams["MESSAGE_TYPE"] == "NEW" ? 0 : intVal($arParams["MID"]);
if (!check_bitrix_sessid()) {
$arError[] = array("id" => "bad sessid", "text" => GetMessage("F_ERR_SESS_FINISH"));
} elseif (!in_array($arResult["FORUM"]["ALLOW_UPLOAD"], array("Y", "A", "F")) && (!empty($_FILES) || !empty($_REQUEST["FILES"]))) {
$arError[] = array("id" => "bad files", "text" => GetMessage("F_ERRRO_FILE_NOT_UPLOAD"));
unset($_REQUEST["FILES"]);
} elseif ($arResult["VIEW"] == "N") {
$arFieldsG = array("POST_MESSAGE" => $_REQUEST["POST_MESSAGE"], "USE_SMILES" => $_REQUEST["USE_SMILES"], "OWNER_ID" => $arParams["USER_ID"], "SOCNET_GROUP_ID" => $arParams["SOCNET_GROUP_ID"], "PERMISSION_EXTERNAL" => $arParams["PERMISSION"]);
if ($arParams["SHOW_VOTE"] == "Y" && (!empty($_REQUEST["QUESTION"]) || !empty($_REQUEST["QUESTION_ID"]))) {
$VOTE_ID = $arResult["MESSAGE"]["PARAM1"] == 'VT' ? intVal($arResult["MESSAGE"]["PARAM2"]) : 0;
$arVote = array("CHANNEL_ID" => $arParams["VOTE_CHANNEL_ID"], "TITLE" => $_REQUEST["TITLE"], "QUESTIONS" => array());
if ($VOTE_ID <= 0) {
$arVote["DATE_START"] = GetTime(CForumNew::GetNowTime(), "FULL");
$arVote["DATE_END"] = GetTime(MakeTimeStamp($_REQUEST['DATE_END']), "FULL");
} else {
$arVote["DATE_END"] = $_REQUEST['DATE_END'];
}
$arQuestions = $arResult["~QUESTIONS"];
$_REQUEST["QUESTION"] = is_array($_REQUEST["QUESTION"]) ? $_REQUEST["QUESTION"] : array();
foreach ($_REQUEST["QUESTION"] as $key => $val) {
$res = array("QUESTION" => trim($val), "MULTI" => $_REQUEST["MULTI"][$key] == "Y" ? "Y" : "N", "DEL" => $_REQUEST["QUESTION_DEL"][$key] == "Y" ? "Y" : "N", "ANSWERS" => array());
$id = intval($_REQUEST["QUESTION_ID"][$key]);
if ($id > 0 && is_set($arQuestions, $id)) {
$res["ID"] = $id;
} elseif ($res["DEL"] == "Y") {
continue;
}
$arAnswers = is_array($arResult["~QUESTIONS"][$res["ID"]]["ANSWERS"]) ? $arResult["~QUESTIONS"][$res["ID"]]["ANSWERS"] : array();
示例3: ForumSetReadTopic
function ForumSetReadTopic($FID, $TID)
{
CForumTopic::SetReadLabelsNew($TID);
if (!$GLOBALS['USER']->IsAuthorized()) {
if (!isset($_SESSION["FORUM"]["GUEST_TID"])) {
ForumInitParams();
}
$_SESSION["FORUM"]["GUEST_TID"][intVal($TID)] = CForumNew::GetNowTime();
if (COption::GetOptionString("forum", "USE_COOKIE", "N") == "Y") {
$arCookie = array();
foreach ($_SESSION["FORUM"]["GUEST_TID"] as $key => $val) {
$arCookie[] = intVal($key) . "-" . intVal($val);
}
$GLOBALS["APPLICATION"]->set_cookie("FORUM_GUEST_TID", implode("/", $arCookie), false, "/", false, false, "Y", false);
}
}
}