Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
* @since Log 1.7.0 * @package Log * * @example win.php Using the window handler. */ class Log_win extends Log { /** * The name of the output window. */ private string $name = 'LogWindow'; /** * The title of the output window. */ private string $title = 'Log Output Window'; /** * Mapping of log priorities to styles. */ private array $styles = [ PEAR_LOG_EMERG => 'color: red;', PEAR_LOG_ALERT => 'color: orange;', PEAR_LOG_CRIT => 'color: yellow;', PEAR_LOG_ERR => 'color: green;', PEAR_LOG_WARNING => 'color: blue;', PEAR_LOG_NOTICE => 'color: indigo;', PEAR_LOG_INFO => 'color: violet;', PEAR_LOG_DEBUG => 'color: black;', ]; /** * String buffer that holds line that are pending output. */ private array $buffer = []; /** * Constructs a new Log_win object. * * @param string $name Ignored. * @param string $ident The identity string. * @param array $conf The configuration array. * @param int $level Log messages up to and including this level. */ public function __construct( string $name, string $ident = '', array $conf = [], int $level = PEAR_LOG_DEBUG ) { $this->id = md5(microtime().random_int(0, mt_getrandmax())); $this->name = str_replace(' ', '_', $name); $this->ident = $ident; $this->mask = Log::MAX($level); if (isset($conf['title'])) { $this->title = $conf['title']; } if (isset($conf['styles']) && is_array($conf['styles'])) { $this->styles = $conf['styles']; } if (isset($conf['colors']) && is_array($conf['colors'])) { foreach ($conf['colors'] as $level => $color) { $this->styles[$level] .= "color: $color;"; } } register_shutdown_function([&$this, 'log_win_destructor']); } /** * Destructor */ public function log_win_destructor(): void { if ($this->opened || (count($this->buffer) > 0)) { $this->close(); } } /** * The first time open() is called, it will open a new browser window and * prepare it for output. * * This is implicitly called by log(), if necessary. * */ public function open(): bool { if (!$this->opened) { $win = $this->name; $styles = $this->styles; if (!empty($this->ident)) { $identHeader = "$win.document.writeln('Ident')"; } else { $identHeader = ''; } echo <<< EOT EOT; $this->opened = true; } return $this->opened; } /** * Closes the output stream if it is open. If there are still pending * lines in the output buffer, the output window will be opened so that * the buffer can be drained. * */ public function close(): bool { /* * If there are still lines waiting to be written, open the output * window so that we can drain the buffer. */ if (!$this->opened && (count($this->buffer) > 0)) { $this->open(); } if ($this->opened) { $this->writeln(''); $this->writeln(''); $this->drainBuffer(); $this->opened = false; } return ($this->opened === false); } /** * Writes the contents of the output buffer to the output window. * */ private function drainBuffer(): void { $win = $this->name; foreach ($this->buffer as $line) { echo "\n"; } /* Now that the buffer has been drained, clear it. */ $this->buffer = []; } /** * Writes a single line of text to the output buffer. * * @param string $line The line of text to write. * */ private function writeln(string $line): void { /* Add this line to our output buffer. */ $this->buffer[] = $line; /* Buffer the output until this page's headers have been sent. */ if (!headers_sent()) { return; } /* If we haven't already opened the output window, do so now. */ if (!$this->opened && !$this->open()) { return; } /* Drain the buffer to the output window. */ $this->drainBuffer(); } /** * Logs $message to the output window. The message is also passed along * to any Log_observer instances that are observing this Log. * * @param mixed $message String or object containing the message to log. * @param int|null $priority The priority of the message. Valid * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. * @return boolean True on success or false on failure. */ public function log($message, ?int $priority = null): bool { /* If a priority hasn't been specified, use the default value. */ if ($priority === null) { $priority = $this->priority; } /* Abort early if the priority is above the maximum logging level. */ if (!$this->isMasked($priority)) { return false; } /* Extract the string representation of the message. */ $message = $this->extractMessage($message); $message = preg_replace('/\r\n|\n|\r/', '
', $message); [$usec, $sec] = explode(' ', microtime()); /* Build the output line that contains the log entry row. */ $line = ''; $line .= sprintf('%s.%s', $this->formatTime((int)$sec, 'H:i:s'), substr($usec, 2, 2)); if (!empty($this->ident)) { $line .= '' . $this->ident . ''; } $line .= '' . ucfirst($this->priorityToString($priority)) . ''; $line .= sprintf('%s', $priority, $message); $line .= ''; $this->writeln($line); $this->announce(['priority' => $priority, 'message' => $message]); return true; } }