當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CEventMessage::err_mess方法代碼示例

本文整理匯總了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 ";
//.........這裏部分代碼省略.........
開發者ID:,項目名稱:,代碼行數:101,代碼來源:


注:本文中的CEventMessage::err_mess方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。