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('