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


PHP Logging::GeneralLog方法代码示例

本文整理汇总了PHP中Logging::GeneralLog方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::GeneralLog方法的具体用法?PHP Logging::GeneralLog怎么用?PHP Logging::GeneralLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Logging的用法示例。


在下文中一共展示了Logging::GeneralLog方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: StoreFile

function StoreFile($_visitor, $_browserId, $_partner, $_fullname, $_chatId)
{
    $filename = IOStruct::GetNamebase($_FILES['form_userfile']['name']);
    Logging::GeneralLog($filename);
    if (!IOStruct::IsValidUploadFile($filename)) {
        return false;
    }
    if (empty($_fullname)) {
        $_fullname = Visitor::GetNoName($_visitor->UserId . Communication::GetIP());
    }
    $fileid = md5($filename . $_visitor->UserId . $_browserId);
    $fileurid = EX_FILE_UPLOAD_REQUEST . "_" . $fileid;
    $filemask = $_visitor->UserId . "_" . $fileid;
    $request = new FileUploadRequest($fileurid, $_partner, $_chatId);
    $request->Load();
    if ($request->Permission == PERMISSION_FULL) {
        if (move_uploaded_file($_FILES["form_userfile"]["tmp_name"], PATH_UPLOADS . $request->FileMask)) {
            KnowledgeBase::CreateFolders($_partner, false);
            KnowledgeBase::Process($_partner, $_visitor->UserId, $_fullname, 0, $_fullname, 0, 5, 3);
            KnowledgeBase::Process($_partner, $fileid, $filemask, 4, $_FILES["form_userfile"]["name"], 0, $_visitor->UserId, 4, $_FILES["form_userfile"]["size"]);
            $request->Download = true;
            $request->Save();
            return true;
        } else {
            $request->Error = true;
            $request->Save();
        }
    }
    return false;
}
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:30,代码来源:upload.php

