当前位置: 首页>>代码示例>>PHP>>正文


PHP CTicket::SetTicket方法代码示例

本文整理汇总了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;
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:ticket_list.php

示例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 {
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例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;
    }
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:51,代码来源:include.php


注:本文中的CTicket::SetTicket方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。