本文整理汇总了PHP中CTicket::SetTicket方法的典型用法代码示例。如果您正苦于以下问题:PHP CTicket::SetTicket方法的具体用法?PHP CTicket::SetTicket怎么用?PHP CTicket::SetTicket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTicket
的用法示例。
在下文中一共展示了CTicket::SetTicket方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
switch($_REQUEST['action'])
{
case "close":
CTicket::SetTicket(array("CLOSE" => "Y"), $ID, "Y", "N");
break;
case "close_notify":
CTicket::SetTicket(array("CLOSE" => "Y"), $ID, "Y", "Y");
break;
case "open":
CTicket::SetTicket(array("CLOSE" => "N"), $ID, "Y", "N");
break;
case "open_notify":
CTicket::SetTicket(array("CLOSE" => "N"), $ID, "Y", "Y");
break;
case "unmark_spam":
CTicket::UnMarkAsSpam($ID);
break;
case "maybe_spam":
CTicket::MarkAsSpam($ID, "N");
break;
case "mark_spam":
CTicket::MarkAsSpam($ID);
break;
case "mark_spam_delete":
CTicket::MarkAsSpam($ID);
CTicket::Delete($ID);
break;
示例2: array
$bSetTicket = true;
}
if ($bSetTicket) {
if ($_REQUEST["OPEN"] == "Y") {
$_REQUEST["CLOSE"] = "N";
}
if ($_REQUEST["CLOSE"] == "Y") {
$_REQUEST["OPEN"] = "N";
}
$arFields = array('SITE_ID' => SITE_ID, 'CLOSE' => $_REQUEST['CLOSE'], 'TITLE' => $_REQUEST['TITLE'], 'CRITICALITY_ID' => $_REQUEST['CRITICALITY_ID'], 'CATEGORY_ID' => $_REQUEST['CATEGORY_ID'], 'MARK_ID' => $_REQUEST['MARK_ID'], 'MESSAGE' => $_REQUEST['MESSAGE'], 'HIDDEN' => 'N', 'FILES' => $arFILES, 'COUPON' => $_REQUEST['COUPON'], 'PUBLIC_EDIT_URL' => $APPLICATION->GetCurPage());
foreach ($_REQUEST as $k => $v) {
if (array_key_exists($k, $arrUF)) {
$arFields[$k] = $v;
}
}
$ID = CTicket::SetTicket($arFields, $ID, "Y", $NOTIFY = "Y");
if (intval($ID) > 0) {
if (strlen($_REQUEST["save"]) > 0) {
LocalRedirect($arParams["TICKET_LIST_URL"]);
} elseif (strlen($_REQUEST["apply"]) > 0) {
LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams["TICKET_EDIT_TEMPLATE"], array("ID" => $ID)));
}
} else {
$ex = $APPLICATION->GetException();
if ($ex) {
$strError .= $ex->GetString() . '<br>';
} else {
$strError .= GetMessage('SUP_ERROR') . '<br>';
}
}
} else {
示例3: ForumMoveMessage2Support
function ForumMoveMessage2Support($MID, &$strErrorMessage, &$strOKMessage, $arAddParams = array())
{
global $USER;
$MID = IntVal($MID);
$sError = array();
$sNote = array();
$arAddParams = !is_array($arAddParams) ? array($arAddParams) : $arAddParams;
$arAddParams["PERMISSION"] = !empty($arAddParams["PERMISSION"]) ? $arAddParams["PERMISSION"] : false;
if ($MID <= 0) {
$arError[] = GetMessage("MOVEMES_NO_MESS_EX");
}
if (!CModule::IncludeModule("support")) {
$arError[] = GetMessage("MOVEMES_NO_SUPPORT");
}
if (empty($arError)) {
$arMessage = CForumMessage::GetByID($MID, array("FILTER" => "N"));
if (!$arMessage) {
$arError[] = GetMessage("MOVEMES_NO_MESS_EX");
} elseif (IntVal($arMessage["AUTHOR_ID"]) <= 0) {
$arError[] = GetMessage("MOVEMES_NO_ANONYM");
} elseif (!CForumMessage::CanUserDeleteMessage($MID, $USER->GetUserGroupArray(), $USER->GetID(), $arAddParams["PERMISSION"])) {
$arError[] = GetMessage("MOVEMES_NO_PERMS2MOVE");
} else {
$arTopic = CForumTopic::GetByID($arMessage["TOPIC_ID"]);
$arFieldsSu = array("CLOSE" => "N", "TITLE" => $arTopic["TITLE"], "MESSAGE" => $arMessage["POST_MESSAGE"], "OWNER_USER_ID" => $arMessage["AUTHOR_ID"], "OWNER_SID" => $arMessage["AUTHOR_NAME"], "SOURCE_SID" => "forum");
$arIMAGE = CFile::MakeFileArray($arMessage["ATTACH_IMG"]);
if (is_array($arIMAGE)) {
$arIMAGE["MODULE_ID"] = "support";
$arFieldsSu["FILES"] = array($arIMAGE);
}
$SuID = CTicket::SetTicket($arFieldsSu);
$SuID = IntVal($SuID);
if ($SuID > 0) {
$sNote[] = GetMessage("MOVEMES_SUCCESS_SMOVE");
} else {
$arError[] = GetMessage("MOVEMES_ERROR_SMOVE");
}
}
}
if (!empty($arError)) {
$strErrorMessage .= implode(".\n", $arError) . ".\n";
}
if (!empty($arNote)) {
$strOKMessage .= implode(".\n", $arNote) . ".\n";
}
if (empty($arError)) {
return $SuID;
} else {
return False;
}
}