* * 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/> * */ OC_Util::checkSubAdminUser(); OC_App::setActiveNavigationEntry('core_users'); $userManager = \OC_User::getManager(); $groupManager = \OC_Group::getManager(); // Set the sort option: SORT_USERCOUNT or SORT_GROUPNAME $sortGroupsBy = \OC\Group\MetaData::SORT_USERCOUNT; if (\OC_App::isEnabled('user_ldap')) { $isLDAPUsed = $groupManager->isBackendUsed('\\OCA\\user_ldap\\GROUP_LDAP') || $groupManager->isBackendUsed('\\OCA\\user_ldap\\Group_Proxy'); if ($isLDAPUsed) { // LDAP user count can be slow, so we sort by group name here $sortGroupsBy = \OC\Group\MetaData::SORT_GROUPNAME; } } $config = \OC::$server->getConfig(); $isAdmin = OC_User::isAdminUser(OC_User::getUser()); $groupsInfo = new \OC\Group\MetaData(OC_User::getUser(), $isAdmin, $groupManager); $groupsInfo->setSorting($sortGroupsBy);
// initialize themable default strings and urls $certificateManager = \OC::$server->getCertificateManager(); $config = \OC::$server->getConfig(); $urlGenerator = \OC::$server->getURLGenerator(); // Highlight navigation entry OC_Util::addScript('settings', 'personal'); OC_Util::addStyle('settings', 'settings'); \OC_Util::addVendorScript('strengthify/jquery.strengthify'); \OC_Util::addVendorStyle('strengthify/strengthify'); \OC_Util::addScript('files', 'jquery.fileupload'); if ($config->getSystemValue('enable_avatars', true) === true) { \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop'); \OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop'); } // Highlight navigation entry OC_App::setActiveNavigationEntry('personal'); $storageInfo = OC_Helper::getStorageInfo('/'); $email = $config->getUserValue(OC_User::getUser(), 'settings', 'email', ''); $userLang = $config->getUserValue(OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage()); $languageCodes = OC_L10N::findAvailableLanguages(); // array of common languages $commonlangcodes = array('en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'); $languageNames = (include 'languageCodes.php'); $languages = array(); $commonlanguages = array(); foreach ($languageCodes as $lang) { $l = \OC::$server->getL10N('settings', $lang); if (substr($l->t('__language_name__'), 0, 1) !== '_') { //first check if the language name is in the translation file $ln = array('code' => $lang, 'name' => (string) $l->t('__language_name__')); } elseif (isset($languageNames[$lang])) {
* 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/> * */ use OC\Lock\NoopLockingProvider; OC_Util::checkAdminUser(); OC_App::setActiveNavigationEntry("admin"); $template = new OC_Template('settings', 'admin', 'user'); $l = OC_L10N::get('settings'); $showLog = \OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud'; $numEntriesToLoad = 3; $entries = OC_Log_Owncloud::getEntries($numEntriesToLoad + 1); $entriesRemaining = count($entries) > $numEntriesToLoad; $entries = array_slice($entries, 0, $numEntriesToLoad); $logFilePath = OC_Log_Owncloud::getLogFilePath(); $doesLogFileExist = file_exists($logFilePath); $logFileSize = filesize($logFilePath); $config = \OC::$server->getConfig(); $appConfig = \OC::$server->getAppConfig(); $request = \OC::$server->getRequest(); // Should we display sendmail as an option? $template->assign('sendmail_is_available', (bool) \OC_Helper::findBinaryPath('sendmail'));
/** * Marks a navigation entry as active * @param string $id id of the entry * @return boolean * * This function sets a navigation entry as active and removes the 'active' * property from all other entries. The templates can use this for * highlighting the current position of the user. * * @deprecated 8.1.0 Use \OC::$server->getNavigationManager()->setActiveEntry() instead * @since 4.0.0 */ public static function setActiveNavigationEntry($id) { return \OC_App::setActiveNavigationEntry($id); }
* @author Arthur Schiwon * @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ require_once '../../lib/base.php'; // Check if we are a user OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('bookmarks'); require_once 'bookmarksHelper.php'; OC_App::setActiveNavigationEntry('bookmarks_index'); OC_Util::addScript('bookmarks', 'addBm'); OC_Util::addStyle('bookmarks', 'bookmarks'); $tmpl = new OC_Template('bookmarks', 'addBm', 'user'); $url = isset($_GET['url']) ? urldecode($_GET['url']) : ''; $metadata = getURLMetadata($url); $tmpl->assign('URL', htmlentities($metadata['url'])); $tmpl->assign('TITLE', htmlentities($metadata['title'])); $tmpl->printPage();
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ // Init owncloud require_once '../lib/base.php'; // Check if we are a user OC_Util::checkLoggedIn(); // Load the files we need OC_Util::addStyle("files", "files"); OC_Util::addScript("files", "files"); OC_Util::addScript('files', 'filelist'); OC_Util::addScript('files', 'fileactions'); if (!isset($_SESSION['timezone'])) { OC_Util::addScript('files', 'timezone'); } OC_App::setActiveNavigationEntry("files_index"); // Load the files $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : ''; // Redirect if directory does not exist if (!OC_Filesystem::is_dir($dir . '/')) { header("Location: " . $_SERVER['PHP_SELF'] . ""); } $files = array(); foreach (OC_Files::getdirectorycontent($dir) as $i) { $i["date"] = OC_Util::formatDate($i["mtime"]); if ($i['type'] == 'file') { $fileinfo = pathinfo($i['name']); $i['basename'] = $fileinfo['filename']; if (!empty($fileinfo['extension'])) { $i['extention'] = '.' . $fileinfo['extension']; } else {
* * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OC_Util::checkAdminUser(); OC_App::loadApps(); // Load the files we need OC_Util::addStyle("settings", "settings"); OC_Util::addScript("settings", "apps"); OC_App::setActiveNavigationEntry("core_apps"); $installedApps = OC_App::getAllApps(); //TODO which apps do we want to blacklist and how do we integrate blacklisting with the multi apps folder feature? $blacklist = array('files'); //we dont want to show configuration for these $appList = array(); foreach ($installedApps as $app) { if (array_search($app, $blacklist) === false) { $info = OC_App::getAppInfo($app); if (!isset($info['name'])) { OC_Log::write('core', 'App id "' . $app . '" has no name in appinfo', OC_Log::ERROR); continue; } if (OC_Appconfig::getValue($app, 'enabled', 'no') == 'yes') { $active = true; } else {
<?php /** * ownCloud * * @author Michael Gapczynski * @copyright 2011 Michael Gapczynski GapczynskiM@gmail.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. * */ require_once '../../lib/base.php'; require_once 'lib_share.php'; OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('files_sharing'); OC_App::setActiveNavigationEntry("files_sharing_list"); OC_Util::addScript("files_sharing", "list"); $tmpl = new OC_Template("files_sharing", "list", "user"); $tmpl->assign("shared_items", OC_Share::getMySharedItems()); $tmpl->printPage();
<?php /** * Copyright (c) 2011, Frank Karlitschek karlitschek@kde.org * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ require_once '../lib/base.php'; OC_Util::checkLoggedIn(); // Load the files we need OC_Util::addStyle("settings", "settings"); OC_App::setActiveNavigationEntry("help"); $pagesize = 7; if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 0; } $kbe = OC_OCSClient::getKnownledgebaseEntries($page, $pagesize); $totalitems = $kbe['totalitems']; unset($kbe['totalitems']); $pagecount = ceil($totalitems / $pagesize); $tmpl = new OC_Template("settings", "help", "user"); $tmpl->assign("kbe", $kbe); $tmpl->assign("pagecount", $pagecount); $tmpl->assign("page", $page); $tmpl->printPage();
* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. * */ require_once '../lib/base.php'; OC_Util::checkAdminUser(); // Load the files we need OC_Util::addStyle("settings", "settings"); OC_Util::addScript("settings", "apps"); OC_App::setActiveNavigationEntry("core_log"); $entries = OC_Log_Owncloud::getEntries(); OC_Util::addScript('settings', 'log'); OC_Util::addStyle('settings', 'settings'); function compareEntries($a, $b) { return $b->time - $a->time; } usort($entries, 'compareEntries'); $tmpl = new OC_Template("settings", "log", "user"); $tmpl->assign('entries', $entries); $tmpl->printPage();
<?php /** * Copyright (c) 2011, Robin Appelman <*****@*****.**> * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ require_once '../lib/base.php'; OC_Util::checkLoggedIn(); OC_Util::addStyle('settings', 'settings'); OC_App::setActiveNavigationEntry('settings'); $tmpl = new OC_Template('settings', 'settings', 'user'); $forms = OC_App::getForms('settings'); $tmpl->assign('forms', array()); foreach ($forms as $form) { $tmpl->append('forms', $form); } $tmpl->printPage();
require_once '../../lib/base.php'; OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('files_svgedit'); // load required style sheets: OC_Util::addStyle('files_svgedit', 'ocsvg'); // load required javascripts: OC_Util::addScript('files_svgedit', 'svg-edit/embedapi'); OC_Util::addScript('files_svgedit', 'ocsvgEditor'); OC_Util::addScript('files_svgedit', 'canvg/canvg'); OC_Util::addScript('files_svgedit', 'canvg/rgbcolor'); OC_Util::addScript('files_svgedit', 'base64'); //OC_Util::addScript('files_svgedit', 'jsPDF/libs/sprintf'); //OC_Util::addScript('files_svgedit', 'jsPDF/jspdf'); OC_Util::addScript('files_svgedit', 'jsPDF/jspdf.min'); OC_Util::addScript('files_svgedit', 'svgToPdf'); OC_App::setActiveNavigationEntry('files_index'); $path = $_GET['file']; if (method_exists('OC_Filesystem', 'is_writable')) { $writable = OC_Filesystem::is_writable($path); } else { $writable = OC_Filesystem::is_writeable($path); } if (isset($_GET['file']) and $writable) { $filecontents = OC_Filesystem::file_get_contents($path); $filemtime = OC_Filesystem::filemtime($path); } else { $filecontents = ""; $filemtime = 0; } $tmpl = new OC_TEMPLATE("files_svgedit", "editor", "user"); $tmpl->assign('fileContents', json_encode($filecontents));
* License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ require_once '../../lib/base.php'; // Check if we are a user OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('media'); require_once 'lib_collection.php'; require_once 'lib_scanner.php'; OC_Util::addScript('media', 'player'); OC_Util::addScript('media', 'music'); OC_Util::addScript('media', 'playlist'); OC_Util::addScript('media', 'collection'); OC_Util::addScript('media', 'scanner'); OC_Util::addScript('media', 'jquery.jplayer.min'); OC_Util::addStyle('media', 'music'); OC_App::setActiveNavigationEntry('media_index'); $tmpl = new OC_Template('media', 'music', 'user'); $tmpl->printPage(); ?>
// Check if we are a user OC_Util::checkLoggedIn(); OC_Util::checkAppEnabled('contacts'); // Check if the user has an addressbook $addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); if (count($addressbooks) == 0) { OC_Contacts_Addressbook::add(OC_User::getUser(), 'default', 'Default Address Book'); $addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); } $prefbooks = OC_Preferences::getValue(OC_User::getUser(), 'contacts', 'openaddressbooks', null); if (is_null($prefbooks)) { $prefbooks = $addressbooks[0]['id']; OC_Preferences::setValue(OC_User::getUser(), 'contacts', 'openaddressbooks', $prefbooks); } // Load the files we need OC_App::setActiveNavigationEntry('contacts_index'); // Load a specific user? $id = isset($_GET['id']) ? $_GET['id'] : null; // sort addressbooks (use contactsort) usort($addressbooks, 'contacts_namesort'); // Addressbooks to load $openaddressbooks = explode(';', $prefbooks); $contacts = array(); foreach ($openaddressbooks as $addressbook) { $addressbookcontacts = OC_Contacts_VCard::all($addressbook); foreach ($addressbookcontacts as $contact) { if (is_null($contact['fullname'])) { continue; } $contacts[] = array('name' => $contact['fullname'], 'id' => $contact['id']); }
<?php require_once 'base.php'; // Check if we are a user if (!OC_User::isLoggedIn()) { header("Location: " . OC_Helper::linkTo('', 'index.php')); exit; } OC_Util::addStyle('files', "files"); OC_Util::addStyle('neurocloud', "nc"); OC_App::setActiveNavigationEntry('neurocloud_index'); $tmpl = new OC_Template('neurocloud', 'main', 'user'); $message = ""; $action = "launch"; if (isset($_GET["message"])) { $message = $_GET["message"]; } if (isset($_GET["action"])) { $action = $_GET["action"]; } if (isset($_GET["jobid"])) { if (isset($_GET["action"]) && $action === "kill") { $tmpl->assign('infomessage', "Successfully killed job " . $_GET["jobid"]); } elseif (isset($_GET["pid"]) && $_GET["pid"] !== "" && ($action = "launch")) { $tmpl->assign('infomessage', "Launched job " . $_GET["jobid"] . " (pid = " . $_GET["pid"] . ")"); } else { $tmpl->assign('errormessage', "Error launching job " . $_GET["jobid"]); } } if (array_key_exists("error", $_GET)) { $tmpl->assign("errormessage", $_GET["error"]);
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library 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 along with this library. If not, see <http://www.gnu.org/licenses/>. * */ // Init owncloud require_once '../lib/base.php'; OC_User::checkAdminUser(); $htaccessWorking = getenv('htaccessWorking') == 'true'; if (isset($_POST['maxUploadSize'])) { $maxUploadFilesize = $_POST['maxUploadSize']; OC_Files::setUploadLimit(OC_Helper::computerFileSize($maxUploadFilesize)); } else { $upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize')); $post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size')); $maxUploadFilesize = min($upload_max_filesize, $post_max_size); } OC_App::setActiveNavigationEntry("files_administration"); // return template $tmpl = new OC_Template("files", "admin", "user"); $tmpl->assign('htaccessWorking', $htaccessWorking); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->printPage();