示例2: DatabaseLog

 static function DatabaseLog($_log)
 {
     Logging::GeneralLog($_log, FILE_SQL_ERROR_LOG);
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:4,代码来源:objects.global.inc.php

示例3: foreach

         if ($ticket != null) {
             $feedback->UserId = $ticket->SenderUserId;
             $feedback->TicketId = $ticket->Id;
             if (!empty($ticket->Editor)) {
                 $feedback->OperatorId = $ticket->Editor->Editor;
                 $feedback->GroupId = $ticket->Editor->GroupId;
             }
             $feedback->UserData = UserData::FromTicketMessage($ticket->Messages[0]);
         }
     }
     $isSpam = !empty(Server::$Configuration->File["gl_sfc"]) && Visitor::CreateSPAMFilter($userid, false);
     if (!$isSpam) {
         $feedback->AddCriteriaDataFromServerInput();
         $feedback->Save();
     } else {
         Logging::GeneralLog("Feedback matches SPAM filter rule.");
     }
     $fb_html = str_replace("<!--sub_title-->", "<br>" . LocalizationManager::$TranslationStrings["client_feedback_success"] . "<script>parent.parent.lz_chat_feedback_result();</script>", $fb_html);
     $fb_html = str_replace("<!--title-->", "<br><br><br>" . LocalizationManager::$TranslationStrings["client_thank_you"], $fb_html);
     $fb_html = str_replace("<!--visible-->", "none", $fb_html);
 } else {
     $inputs_html = $js_id_list = "";
     foreach (Server::$Configuration->Database["gl_fb"] as $id => $criteria) {
         if (!empty($js_id_list)) {
             $js_id_list .= ",";
         }
         $js_id_list .= "'" . $id . "'";
         $inputs_html .= $criteria->GetHTML();
     }
     $fb_html = str_replace("<!--criteria-->", $inputs_html, $fb_html);
     $fb_html = str_replace("<!--ids-->", $js_id_list, $fb_html);
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:31,代码来源:feedback.php

示例4: processFilters

function processFilters()
{
    if (isset($_POST[POST_INTERN_PROCESS_FILTERS . "_va"])) {
        $creators = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_va"]);
        $createds = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vb"]);
        $editors = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vc"]);
        $ips = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vd"]);
        $expiredates = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_ve"]);
        $userids = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vf"]);
        $filternames = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vg"]);
        $reasons = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vh"]);
        $filterids = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vi"]);
        $activestates = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vj"]);
        $actiontypes = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vk"]);
        $exertions = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vl"]);
        $languages = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vm"]);
        $countries = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vp"]);
        $allowchats = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vq"]);
        $allowtickets = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vr"]);
        $allowtracking = explode(POST_ACTION_VALUE_SPLITTER, $_POST[POST_INTERN_PROCESS_FILTERS . "_vs"]);
        foreach ($filterids as $key => $id) {
            $filter = new Filter($filterids[$key]);
            $filter->Creator = $creators[$key];
            $filter->Created = $createds[$key] != "0" ? $createds[$key] : time();
            $filter->Editor = $editors[$key];
            $filter->Edited = time();
            $filter->IP = $ips[$key];
            $filter->Expiredate = $expiredates[$key];
            $filter->Userid = $userids[$key];
            $filter->Reason = $reasons[$key];
            $filter->Filtername = $filternames[$key];
            $filter->Activestate = $activestates[$key];
            $filter->Exertion = $exertions[$key];
            $filter->Languages = $languages[$key];
            $filter->Countries = $countries[$key];
            $filter->AllowChats = !empty($allowchats[$key]);
            $filter->AllowTickets = !empty($allowtickets[$key]);
            $filter->AllowTracking = !empty($allowtracking[$key]);
            if ($actiontypes[$key] == POST_ACTION_ADD || $actiontypes[$key] == POST_ACTION_EDIT) {
                $filter->Save();
            } else {
                if ($actiontypes[$key] == POST_ACTION_REMOVE) {
                    $filter->Destroy();
                } else {
                    Logging::GeneralLog("unknown command f1");
                }
            }
        }
        CacheManager::FlushKey(DATA_CACHE_KEY_FILTERS);
    }
}
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:51,代码来源:functions.internal.process.inc.php

示例5: ZENDParseEmails

 private function ZENDParseEmails(&$_reload, $mails, $_delete, $_test)
 {
     $list = array();
     $message = null;
     $starttime = time();
     $executiontime = Server::SetTimeLimit(CALLER_TIMEOUT - 10);
     $delete = array();
     $subject = "";
     try {
         $counter = 0;
         foreach ($mails as $mnum => $message) {
             if ($_test) {
                 return count($mails);
             }
             try {
                 $temail = new TicketEmail();
                 if ($message->headerExists("subject")) {
                     $subject = $temail->Subject = mimeHeaderDecode($message->Subject);
                 }
                 if ($message->headerExists("message-id")) {
                     $temail->Id = str_replace(array("<", ">"), "", $message->MessageId);
                 }
                 if (empty($temail->Id)) {
                     $temail->Id = getId(32);
                 }
                 if ($_delete) {
                     $delete[$mnum] = $temail->Id;
                 }
                 if (strpos($message->From, "<") !== false) {
                     $fromparts = explode("<", str_replace(">", "", $message->From));
                     if (!empty($fromparts[0])) {
                         $temail->Name = str_replace(array("\""), "", mimeHeaderDecode(trim($fromparts[0])));
                     }
                     $temail->Email = trim($fromparts[1]);
                 } else {
                     $temail->Email = trim($message->From);
                 }
                 if (strpos($message->To, "<") !== false) {
                     $toparts = explode("<", str_replace(">", "", $message->To));
                     $temail->ReceiverEmail = trim($toparts[1]);
                 } else {
                     $temail->ReceiverEmail = trim($message->To);
                 }
                 if ($message->headerExists("reply-to")) {
                     if (strpos($message->ReplyTo, "<") !== false) {
                         $rtoparts = explode("<", str_replace(">", "", $message->ReplyTo));
                         $temail->ReplyTo = trim($rtoparts[1]);
                     } else {
                         $temail->ReplyTo = trim($message->ReplyTo);
                     }
                 }
                 $parts = array();
                 if ($message->isMultipart()) {
                     foreach (new RecursiveIteratorIterator($message) as $part) {
                         $parts[] = $part;
                     }
                 } else {
                     $parts[] = $message;
                 }
                 foreach ($parts as $part) {
                     try {
                         if ($part->headerExists("content-type")) {
                             $ctype = $part->contentType;
                         } else {
                             $ctype = 'text/html';
                         }
                         if ($part->headerExists("content-disposition")) {
                             $ctype .= "; " . $part->contentDisposition;
                         }
                         $charset = "";
                         $hparts = explode(";", str_replace(" ", "", $ctype));
                         foreach ($hparts as $hpart) {
                             if (strpos(strtolower($hpart), "charset=") === 0) {
                                 $charset = trim(str_replace(array("charset=", "'", "\""), "", strtolower($hpart)));
                             }
                         }
                         $isatt = strpos(strtolower($ctype), "name=") !== false || strpos(strtolower($ctype), "filename=") !== false;
                         if (DEBUG_MODE) {
                             Logging::GeneralLog(" PROCESSING EMAIL / charset:" . $ctype . " - " . $charset . " - " . $subject . " - " . $isatt);
                         }
                         if (!$isatt && (($html = strpos(strtolower($ctype), 'text/html') !== false) || strpos(strtolower($ctype), 'text/plain') !== false)) {
                             $content = $part->getContent();
                             foreach ($part->getHeaders() as $name => $value) {
                                 if (strpos(strtolower($name), 'content-transfer-encoding') !== false && strpos(strtolower($value), 'quoted-printable') !== false) {
                                     $content = quoted_printable_decode($content);
                                 } else {
                                     if (strpos(strtolower($name), 'content-transfer-encoding') !== false && strpos(strtolower($value), 'base64') !== false) {
                                         $content = base64_decode($content);
                                     }
                                 }
                             }
                             if ($html) {
                                 $temail->BodyHTML = max($temail->BodyHTML, $content);
                                 $content = MailSystem::DownConvertHTML($content);
                             }
                             if ((!$html || empty($temail->Body)) && !empty($content)) {
                                 if (strpos(strtolower($charset), 'utf-8') === false && !empty($charset)) {
                                     if (DEBUG_MODE) {
                                         Logging::GeneralLog(" PROCESSING EMAIL / iconv | " . strtoupper($charset) . " | " . 'UTF-8' . " | " . $subject);
                                     }
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:101,代码来源:objects.mail.inc.php

示例6: ImportButtons

 static function ImportButtons($_folder, $_prefix, $_connection)
 {
     try {
         Logging::SecurityLog("ServerManager::ImportButtons", "", CALLER_SYSTEM_ID);
         $buttons = IOStruct::ReadDirectory($_folder, ".php", true);
         foreach ($buttons as $button) {
             $parts = explode("_", $button);
             if (count($parts) == 3) {
                 $type = $parts[0] == "overlay" ? $parts[0] : "inlay";
                 $id = intval($parts[1]);
                 $online = explode(".", $parts[2]);
                 $online = $online[0];
                 $parts = explode(".", $button);
                 $itype = $parts[1];
                 $_connection->Query(false, "INSERT INTO `" . DBManager::RealEscape($_prefix) . DATABASE_IMAGES . "` (`id`,`online`,`button_type`,`image_type`,`data`) VALUES ('" . DBManager::RealEscape($id) . "','" . DBManager::RealEscape($online) . "','" . DBManager::RealEscape($type) . "','" . DBManager::RealEscape($itype) . "','" . DBManager::RealEscape(IOStruct::ToBase64($_folder . $button)) . "');");
             }
         }
     } catch (Exception $e) {
         Logging::GeneralLog(serialize($e));
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:21,代码来源:functions.internal.man.inc.php


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