IncludeModuleLangFile(__FILE__);
if(CModule::IncludeModule("support")):
?>
|
|
|
|
|
if(!isset($W_SUPPORT_SUBJECT))
{
$w_subject = "";
$arrTemplate = array();
$db_res = CEventMessage::GetList('', '', Array("ACTIVE" => "Y", "EVENT_NAME"=>"TICKET_NEW_FOR_AUTHOR || TICKET_NEW_FOR_TECHSUPPORT || TICKET_CHANGE_FOR_TECHSUPPORT || TICKET_CHANGE_BY_AUTHOR_FOR_AUTHOR || TICKET_CHANGE_BY_SUPPORT_FOR_AUTHOR", "LID"=>$MAILBOX_LID));
while($ar_res = $db_res->Fetch()) $arrTemplate[] = $ar_res["SUBJECT"];
$arrTemplate = array_unique($arrTemplate);
if (is_array($arrTemplate) && count($arrTemplate)>0)
{
foreach ($arrTemplate as $subject)
{
$subject = preg_quote($subject, "/");
$subject = str_replace("#ID#", "([0-9]+)", $subject);
$subject = preg_replace("/#[-A-Z_0-9]+#/i".BX_UTF_PCRE_MODIFIER, ".*?", $subject);
$w_subject .= $subject."\r\n";
}
$W_SUPPORT_SUBJECT = $w_subject;
}
}
?>
|