本文整理汇总了PHP中CEventMessage::err_mess方法的典型用法代码示例。如果您正苦于以下问题:PHP CEventMessage::err_mess方法的具体用法?PHP CEventMessage::err_mess怎么用?PHP CEventMessage::err_mess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEventMessage
的用法示例。
在下文中一共展示了CEventMessage::err_mess方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetList
function GetList(&$by, &$order, $arFilter = array())
{
$err_mess = CEventMessage::err_mess() . "<br>Function: GetList<br>Line: ";
global $DB, $USER;
$arSqlSearch = array();
$strSqlSearch = "";
if (is_array($arFilter)) {
$filter_keys = array_keys($arFilter);
for ($i = 0; $i < count($filter_keys); $i++) {
$key = $filter_keys[$i];
$val = $arFilter[$filter_keys[$i]];
if (strlen($val) <= 0 || "{$val}" == "NOT_REF") {
continue;
}
if (is_array($val) && count($val) <= 0) {
continue;
}
$match_value_set = in_array($key . "_EXACT_MATCH", $filter_keys) ? true : false;
$key = strtoupper($key);
switch ($key) {
case "ID":
$match = $arFilter[$key . "_EXACT_MATCH"] == "N" && $match_value_set ? "Y" : "N";
$arSqlSearch[] = GetFilterQuery("M.ID", $val, $match);
break;
case "TYPE":
$match = $arFilter[$key . "_EXACT_MATCH"] == "Y" && $match_value_set ? "N" : "Y";
$arSqlSearch[] = GetFilterQuery("M.EVENT_NAME, T.NAME", $val, $match);
break;
case "EVENT_NAME":
case "TYPE_ID":
$match = $arFilter[$key . "_EXACT_MATCH"] == "N" && $match_value_set ? "Y" : "N";
$arSqlSearch[] = GetFilterQuery("M.EVENT_NAME", $val, $match);
break;
case "TIMESTAMP_1":
$arSqlSearch[] = "M.TIMESTAMP_X >= " . $DB->CharToDateFunction($val, "SHORT");
break;
case "TIMESTAMP_2":
$arSqlSearch[] = "M.TIMESTAMP_X < dateadd(day, 1, " . $DB->CharToDateFunction($val, "SHORT") . ")";
break;
case "LID":
case "LANG":
case "SITE_ID":
if (is_array($val)) {
$val = implode(" | ", $val);
}
$match = $arFilter[$key . "_EXACT_MATCH"] == "N" && $match_value_set ? "Y" : "N";
$arSqlSearch[] = GetFilterQuery("MS.SITE_ID", $val, $match);
$join_site = "\n\t\t\t\t\t\t\tLEFT JOIN b_event_message_site MS ON (M.ID = MS.EVENT_MESSAGE_ID)\n\t\t\t\t\t\t\t";
break;
case "ACTIVE":
$arSqlSearch[] = $val == "Y" ? "M.ACTIVE = 'Y'" : "M.ACTIVE = 'N'";
break;
case "FROM":
$match = $arFilter[$key . "_EXACT_MATCH"] == "Y" && $match_value_set ? "N" : "Y";
$arSqlSearch[] = GetFilterQuery("M.EMAIL_FROM", $val, $match);
break;
case "TO":
$match = $arFilter[$key . "_EXACT_MATCH"] == "Y" && $match_value_set ? "N" : "Y";
$arSqlSearch[] = GetFilterQuery("M.EMAIL_TO", $val, $match);
break;
case "BCC":
$match = $arFilter[$key . "_EXACT_MATCH"] == "Y" && $match_value_set ? "N" : "Y";
$arSqlSearch[] = GetFilterQuery("M.BCC", $val, $match);
break;
case "SUBJECT":
$match = $arFilter[$key . "_EXACT_MATCH"] == "Y" && $match_value_set ? "N" : "Y";
$arSqlSearch[] = GetFilterQuery("M.SUBJECT", $val, $match);
break;
case "BODY_TYPE":
$arSqlSearch[] = $val == "text" ? "M.BODY_TYPE = 'text'" : "M.BODY_TYPE = 'html'";
break;
case "BODY":
$match = $arFilter[$key . "_EXACT_MATCH"] == "Y" && $match_value_set ? "N" : "Y";
$arSqlSearch[] = GetFilterQuery("M.MESSAGE", $val, $match);
break;
}
}
}
if ($by == "id") {
$strSqlOrder = " ORDER BY M.ID ";
} elseif ($by == "active") {
$strSqlOrder = " ORDER BY M.ACTIVE ";
} elseif ($by == "event_name") {
$strSqlOrder = " ORDER BY M.EVENT_NAME ";
} elseif ($by == "to") {
$strSqlOrder = " ORDER BY M.TO ";
} elseif ($by == "bcc") {
$strSqlOrder = " ORDER BY M.BCC ";
} elseif ($by == "body_type") {
$strSqlOrder = " ORDER BY M.BODY_TYPE ";
} elseif ($by == "lid" || $by == "site_id") {
$strSqlOrder = " ORDER BY M.LID ";
} elseif ($by == "subject") {
$strSqlOrder = " ORDER BY M.SUBJECT ";
} else {
$strSqlOrder = " ORDER BY M.ID ";
$by = "id";
}
if ($order != "asc") {
$strSqlOrder .= " desc ";
//.........这里部分代码省略.........