private function loadScripts() { if (isset($this->scripts) && $this->scripts != "") { foreach (explode(",", $this->scripts) as $script) { if ($script != "") { OCP\Util::addscript('ocDashboard', 'widgets/' . $this->id . '/' . $script); } } } }
<?php //load the required files OCP\Util::addStyle('files_videoviewer', 'style'); OCP\Util::addStyle('files_videoviewer', 'mediaelementplayer'); OCP\Util::addscript('files_videoviewer', 'viewer');
<?php //load the required files OCP\Util::addscript('files_markdown', 'editor'); OCP\Util::addStyle('files_markdown', 'preview'); OCP\Util::addStyle('files_markdown', 'highlight-default');
* 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/>. */ OC_Util::checkAdminUser(); OCP\Util::addScript('files_external', 'settings'); OCP\Util::addscript('3rdparty', 'chosen/chosen.jquery.min'); OCP\Util::addStyle('files_external', 'settings'); OCP\Util::addStyle('3rdparty', 'chosen/chosen'); $backends = OC_Mount_Config::getBackends(); $personal_backends = array(); $enabled_backends = explode(',', OCP\Config::getAppValue('files_external', 'user_mounting_backends', '')); foreach ($backends as $class => $backend) { if ($class != '\\OC\\Files\\Storage\\Local') { $personal_backends[$class] = array('backend' => $backend['backend'], 'enabled' => in_array($class, $enabled_backends)); } } $tmpl = new OCP\Template('files_external', 'settings'); $tmpl->assign('isAdminPage', true); $tmpl->assign('mounts', OC_Mount_Config::getSystemMountPoints()); $tmpl->assign('backends', $backends); $tmpl->assign('personal_backends', $personal_backends);
* 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/>. * */ OC_Util::checkAdminUser(); $params = array('cas_server_version', 'cas_server_hostname', 'cas_server_port', 'cas_server_path', 'cas_group_mapping', 'cas_group_root', 'cas_aliasName'); OCP\Util::addscript('user_cas', 'settings'); if ($_POST) { foreach ($params as $param) { if (isset($_POST[$param])) { OCP\Config::setAppValue('user_cas', $param, $_POST[$param]); } elseif ('cas_autocreate' == $param) { OCP\Config::setAppValue('user_cas', $param, 0); } elseif ('cas_update_user_data' == $param) { OCP\Config::setAppValue('user_cas', $param, 0); } } } // fill template $tmpl = new OCP\Template('user_cas', 'settings'); foreach ($params as $param) { $value = htmlentities(OCP\Config::getAppValue('user_cas', $param, ''));
<?php require_once __DIR__ . '/bootstrap.php'; OCP\App::addNavigationEntry(array('id' => 'contacts_index', 'order' => 10, 'href' => OCP\Util::linkTo('contacts', 'index.php'), 'icon' => OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => OC_L10N::get('contacts')->t('Contacts'))); OCP\Util::addscript('contacts', 'loader'); OC_Search::registerProvider('OCA\\Contacts\\SearchProvider'); if (OCP\User::isLoggedIn()) { foreach (OCA\Contacts\Addressbook::all(OCP\USER::getUser()) as $addressbook) { OCP\Contacts::registerAddressBook(new OCA\Contacts\AddressbookProvider($addressbook['id'])); } }
<?php /** * Copyright (c) 2011 Bart Visscher <*****@*****.**> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ $tmpl = new OCP\Template('calendar', 'settings'); $timezone = OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'timezone', ''); $tmpl->assign('timezone', $timezone); $tmpl->assign('timezones', DateTimeZone::listIdentifiers()); $tmpl->assign('calendars', OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()), false); OCP\Util::addscript('calendar', 'settings'); $tmpl->printPage();
* 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/>. * */ OC_Util::checkAdminUser(); $params = array('cas_server_version', 'cas_server_hostname', 'cas_server_port', 'cas_server_path', 'cas_autocreate', 'cas_update_user_data', 'cas_protected_groups', 'cas_default_group', 'cas_email_mapping', 'cas_displayName_mapping', 'cas_group_mapping', 'cas_cert_path'); OCP\Util::addscript('user_minimalcas', 'settings'); if ($_POST) { // CSRF check OCP\JSON::callCheck(); foreach ($params as $param) { if (isset($_POST[$param])) { OCP\Config::setAppValue('user_minimalcas', $param, $_POST[$param]); } elseif ('cas_autocreate' == $param) { // unchecked checkboxes are not included in the post paramters OCP\Config::setAppValue('user_minimalcas', $param, 0); } elseif ('cas_update_user_data' == $param) { OCP\Config::setAppValue('user_minimalcas', $param, 0); } } } // fill template
<?php /** * ownCloud - user_migrate * * @author Tom Needham * @copyright 2012 Tom Needham tom@owncloud.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/>. * */ OCP\App::registerPersonal('user_migrate', 'settings'); OCP\Util::addscript('user_migrate', 'export'); OCP\Util::addstyle('user_migrate', 'style'); // add settings page to navigation $entry = array('id' => "user_migrate_settings", 'order' => 1, 'href' => OCP\Util::linkTo("user_migrate", "admin.php"), 'name' => 'Import');
* 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/>. * */ OC_Util::checkAdminUser(); $params = array('saml_ssp_path', 'saml_sp_source', 'saml_force_saml_login', 'saml_autocreate', 'saml_update_user_data', 'saml_protected_groups', 'saml_default_group', 'saml_username_mapping', 'saml_email_mapping', 'saml_quota_mapping', 'saml_default_quota', 'saml_displayname_mapping', 'saml_group_mapping'); OCP\Util::addscript('user_saml', 'settings'); if ($_POST) { // CSRF check OCP\JSON::callCheck(); foreach ($params as $param) { if (isset($_POST[$param])) { OCP\Config::setAppValue('user_saml', $param, $_POST[$param]); } elseif ('saml_force_saml_login' == $param) { OCP\Config::setAppValue('user_saml', $param, 0); } elseif ('saml_autocreate' == $param) { // unchecked checkboxes are not included in the post paramters OCP\Config::setAppValue('user_saml', $param, 0); } elseif ('saml_update_user_data' == $param) { OCP\Config::setAppValue('user_saml', $param, 0); } }
*/ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('bookmarks'); // Prep screen if we come from the bookmarklet $url = ''; if (isset($_GET['url'])) { $url = $_GET['url']; } if (!isset($_GET['title']) || trim($_GET['title']) == '') { $datas = OC_Bookmarks_Bookmarks::getURLMetadata($url); $title = isset($datas['title']) ? $datas['title'] : ''; } else { $title = $_GET['title']; } OCP\Util::addscript('bookmarks/3rdparty', 'tag-it'); OCP\Util::addscript('bookmarks', 'addBm'); OCP\Util::addStyle('bookmarks', 'bookmarks'); OCP\Util::addStyle('bookmarks/3rdparty', 'jquery.tagit'); $bm = array('title' => $title, 'url' => $url, 'tags' => array(), 'desc' => '', 'is_public' => 0); //Find All Tags $qtags = OC_Bookmarks_Bookmarks::findTags(array(), 0, 400); $tags = array(); foreach ($qtags as $tag) { $tags[] = $tag['tag']; } $tmpl = new OCP\Template('bookmarks', 'addBm', 'base'); $tmpl->assign('requesttoken', OC_Util::callRegister()); $tmpl->assign('bookmark', $bm); $tmpl->assign('tags', json_encode($tags)); $tmpl->printPage();
<?php /* check if we need this $output=Array(); $return=1; exec('which latex',$output,$return); */ // only load text editor if the user is logged in if (\OCP\User::isLoggedIn()) { OCP\Util::callRegister(); $eventDispatcher = \OC::$server->getEventDispatcher(); $eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () { OCP\Util::addscript('files_latexeditor', 'livequery'); OCP\Util::addscript('files_latexeditor', 'latexeditor'); }); }
<?php OCP\User::checkAdminUser(); OCP\JSON::checkAppEnabled('external'); OCP\Util::addscript("external", "admin"); $tmpl = new OCP\Template('external', 'settings'); $tmpl->assign('images', glob(\OC_App::getAppPath('external') . '/img/*.*')); return $tmpl->fetchPage();
* 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/>. * Displays <a href="http://opensource.org/licenses/AGPL-3.0">GNU AFFERO GENERAL PUBLIC LICENSE</a> * @license http://opensource.org/licenses/AGPL-3.0 GNU AFFERO GENERAL PUBLIC LICENSE * */ include_once "user_otp/lib/utils.php"; OC_Util::checkAdminUser(); OCP\Util::addscript('user_otp', 'adminSettings'); $tmpl = new OCP\Template('user_otp', 'adminSettings'); // configuration tab $i = 0; $allTab[$i]['name'] = "userotpSettings-1"; $allTab[$i]['label'] = "Authenticator method"; $allTab[$i]['arrayConf'] = "config"; $i++; $allTab[$i]['name'] = "userotpSettings-2"; $allTab[$i]['label'] = "OTP Configuration"; $allTab[$i]['arrayConf'] = "configOtp"; $i++; // input type process general tab $i = 0; //$config[$i]['name']='forceCreateUsers'; //$config[$i]['label']='Force user_otp backend to create new users?';
* * 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/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); // Load the files we need OCP\Util::addStyle('files', 'files'); OCP\Util::addscript('files', 'jquery.iframe-transport'); OCP\Util::addscript('files', 'jquery.fileupload'); OCP\Util::addscript('files', 'files'); OCP\Util::addscript('files', 'filelist'); OCP\Util::addscript('files', 'fileactions'); if (!isset($_SESSION['timezone'])) { OCP\Util::addscript('files', 'timezone'); } OCP\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['SCRIPT_NAME'] . ''); exit; } $files = array(); foreach (OC_Files::getdirectorycontent($dir) as $i) { $i['date'] = OCP\Util::formatDate($i['mtime']); if ($i['type'] == 'file') { $fileinfo = pathinfo($i['name']); $i['basename'] = $fileinfo['filename'];
/* * Copyright 2014 by Francesco PIRANEO G. (fpiraneo@gmail.com) * * This file is part of oclife. * * oclife is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * oclife 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with oclife. If not, see <http://www.gnu.org/licenses/>. */ OCP\User::checkAdminUser(); // Handle translations $l = new \OC_L10N('oclife'); OCP\Util::addscript('oclife', 'oclife/oclife_admin'); $useImageMagick = intval(OCP\Config::getAppValue('oclife', 'useImageMagick')); $tmpl = new \OCP\Template('oclife', 'settings'); $tmpl->assign('useImageMagick', $useImageMagick === 1 ? 'CHECKED' : ''); $imagick = extension_loaded('imagick'); $imagickEnabled = $imagick ? $l->t('ImageMagick is loaded and ready to be used') : $l->t('ImageMagick is not loaded: Please refers to php manual.'); $tmpl->assign('imagickEnabled', $imagickEnabled); $tmpl->assign('enImageMagick', $imagick ? '' : 'disabled="DISABLED"'); $tmpl->assign('imagickMessageColor', $imagick ? 'green' : 'red'); return $tmpl->fetchPage();
<?php $tmpl = new OCP\Template('user_openid', 'settings'); $identity = OCP\Config::getUserValue(OCP\USER::getUser(), 'user_openid', 'identity', ''); $tmpl->assign('identity', htmlentities($identity)); OCP\Util::addscript('user_openid', 'settings'); return $tmpl->fetchPage();
<?php // only load text editor if the user is logged in if (\OCP\User::isLoggedIn()) { $eventDispatcher = \OC::$server->getEventDispatcher(); $eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () { OCP\Util::addStyle('files_texteditor', 'DroidSansMono/stylesheet'); OCP\Util::addStyle('files_texteditor', 'style'); OCP\Util::addStyle('files_texteditor', 'mobile'); OCP\Util::addscript('files_texteditor', 'editor'); OCP\Util::addscript('files_texteditor', 'vendor/ace/src-noconflict/ace'); }); }
OCP\Util::addStyle('files_sharing', 'mobile'); OCP\Util::addScript('files_sharing', 'public'); OCP\Util::addScript('files', 'fileactions'); OCP\Util::addScript('files', 'fileactionsmenu'); OCP\Util::addScript('files', 'jquery.iframe-transport'); OCP\Util::addScript('files', 'jquery.fileupload'); // JS required for folders OCP\Util::addStyle('files', 'files'); OCP\Util::addStyle('files', 'upload'); OCP\Util::addScript('files', 'filesummary'); OCP\Util::addScript('files', 'breadcrumb'); OCP\Util::addScript('files', 'fileinfomodel'); OCP\Util::addScript('files', 'newfilemenu'); OCP\Util::addScript('files', 'files'); OCP\Util::addScript('files', 'filelist'); OCP\Util::addscript('files', 'keyboardshortcuts'); $thumbSize = 1024; ?> <?php if ($_['previewSupported']) { /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/ ?> <link rel="image_src" href="<?php p(OCP\Util::linkToRoute('core_ajax_public_preview', array('x' => $thumbSize, 'y' => $thumbSize, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?> " /> <?php } ?>
<?php OCP\Util::addscript('files', 'admin'); ?> <form name="filesForm" class="section" action="#" method="post"> <h2><?php p($l->t('File handling')); ?> </h2> <label for="maxUploadSize"><?php p($l->t('Maximum upload size')); ?> </label> <input type="text" name='maxUploadSize' id="maxUploadSize" value='<?php p($_['uploadMaxFilesize']); ?> ' <?php if (!$_['uploadChangable']) { p('disabled'); } ?> /> <?php if ($_['displayMaxPossibleUploadSize']) { ?> (<?php p($l->t('max. possible: ')); p($_['maxPossibleUploadSize']); ?> ) <?php
<?php /** * @author Björn Schießle <*****@*****.**> * @author Frank Karlitschek <*****@*****.**> * @author Morris Jobke <*****@*****.**> * * @copyright Copyright (c) 2015, ownCloud, Inc. * @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/> * */ OCP\Util::addscript('files_versions', 'versions'); OCP\Util::addStyle('files_versions', 'versions'); \OCA\Files_Versions\Hooks::connectHooks();
<?php OCP\Util::addscript('files_tree', 'tree'); OCP\Util::addStyle('files_tree', 'files_tree'); OC::$CLASSPATH['OC_FilesTree_Hooks'] = 'apps/files_tree/lib/hooks.php'; OC::$CLASSPATH['OC_FilesTree_Explore'] = 'apps/files_tree/ajax/explore.php'; //General Hooks OCP\Util::connectHook('OC_Filesystem', 'create', 'OC_FilesTree_Hooks', 'ClearCache'); OCP\Util::connectHook('OC_Filesystem', 'delete', 'OC_FilesTree_Hooks', 'ClearCache'); OCP\Util::connectHook('OC_Filesystem', 'rename', 'OC_FilesTree_Hooks', 'ClearCache');
<?php /** * ownCloud - eBook reader application * * @author Priyanka Menghani * */ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('reader'); OCP\App::setActiveNavigationEntry('reader_index'); OCP\Util::addscript('reader', 'integrate'); OCP\Util::addscript('reader', 'pdf'); OCP\Util::addStyle('reader', 'reader'); // Get the current directory from window url. $dir = empty($_GET['dir']) ? '/' : $_GET['dir']; $tmpl = new OCP\Template('reader', 'index', 'user'); $tmpl->assign('dir', $dir); $tmpl->printPage();
<?php require_once 'apps/files_sharing/sharedstorage.php'; OC::$CLASSPATH['OC_Share'] = "apps/files_sharing/lib_share.php"; OCP\App::registerAdmin('files_sharing', 'settings'); OCP\Util::connectHook("OC_Filesystem", "post_delete", "OC_Share", "deleteItem"); OCP\Util::connectHook("OC_Filesystem", "post_rename", "OC_Share", "renameItem"); OCP\Util::connectHook("OC_Filesystem", "post_write", "OC_Share", "updateItem"); OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser'); OCP\Util::connectHook('OC_Group', 'post_addToGroup', 'OC_Share', 'addToGroupShare'); OCP\Util::connectHook('OC_Group', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare'); $dir = isset($_GET['dir']) ? $_GET['dir'] : '/'; if ($dir != '/Shared' || OCP\Config::getAppValue('files_sharing', 'resharing', 'yes') == 'yes') { OCP\Util::addscript("files_sharing", "share"); } OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min"); OCP\Util::addStyle('files_sharing', 'sharing'); OCP\Util::addStyle("3rdparty", "chosen/chosen");
?> <form id="alternative-logins"> <fieldset> <legend><?php p($l->t('Alternative Logins')); ?> </legend> <ul> <?php foreach ($_['alt_login'] as $login) { ?> <li><a class="button" href="<?php print_unescaped($login['href']); ?> " ><?php p($login['name']); ?> </a></li> <?php } ?> </ul> </fieldset> </form> <?php } ?> <?php OCP\Util::addscript('core', 'visitortimezone'); OCP\Util::addScript('core', 'lostpassword');
<?php //load the required files OCP\Util::addStyle('files_texteditor', 'style'); OCP\Util::addscript('files_texteditor', 'editor'); OCP\Util::addscript('files_texteditor', 'aceeditor/ace');
* 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/>. * */ /* ### CONFIG ### ----------------------------------------------------- */ /* Allow that users can delete own posts, admin can delete all */ define('USER_CONVERSATIONS_CAN_DELETE', true); /* Allow messages to a single user */ define('UC_SINGLE_USER_MSG', true); /* FILE ATACHMENTS This is a beta feature with some known bugs. It could changed in a future release without backward compatibility! */ define('USER_CONVERSATIONS_ATTACHMENTS', true); /* end of configration ------------------------------ */ // register model-file OC::$CLASSPATH['OC_Conversations'] = 'conversations/lib/conversations.php'; // add update script to change the app-icon even when app is not active, TODO: find app-not-active function...! OCP\Util::addscript('conversations', 'updateCheck'); // register HOOK change user group OC_HOOK::connect('OC_User', 'post_addToGroup', 'OC_Conversations', 'changeUserGroup'); OC_HOOK::connect('OC_User', 'post_removeFromGroup', 'OC_Conversations', 'changeUserGroup'); $l = OC_L10N::get('conversations'); OCP\App::addNavigationEntry(array('id' => 'conversations', 'order' => 5, 'href' => OCP\Util::linkTo('conversations', 'index.php'), 'icon' => OCP\Util::imagePath('conversations', 'conversations.png'), 'name' => $l->t('Conversation')));
//Fix currentview for fullcalendar if (OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview") { OCP\Config::setUserValue(OCP\USER::getUser(), "calendar", "currentview", "agendaWeek"); } if (OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview") { OCP\Config::setUserValue(OCP\USER::getUser(), "calendar", "currentview", "month"); } if (OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') == "listview") { OCP\Config::setUserValue(OCP\USER::getUser(), "calendar", "currentview", "list"); } OCP\Util::addscript('3rdparty/fullcalendar', 'fullcalendar'); OCP\Util::addStyle('3rdparty/fullcalendar', 'fullcalendar'); OCP\Util::addscript('3rdparty/timepicker', 'jquery.ui.timepicker'); OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker'); if (OCP\Config::getUserValue(OCP\USER::getUser(), "calendar", "timezone") == null || OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'timezonedetection') == 'true') { OCP\Util::addscript('calendar', 'geo'); } OCP\Util::addscript('calendar', 'calendar'); OCP\Util::addStyle('calendar', 'style'); OCP\Util::addscript('', 'jquery.multiselect'); OCP\Util::addStyle('', 'jquery.multiselect'); OCP\Util::addscript('contacts', 'jquery.multi-autocomplete'); OCP\Util::addscript('', 'oc-vcategories'); OCP\App::setActiveNavigationEntry('calendar_index'); $tmpl = new OCP\Template('calendar', 'calendar', 'user'); $tmpl->assign('eventSources', $eventSources); $tmpl->assign('categories', $categories); if (array_key_exists('showevent', $_GET)) { $tmpl->assign('showevent', $_GET['showevent']); } $tmpl->printPage();
* 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/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('media'); require_once OC::$APPSROOT . '/apps/media/lib_collection.php'; require_once OC::$APPSROOT . '/apps/media/lib_scanner.php'; OCP\Util::addscript('media', 'player'); OCP\Util::addscript('media', 'music'); OCP\Util::addscript('media', 'playlist'); OCP\Util::addscript('media', 'collection'); OCP\Util::addscript('media', 'scanner'); OCP\Util::addscript('media', 'jquery.jplayer.min'); OCP\Util::addStyle('media', 'music'); OCP\App::setActiveNavigationEntry('media_index'); $tmpl = new OCP\Template('media', 'music', 'user'); $tmpl->printPage(); ?>
* 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/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); // Load the files we need OCP\Util::addStyle("files", "files"); OCP\Util::addscript("files", "files"); // Load the files $dir = isset($_GET['dir']) ? $_GET['dir'] : ''; $files = array(); foreach (\OC\Files\Filesystem::getDirectoryContent($dir) as $i) { $i["date"] = date($CONFIG_DATEFORMAT, $i["mtime"]); $files[] = $i; } // Make breadcrumb $breadcrumb = array(); $pathtohere = "/"; foreach (explode("/", $dir) as $i) { if ($i != "") { $pathtohere .= "{$i}/"; $breadcrumb[] = array("dir" => $pathtohere, "name" => $i); }