PHPFusion\Errors::getErrorLogs PHP Метод

getErrorLogs() приватный Метод

Displays error logs HTML
private getErrorLogs ( ) : string
Результат string
    private function getErrorLogs()
    {
        $aidlink = fusion_get_aidlink();
        $locale = self::$locale;
        $html = openform('error_logform', 'post', FUSION_REQUEST, array("class" => "text-center well m-t-5 m-b-5"));
        $html .= "<div class='display-inline-block text-right m-r-10'>" . $locale['440'] . "</div>\n";
        $html .= "<div class='display-inline-block'>\n";
        $html .= form_select('delete_status', "", "", array("allowclear" => TRUE, "options" => self::get_logTypes(), "class" => "m-b-10", "inline" => TRUE)) . form_button('delete_entries', $locale['453'], $locale['453'], array('class' => 'm-l-10 btn-primary'));
        $html .= "</div>\n";
        $html .= closeform();
        if (!empty($this->errors) or !empty($this->new_errors)) {
            $html .= "<a name='top'></a>\n";
            $html .= "<table class='table table-responsive center'>";
            $html .= "<tr>";
            $html .= "<th class='col-xs-5'>" . $locale['410'] . "</th>";
            $html .= "<th>Options</th>";
            $html .= "<th>" . $locale['454'] . "</th>";
            $html .= "<th class='col-xs-4'>" . $locale['414'] . "</th>\n";
            $html .= "</tr>\n";
            if (!empty($this->errors)) {
                foreach ($this->errors as $i => $data) {
                    $link = ADMIN . "errors.php" . fusion_get_aidlink() . "&amp;rowstart=" . $this->rowstart . "&amp;error_id=" . $data['error_id'] . "#file";
                    $file = $data['error_file'];
                    $link_title = $this->getMaxFolders($data['error_file'], 2);
                    $html .= "<tr id='rmd-" . $data['error_id'] . "'>";
                    $html .= "<td style='text-align:left;'>";
                    $html .= "<a href='" . $link . "' title='" . $file . "'>" . $link_title . "</a><br/>\n";
                    $html .= "<i>" . $data['error_page'] . "</i><br/>\n";
                    $html .= "<small>" . $data['error_message'] . "</small><br/>";
                    $html .= "<strong>" . $locale['415'] . " " . $data['error_line'] . "</strong><br/>\n";
                    $html .= "<small>" . timer($data['error_timestamp']) . "</small>\n";
                    $html .= "</td><td>" . $this->getGitsrc($data['error_file'], $data['error_line']) . "</td>\n";
                    $html .= "<td>" . $this->get_errorTypes($data['error_level']) . "</td>\n";
                    $html .= "<td id='ecmd_" . $data['error_id'] . "' style='white-space:nowrap;'>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='0' class='btn " . ($data['error_status'] == 0 ? 'active' : '') . " e_status_0 button btn-default move_error_log'>\n";
                    $html .= $locale['450'] . "</a>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='1' class='btn " . ($data['error_status'] == 1 ? 'active' : '') . " e_status_1 button btn-default move_error_log'>\n";
                    $html .= $locale['451'] . "</a>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='2' class='btn " . ($data['error_status'] == 2 ? 'active' : '') . " e_status_2 button btn-default move_error_log'>\n";
                    $html .= $locale['452'] . "</a>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='999' class='btn e_status_999 button btn-default move_error_log'>\n";
                    $html .= $locale['delete'] . "</a>\n";
                }
            }
            if (!empty($this->new_errors)) {
                foreach ($this->new_errors as $i => $data) {
                    $link = FUSION_SELF . $aidlink . "&amp;rowstart=" . $this->rowstart . "&amp;error_id=" . $data['error_id'] . "#file";
                    $file = stripslashes($data['error_file']);
                    $link_title = $this->getMaxFolders($data['error_file'], 2);
                    $html .= "<tr id='rmd-" . $data['error_id'] . "'>";
                    $html .= "<td>";
                    $html .= "<a href='" . $link . "' title='" . $file . "'>" . $link_title . "</a><br/>\n";
                    $html .= "<code class='error_page'>" . $data['error_page'] . "</code><br/>\n";
                    $html .= "<small>" . $data['error_message'] . "</small><br/>";
                    $html .= "<strong>" . $locale['415'] . " " . $data['error_line'] . "</strong><br/>\n";
                    $html .= "<small>" . timer($data['error_timestamp']) . "</small>\n";
                    $html .= "</td><td>" . $this->getGitsrc($data['error_file'], $data['error_line']) . "</td>\n";
                    $html .= "<td><label class='label label-success'>" . $locale['450'] . "</label> " . $this->get_errorTypes($data['error_level']) . "</td>\n";
                    $html .= "<td id='ecmd_" . $data['error_id'] . "' style='white-space:nowrap;'>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='0' class='btn " . ($data['error_status'] == 0 ? 'active' : '') . " e_status_0 button btn-default move_error_log'>\n";
                    $html .= $locale['450'] . "</a>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='1' class='btn " . ($data['error_status'] == 1 ? 'active' : '') . " e_status_1 button btn-default move_error_log'>\n";
                    $html .= $locale['451'] . "</a>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='2' class='btn " . ($data['error_status'] == 2 ? 'active' : '') . " e_status_2 button btn-default move_error_log'>\n";
                    $html .= $locale['452'] . "</a>\n";
                    $html .= "<a data-id='" . $data['error_id'] . "' data-type='999' class='btn e_status_999 button btn-default move_error_log'>\n";
                    $html .= $locale['delete'] . "</a>\n";
                }
            }
            $html .= "</table>\n";
            if ($this->rows > 20) {
                $html .= "<div class='m-t-10 text-center'>\n";
                $html .= makepagenav($this->rowstart, 20, $this->rows, 3, ADMIN . "errors.php" . $aidlink . "&amp;");
                $html .= "</div>\n";
            }
        } else {
            $html .= "<div class='text-center well'>" . $locale['418'] . "</div>\n";
        }
        $this->errorjs();
        return $html;
    }