Name = 'SpeedTest'; $this->Version = '1.0'; $this->Creator = 'Chronos'; $this->License = 'GNU/GPLv3'; $this->Description = 'Testing of download and upload bandwidth'; } function DoStart(): void { $this->System->Pages['speedtest'] = 'PageSpeedTest'; } } class PageSpeedTest extends Page { function __construct(System $System) { parent::__construct($System); $this->Title = 'Test rychlosti'; $this->Description = 'Test rychlosti připojení'; $this->ParentClass = 'PagePortal'; } function Show(): string { if (count($this->System->PathItems) > 1) { if ($this->System->PathItems[1] == 'download.php') return $this->ShowDownload(); //else if ($this->System->PathItems[1] == 'rss') return $this->ShowRSS(); else return PAGE_NOT_FOUND; } else return $this->ShowMain(); } function ShowDownload(): void { global $config; require_once(dirname(__FILE__)."/download.php"); } function ShowMain(): string { global $config; require_once(dirname(__FILE__)."/common.php"); ReadConfig(dirname(__FILE__)."/speedtest.cfg"); ## Redirect immediately to download.php if auto_start = 1 if ($config->{'general'}->{'auto_start'}) { Header("Location: ".$config['general']['base_url']."/download.php"); exit; } $Output = '