* 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/>. * */ OC::$CLASSPATH['OCA\\Gallery\\Thumbnail'] = 'gallery/lib/thumbnail.php'; OC::$CLASSPATH['OCA\\Gallery\\AlbumThumbnail'] = 'gallery/lib/thumbnail.php'; OC::$CLASSPATH['OCA\\Gallery\\Share\\Picture'] = 'gallery/lib/share.php'; OC::$CLASSPATH['OCA\\Gallery\\Share\\Gallery'] = 'gallery/lib/share.php'; $l = OCP\Util::getL10N('gallery'); OCP\App::addNavigationEntry(array('id' => 'gallery_index', 'order' => 3, 'href' => OCP\Util::linkTo('gallery', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/picture.svg'), 'name' => $l->t('Pictures'))); // make slideshow available in files and public shares OCP\Util::addScript('gallery', 'jquery.mousewheel-3.1.1'); OCP\Util::addScript('gallery', 'slideshow'); OCP\Util::addScript('gallery', 'public'); OCP\Util::addStyle('gallery', 'slideshow'); // register filesystem hooks to update thumbnails OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\\Gallery\\Thumbnail', 'writeHook'); OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\\Gallery\\Thumbnail', 'removeHook'); // register share backend OCP\Share::registerBackend('picture', 'OCA\\Gallery\\Share\\Picture', null, array('gif', 'jpeg', 'jpg', 'png', 'svg', 'svgz')); OCP\Share::registerBackend('gallery', 'OCA\\Gallery\\Share\\Gallery', 'picture');
<?php /** * @author Bart Visscher <*****@*****.**> * @author Björn Schießle <*****@*****.**> * @author Vincent Petry <*****@*****.**> * * @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/> * */ // Check if we are a user OCP\User::checkLoggedIn(); $tmpl = new OCP\Template('files_trashbin', 'index', ''); OCP\Util::addStyle('files_trashbin', 'trash'); OCP\Util::addScript('files_trashbin', 'app'); OCP\Util::addScript('files_trashbin', 'filelist'); $tmpl->printPage();
<?php //load the required files OCP\Util::addscript('files_markdown', 'editor'); OCP\Util::addStyle('files_markdown', 'preview'); OCP\Util::addStyle('files_markdown', 'highlight-default');
<?php /** @var $l OC_L10N */ /** @var $_ array */ OCP\Util::addScript('files', 'file-upload'); OCP\Util::addStyle('files_sharing', 'public'); 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 /** * @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();
* * 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/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('roundcube'); OCP\Util::addStyle('roundcube', 'userSettings'); OCP\Util::addScript('roundcube', 'userSettings'); // fill template $params = array(); $tmpl = new OCP\Template('roundcube', 'userSettings'); foreach ($params as $param) { $value = OCP\Config::getAppValue('roundcube', $param, ''); $tmpl->assign($param, $value); } // workaround to detect OC version $ocVersion = @reset(OCP\Util::getVersion()); $tmpl->assign('ocVersion', $ocVersion); return $tmpl->fetchPage();
<?php /** * ownCloud - Impressionist & Impress App * * @author Raghu Nayyar & Frank Karlitschek * @copyright 2012 me@iraghu.com Frank Karlitschek karlitschek@kde.org * * 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/>. * */ OCP\Util::addStyle('impressionist', 'style'); // Basic layout of the page. OCP\App::addNavigationEntry(array('id' => 'impressionist_index', 'order' => 74, 'href' => OCP\Util::linkTo('impressionist', 'index.php'), 'icon' => OCP\Util::imagePath('impressionist', 'impress.png'), 'name' => 'Impressionist'));
private function loadStyles() { if(isset($this->styles) && $this->styles != "") { foreach (explode(",", $this->styles) as $style) { if($style != "") { OCP\Util::addStyle('ocDashboard', 'widgets/'.$this->id.'/'.$style); } } } }
* 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 OCA\Files_External\Service\BackendService; \OCP\User::checkAdminUser(); // we must use the same container $appContainer = \OC_Mount_Config::$app->getContainer(); $backendService = $appContainer->query('OCA\\Files_External\\Service\\BackendService'); $globalStoragesService = $appContainer->query('OCA\\Files_external\\Service\\GlobalStoragesService'); OCP\Util::addScript('files_external', 'settings'); OCP\Util::addStyle('files_external', 'settings'); \OC_Util::addVendorScript('select2/select2'); \OC_Util::addVendorStyle('select2/select2'); $backends = array_filter($backendService->getAvailableBackends(), function ($backend) { return $backend->isVisibleFor(BackendService::VISIBILITY_ADMIN); }); $authMechanisms = array_filter($backendService->getAuthMechanisms(), function ($authMechanism) { return $authMechanism->isVisibleFor(BackendService::VISIBILITY_ADMIN); }); foreach ($backends as $backend) { if ($backend->getCustomJs()) { \OCP\Util::addScript('files_external', $backend->getCustomJs()); } } foreach ($authMechanisms as $authMechanism) { if ($authMechanism->getCustomJs()) {
* This is the plugins central position * All requests to the plugin are handled by this file. * Exceptions: system settings, user preferences and relaying * @access public * @author Christian Reiner */ // Session checks OCP\User::checkLoggedIn ( ); OCP\App::checkAppEnabled ( 'shorty' ); OCP\App::setActiveNavigationEntry ( 'shorty_index' ); OCP\Util::addStyle ( 'shorty/3rdparty', 'jquery-impromptu' ); OCP\Util::addStyle ( 'shorty', 'shorty' ); OCP\Util::addStyle ( 'shorty', 'list' ); OCP\Util::addscript ( '3rdparty', 'chosen/chosen.jquery.min'); OCP\Util::addScript ( 'shorty/3rdparty', 'jquery-tinysort.min' ); OCP\Util::addScript ( 'shorty/3rdparty', 'jquery-impromptu' ); OCP\Util::addScript ( 'shorty', 'shorty' ); OCP\Util::addScript ( 'shorty', 'util' ); OCP\Util::addScript ( 'shorty', 'init' ); if ( OCP\Util::DEBUG==OCP\Config::getAppValue( "loglevel", OCP\Util::WARN ) ) OCP\Util::addScript ( 'shorty', 'debug' ); // any additional stuff to incude as registered into the hook ? OC_Shorty_Hooks::requestIncludes(); // strategy: // - first: decide which action is requested // - second: execute that action with an optional argument provided
<?php /** * ownCloud - External plugin * * @author Frank Karlitschek * @copyright 2011 Frank Karlitschek karlitschek@kde.org * * 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/>. * */ OC::$CLASSPATH['OC_External'] = 'apps/external/lib/external.php'; OCP\Util::addStyle('external', 'style'); OCP\App::registerAdmin('external', 'settings'); OCP\App::register(array('order' => 70, 'id' => 'external', 'name' => 'External')); $sites = OC_External::getSites(); for ($i = 0; $i < sizeof($sites); $i++) { OCP\App::addNavigationEntry(array('id' => 'external_index' . ($i + 1), 'order' => 80 + $i, 'href' => OCP\Util::linkTo('external', 'index.php') . '?id=' . ($i + 1), 'icon' => OCP\Util::imagePath('external', 'external.png'), 'name' => $sites[$i][0])); }
<?php /** * ownCloud - Impress App * * @author Frank Karlitschek * @copyright 2011 Frank Karlitschek karlitschek@kde.org * * 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/impress.php'; OCP\User::checkLoggedIn(); OCP\JSON::checkAppEnabled('impress'); OCP\Util::addStyle('impress', 'style'); OCP\App::setActiveNavigationEntry('impress_index'); $list = \OCA_Impress\Storage::getPresentations(); $tmpl = new OCP\Template('impress', 'presentations', 'user'); $tmpl->assign('list', $list); $tmpl->printPage();
*/ // 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();
* 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 the user has the right permissions to access the activities OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('activity'); // activate the right navigation entry OCP\App::setActiveNavigationEntry('activity'); // load the needed js scripts and css OCP\Util::addScript('activity', 'jquery.masonry.min'); OCP\Util::addScript('activity', 'jquery.infinitescroll.min'); OCP\Util::addScript('activity', 'script'); OCP\Util::addStyle('activity', 'style'); // get the page that is requested. Needed for endless scrolling if (isset($_GET['page'])) { $page = intval($_GET['page']) - 1; } else { $page = 0; } // get rss url $rsslink = \OCP\Util::linkToAbsolute('activity', 'rss.php'); $nextpage = \OCP\Util::linkToAbsolute('activity', 'index.php', array('page' => $page + 2)); // read activities data $count = 30; $activity = OCA\Activity\Data::read($page * $count, 30); // show activity template $tmpl = new \OCP\Template('activity', 'list', 'user'); $tmpl->assign('rsslink', $rsslink);
//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();
* 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\User::checkLoggedIn(); \OCP\App::checkAppEnabled('collaboration'); OCP\App::setActiveNavigationEntry('collaboration'); OCP\Util::addScript('collaboration', 'update_task'); OCP\Util::addScript('collaboration/3rdparty', 'jquery-ui-sliderAccess'); OCP\Util::addScript('collaboration/3rdparty', 'jquery-ui-timepicker-addon'); OCP\Util::addScript('collaboration/3rdparty', 'jquery-te'); OCP\Util::addStyle('collaboration/3rdparty', 'jquery-te'); OCP\Util::addStyle('collaboration/3rdparty', 'jquery-ui-timepicker-addon'); OCP\Util::addStyle('collaboration', 'content_header'); OCP\Util::addStyle('collaboration', 'tabs'); OCP\Util::addStyle('collaboration', 'update_task'); $l = OC_L10N::get('collaboration'); $tpl = new OCP\Template('collaboration', 'update_task', 'user'); $bol = OC_Collaboration_Project::isAdmin(); if ($bol == true) { if (isset($_POST['tid'])) { $tpl->assign('title', $l->t('Update Task')); $tpl->assign('submit_btn_name', $l->t('Update')); $tpl->assign('tid', $_POST['tid']); $tpl->assign('task_details', OC_Collaboration_Task::readTask($_POST['tid'])); } else { $tpl->assign('title', $l->t('Create Task')); $tpl->assign('submit_btn_name', $l->t('Create')); $tpl->assign('projects', OC_Collaboration_Project::getProjects(OC_User::getUser())); } $tpl->printPage();
* 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/>. * */ // 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);
<?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');
* * 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/> * */ // Check if we are a user OCP\User::checkLoggedIn(); // Load the files we need OCP\Util::addStyle('files', 'files'); OCP\Util::addStyle('files', 'upload'); OCP\Util::addStyle('files', 'mobile'); OCP\Util::addscript('files', 'app'); OCP\Util::addscript('files', 'file-upload'); OCP\Util::addscript('files', 'jquery.iframe-transport'); OCP\Util::addscript('files', 'jquery.fileupload'); OCP\Util::addscript('files', 'jquery-visibility'); OCP\Util::addscript('files', 'fileinfomodel'); OCP\Util::addscript('files', 'filesummary'); OCP\Util::addscript('files', 'breadcrumb'); OCP\Util::addscript('files', 'filelist'); OCP\Util::addscript('files', 'search'); \OCP\Util::addScript('files', 'favoritesfilelist'); \OCP\Util::addScript('files', 'tagsplugin'); \OCP\Util::addScript('files', 'favoritesplugin'); \OCP\Util::addScript('files', 'detailfileinfoview'); \OCP\Util::addScript('files', 'detailtabview');
<?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");
<?php /** * Copyright (c) 2012 Robin Appelman <*****@*****.**> * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('gallery'); OCP\App::setActiveNavigationEntry('gallery_index'); OCP\Util::addScript('gallery', 'gallery'); OCP\Util::addScript('gallery', 'thumbnail'); OCP\Util::addStyle('gallery', 'styles'); $tmpl = new OCP\Template('gallery', 'index', 'user'); $tmpl->printPage();
<?php //load the required files OCP\Util::addStyle('files_texteditor', 'style'); OCP\Util::addscript('files_texteditor', 'editor'); OCP\Util::addscript('files_texteditor', 'aceeditor/ace');
<?php OCP\Util::addStyle('lostpassword', 'resetpassword'); ?> <form action="<?php print_unescaped($_['link']); ?> " id="reset-password" method="post"> <fieldset> <p> <label for="password" class="infield"><?php p($l->t('New password')); ?> </label> <input type="password" name="password" id="password" value="" placeholder="<?php p($l->t('New Password')); ?> " required /> <img class="svg" id="password-icon" src="<?php print_unescaped(image_path('', 'actions/password.svg')); ?> " alt=""/> </p> <input type="submit" id="submit" value="<?php p($l->t('Reset password')); ?> " /> </fieldset> <fieldset id="gohome" style="display:none" class="warning"> <p><?php
<?php OCP\Util::addStyle('tattoo', 'settings'); // die($_POST['tattooWallpaper']); if (isset($_POST['tattooSetWallpaper']) && isset($_POST['tattooWallpaper'])) { OCP\Config::setUserValue(OCP\User::getUser(), 'tattoo', 'wallpaper', $_POST['tattooWallpaper']); OCP\Config::setUserValue(OCP\User::getUser(), 'tattoo', 'lastModified', gmdate('D, d M Y H:i:s') . ' GMT'); } $wallpaper = OCP\Config::getUserValue(OCP\User::getUser(), 'tattoo', 'wallpaper', 'none'); $tmpl = new OCP\Template('tattoo', 'settings'); $tmpl->assign('tattooSelectedWallpaper', $wallpaper); return $tmpl->fetchPage();
<?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();
$folder->assign('uploadMaxFilesize', $maxUploadFilesize); $folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $folder->assign('freeSpace', $freeSpace); $folder->assign('uploadLimit', $uploadLimit); // PHP upload limit $folder->assign('usedSpacePercent', 0); $folder->assign('trash', false); $tmpl->assign('folder', $folder->fetchPage()); $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath)); } else { $tmpl->assign('dir', $dir); // Show file preview if viewer is available if ($type == 'file') { $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download'); } else { $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath)); } } $tmpl->printPage(); } exit; } else { OCP\Util::writeLog('share', 'could not resolve linkItem', \OCP\Util::DEBUG); } $errorTemplate = new OCP\Template('files_sharing', 'part.404', ''); $errorContent = $errorTemplate->fetchPage(); header('HTTP/1.0 404 Not Found'); OCP\Util::addStyle('files_sharing', '404'); $tmpl = new OCP\Template('', '404', 'guest'); $tmpl->assign('content', $errorContent); $tmpl->printPage();
* 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); $tmpl->assign('groups', OC_Group::getGroups()); $tmpl->assign('users', OCP\User::getUsers());
$tmpl->printPage(); exit; } } else { // Check if item id is set in session if (!\OC::$server->getSession()->exists('public_link_authenticated') || \OC::$server->getSession()->get('public_link_authenticated') !== $linkItem['id']) { // Prompt for password OCP\Util::addStyle('files_sharing', 'authenticate'); $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); $tmpl->assign('URL', $url); $tmpl->printPage(); exit; } } } // render template $tmpl = new \OCP\Template('gallery', 'public', 'base'); OCP\Util::addScript('gallery', 'album'); OCP\Util::addScript('gallery', 'gallery'); OCP\Util::addScript('gallery', 'thumbnail'); OCP\Util::addStyle('gallery', 'public'); $tmpl->assign('token', $token); $tmpl->assign('requesttoken', \OCP\Util::callRegister()); $tmpl->assign('displayName', $ownerDisplayName); $tmpl->assign('albumName', $albumName); $tmpl->printPage(); exit; } } $tmpl = new OCP\Template('', '404', 'guest'); $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(); ?>
<?php /** * ownCloud - firstrunwizard App * * @author Frank Karlitschek * @copyright 2012 Frank Karlitschek karlitschek@kde.org * * 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/>. * */ OC::$CLASSPATH['OCA_FirstRunWizard\\Config'] = 'firstrunwizard/lib/firstrunwizard.php'; OCP\Util::addStyle('firstrunwizard', 'colorbox'); OCP\Util::addScript('firstrunwizard', 'jquery.colorbox'); OCP\Util::addScript('firstrunwizard', 'firstrunwizard'); OCP\Util::addStyle('firstrunwizard', 'firstrunwizard'); if (\OCP\User::isLoggedIn() and \OCA_FirstRunWizard\Config::isenabled()) { OCP\Util::addScript('firstrunwizard', 'activate'); }