Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
owncloud-prm /
settings /
Controller /
Delete
Unzip
Name
Size
Permission
Date
Action
AppSettingsController.php
3.93
KB
-rw-r--r--
2018-04-19 18:15
AuthSettingsController.php
4.87
KB
-rw-r--r--
2018-04-19 18:15
CertificateController.php
5.67
KB
-rw-r--r--
2018-04-19 18:15
CheckSetupController.php
10.05
KB
-rw-r--r--
2018-04-19 18:15
CorsController.php
4.36
KB
-rw-r--r--
2018-04-19 18:15
EncryptionController.php
3.42
KB
-rw-r--r--
2018-04-19 18:15
GroupsController.php
3.67
KB
-rw-r--r--
2018-04-19 18:15
LogSettingsController.php
2.41
KB
-rw-r--r--
2018-04-19 18:15
MailSettingsController.php
4.94
KB
-rw-r--r--
2018-04-19 18:15
SettingsPageController.php
5.47
KB
-rw-r--r--
2018-04-19 18:15
UsersController.php
26.41
KB
-rw-r--r--
2018-04-19 18:15
Save
Rename
<?php /** * @author Tom Needham <tom@owncloud.com> * * @copyright Copyright (c) 2018, ownCloud GmbH * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see <http://www.gnu.org/licenses/> * */ namespace OC\Settings\Controller; use OCP\Settings\ISettings; use OCP\Settings\ISettingsManager; use OCP\AppFramework\Controller; use OCP\IURLGenerator; use OCP\IRequest; use OCP\Template; use OCP\AppFramework\Http\TemplateResponse; use OCP\IGroupManager; use OCP\IUserSession; /** * @package OC\Settings\Controller */ class SettingsPageController extends Controller { /** @var ISettingsManager */ protected $settingsManager; /** @var IURLGenerator */ protected $urlGenerator; /** @var IGroupManager */ protected $groupManager; /** @var IUserSession */ protected $userSession; /** * @param string $appName * @param IRequest $request * @param ISettingsManager $settingsManager * @param IURLGenerator $urlGenerator * @param IGroupManager $groupManager * @param IUserSession $userSession */ public function __construct($appName, IRequest $request, ISettingsManager $settingsManager, IURLGenerator $urlGenerator, IGroupManager $groupManager, IUserSession $userSession) { parent::__construct($appName, $request); $this->settingsManager = $settingsManager; $this->urlGenerator = $urlGenerator; $this->groupManager = $groupManager; $this->userSession = $userSession; } /** * @NoAdminRequired * @NoSubadminRequired * @NoCSRFRequired * @param string $sectionid * @return \OCP\AppFramework\Http\TemplateResponse */ public function getPersonal($sectionid='general') { $admin = $this->groupManager->isAdmin($this->userSession->getUser()->getUID()); $personalSections = $this->settingsManager->getPersonalSections(); $adminSections = $admin ? $this->settingsManager->getAdminSections() : []; $panels = $this->settingsManager->getPersonalPanels($sectionid); $params = []; $params['type'] = 'personal'; $params['personalNav'] = $this->getNavigation($personalSections, $sectionid, 'personal'); $params['adminNav'] = $admin ? $this->getNavigation($adminSections, '', 'admin') : []; $params['panels'] = $this->getPanelsData($panels); $response = new TemplateResponse($this->appName, 'settingsPage', $params); return $response; } /** * Creates the admin settings page * @NoCSRFRequired * @param string $sectionid * @return \OCP\AppFramework\Http\TemplateResponse */ public function getAdmin($sectionid='general') { $personalSections = $this->settingsManager->getPersonalSections(); $adminSections = $this->settingsManager->getAdminSections(); $panels = $this->settingsManager->getAdminPanels($sectionid); $params = []; $params['type'] = 'admin'; $params['personalNav'] = $this->getNavigation($personalSections, '', 'personal'); $params['adminNav'] = $this->getNavigation($adminSections, $sectionid, 'admin'); $params['panels'] = $this->getPanelsData($panels); $response = new TemplateResponse($this->appName, 'settingsPage', $params); return $response; } /** * Gets the icon for the settings panel. The idea is * to get either URL or the icon name ( for backward * compatibility ). The icons returned will be svg * format and no other formats are supported. * * @param \OCP\Settings\ISection $section * @return string */ protected function getIconForSettingsPanel($section) { $icon = $section->getIconName() . '.svg'; $appPath = \OC_App::getAppPath($section->getID()); if (file_exists($appPath . '/img/' . $icon)) { $icon = $this->urlGenerator->imagePath($section->getID(), $icon); } else { $icon = $section->getIconName(); } return $icon; } /** * Gets an array used to generate the navigation in the UI * @param array $sections array of ISections * @param string $currentSectionID * @param string $type * @return array */ protected function getNavigation($sections, $currentSectionID, $type) { $nav = []; // Iterate through sections and get id, name and see if currently active foreach($sections as $section) { $icon = $this->getIconForSettingsPanel($section); $nav[] = [ 'id' => $section->getID(), 'link' => $this->urlGenerator->linkToRoute( 'settings.SettingsPage.get'.ucwords($type), ['sectionid' => $section->getID()] ), 'name' => ucfirst($section->getName()), 'active' => $section->getID() === $currentSectionID, 'icon' => $icon ]; } return $nav; } /** * Iterate through the panels and retrieve the html content * @param ISettings[] $panels array of ISettings * @return array containing panel html */ protected function getPanelsData($panels) { $data = []; foreach($panels as $panel) { $template = $panel->getPanel(); if($template instanceof Template || $template instanceof TemplateResponse) { $data[] = [ 'id' => get_class($panel), 'content' => ($template instanceof Template) ? $template->fetchPage() : $template->render() ]; } } return $data; } }