From baf17af600585811130793c934f75034862cfb68 Mon Sep 17 00:00:00 2001 From: kmvan Date: Thu, 20 Dec 2018 20:29:14 +0800 Subject: [PATCH] update to 1.7.5 --- dist/prober.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/prober.php b/dist/prober.php index 914fa4a5..c514ca2a 100644 --- a/dist/prober.php +++ b/dist/prober.php @@ -155,7 +155,7 @@ {$this->getContent()} HTML; -} private function getContent() { $errLevels = HelperApi::getErrNameByCode(\ini_get('error_reporting')); $items = array( array( 'label' => $this->_('PHP info detail'), 'content' => HelperApi::getBtn("👆 {$this->_('Click to check')}", '?action=phpInfo'), ), array( 'label' => $this->_('Version'), 'title' => \sprintf($this->_('X Prober builtin latest PHP stable version: %s'), '7.2.12'), 'content' => \PHP_VERSION . ' ' . (\version_compare(\PHP_VERSION, ConfigApi::$LATEST_PHP_STABLE_VERSION, '<') ? $this->_('(Old)') : $this->_('(Up to date)')), ), array( 'label' => $this->_('SAPI interface'), 'content' => \PHP_SAPI, ), array( 'label' => $this->_('Error reporting'), 'title' => "error_reporting: {$errLevels}", 'content' => HelperApi::strcut($errLevels), ), array( 'label' => $this->_('Max memory limit'), 'title' => 'memory_limit', 'content' => \ini_get('memory_limit'), ), array( 'label' => $this->_('Max POST size'), 'title' => 'post_max_size', 'content' => \ini_get('post_max_size'), ), array( 'label' => $this->_('Max upload size'), 'title' => 'upload_max_filesize', 'content' => \ini_get('upload_max_filesize'), ), array( 'label' => $this->_('Max input variables'), 'title' => 'max_input_vars', 'content' => \ini_get('max_input_vars'), ), array( 'label' => $this->_('Max execution time'), 'title' => 'max_execution_time', 'content' => \ini_get('max_execution_time'), ), array( 'label' => $this->_('Timeout for socket'), 'title' => 'default_socket_timeout', 'content' => \ini_get('default_socket_timeout'), ), array( 'label' => $this->_('Display errors'), 'title' => 'display_errors', 'content' => HelperApi::getIni('display_errors'), ), array( 'label' => $this->_('Treatment URLs file'), 'title' => 'allow_url_fopen', 'content' => HelperApi::getIni('allow_url_fopen'), ), array( 'label' => $this->_('SMTP support'), 'title' => 'SMTP', 'content' => HelperApi::getIni('SMTP') ?: HelperApi::getIni(0, false), ), array( 'col' => '1-1', 'label' => $this->_('Disabled functions'), 'title' => 'disable_functions', 'content' => \implode(', ', \explode(',', HelperApi::getIni('disable_functions'))) ?: '-', ), array( 'col' => '1-1', 'label' => $this->_('Disabled classes'), 'title' => 'disable_classes', 'content' => \implode(', ', \explode(',', HelperApi::getIni('disable_classes'))) ?: '-', ), ); $content = ''; foreach ($items as $item) { $title = isset($item['title']) ? "title=\"{$item['title']}\"" : ''; $col = isset($item['col']) ? $item['col'] : '1-3'; $id = isset($item['id']) ? "id=\"{$item['id']}\"" : ''; $content .= << $this->_('PHP info detail'), 'content' => HelperApi::getBtn("👆 {$this->_('Click to check')}", '?action=phpInfo'), ), array( 'label' => $this->_('Version'), 'title' => \sprintf($this->_('X Prober builtin latest PHP stable version: %s'), ConfigApi::$LATEST_PHP_STABLE_VERSION), 'content' => \PHP_VERSION . ' ' . (\version_compare(\PHP_VERSION, ConfigApi::$LATEST_PHP_STABLE_VERSION, '<') ? $this->_('(Old)') : $this->_('(Up to date)')), ), array( 'label' => $this->_('SAPI interface'), 'content' => \PHP_SAPI, ), array( 'label' => $this->_('Error reporting'), 'title' => "error_reporting: {$errLevels}", 'content' => HelperApi::strcut($errLevels), ), array( 'label' => $this->_('Max memory limit'), 'title' => 'memory_limit', 'content' => \ini_get('memory_limit'), ), array( 'label' => $this->_('Max POST size'), 'title' => 'post_max_size', 'content' => \ini_get('post_max_size'), ), array( 'label' => $this->_('Max upload size'), 'title' => 'upload_max_filesize', 'content' => \ini_get('upload_max_filesize'), ), array( 'label' => $this->_('Max input variables'), 'title' => 'max_input_vars', 'content' => \ini_get('max_input_vars'), ), array( 'label' => $this->_('Max execution time'), 'title' => 'max_execution_time', 'content' => \ini_get('max_execution_time'), ), array( 'label' => $this->_('Timeout for socket'), 'title' => 'default_socket_timeout', 'content' => \ini_get('default_socket_timeout'), ), array( 'label' => $this->_('Display errors'), 'title' => 'display_errors', 'content' => HelperApi::getIni('display_errors'), ), array( 'label' => $this->_('Treatment URLs file'), 'title' => 'allow_url_fopen', 'content' => HelperApi::getIni('allow_url_fopen'), ), array( 'label' => $this->_('SMTP support'), 'title' => 'SMTP', 'content' => HelperApi::getIni('SMTP') ?: HelperApi::getIni(0, false), ), array( 'col' => '1-1', 'label' => $this->_('Disabled functions'), 'title' => 'disable_functions', 'content' => \implode(', ', \explode(',', HelperApi::getIni('disable_functions'))) ?: '-', ), array( 'col' => '1-1', 'label' => $this->_('Disabled classes'), 'title' => 'disable_classes', 'content' => \implode(', ', \explode(',', HelperApi::getIni('disable_classes'))) ?: '-', ), ); $content = ''; foreach ($items as $item) { $title = isset($item['title']) ? "title=\"{$item['title']}\"" : ''; $col = isset($item['col']) ? $item['col'] : '1-3'; $id = isset($item['id']) ? "id=\"{$item['id']}\"" : ''; $content .= <<
{$item['label']}
@@ -392,7 +392,7 @@ function fillNetworkStats(data) { -1, 'msg' => I18nApi::_('File can not update.'), )); } $content = \file_get_contents(ConfigApi::$UPDATE_PHP_URL); if ( ! $content) { HelperApi::dieJson(array( 'code' => -1, 'msg' => I18nApi::_('Update file not found.'), )); } if ((bool) \file_put_contents(__FILE__, $content)) { HelperApi::dieJson(array( 'code' => 0, 'msg' => I18nApi::_('Update success...'), )); } HelperApi::dieJson(array( 'code' => -1, 'msg' => I18nApi::_('Update error.'), )); } public function filter() { $version = ConfigApi::$APP_VERSION; $changeLogUrl = ConfigApi::$CHANGELOG_URL; $authorUrl = ConfigApi::$AUTHOR_URL; echo << -1, 'msg' => I18nApi::_('File can not update.'), )); } $content = \file_get_contents(ConfigApi::$UPDATE_PHP_URL); if ( ! $content) { HelperApi::dieJson(array( 'code' => -1, 'msg' => I18nApi::_('Update file not found.'), )); } if ((bool) \file_put_contents(__FILE__, $content)) { if (\function_exists('\\opcache_reset')) { \opcache_reset(); } HelperApi::dieJson(array( 'code' => 0, 'msg' => I18nApi::_('Update success...'), )); } HelperApi::dieJson(array( 'code' => -1, 'msg' => I18nApi::_('Update error.'), )); } public function filter() { $version = ConfigApi::$APP_VERSION; $changeLogUrl = ConfigApi::$CHANGELOG_URL; $authorUrl = ConfigApi::$AUTHOR_URL; echo << (function(){ var versionCompare = function(left, right) { @@ -522,7 +522,7 @@ function getVersionInfo(data){
HTML; } return $content; } } -namespace InnStudio\Prober\Config; class ConfigApi { public static $APP_VERSION = '1.7.4'; public static $APP_NAME = 'X Prober'; public static $APP_URL = 'https://github.com/kmvan/x-prober'; public static $AUTHOR_URL = 'https://inn-studio.com/prober'; public static $UPDATE_PHP_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/dist/prober.php'; public static $AUTHOR_NAME = 'INN STUDIO'; public static $CHANGELOG_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/CHANGELOG.md'; public static $LATEST_PHP_STABLE_VERSION = '7.2.12'; } +namespace InnStudio\Prober\Config; class ConfigApi { public static $APP_VERSION = '1.7.5'; public static $APP_NAME = 'X Prober'; public static $APP_URL = 'https://github.com/kmvan/x-prober'; public static $AUTHOR_URL = 'https://inn-studio.com/prober'; public static $UPDATE_PHP_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/dist/prober.php'; public static $AUTHOR_NAME = 'INN STUDIO'; public static $CHANGELOG_URL = 'https://raw.githubusercontent.com/kmvan/x-prober/master/CHANGELOG.md'; public static $LATEST_PHP_STABLE_VERSION = '7.3.0'; } namespace InnStudio\Prober\Style; use InnStudio\Prober\Events\EventsApi; class Style { private $ID = 'style'; public function __construct() { EventsApi::on('style', array($this, 'filter')); } public function filter() { $this->styleProgress(); $this->styleGlobal(); $this->stylePoiContainer(); $this->stylePoiGrid(); $this->styleTitle(); } private function styleTitle() { ?>