* ownCloud - Tasks Plugin * * * * (c) Copyright 2011 Bart Visscher * * 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('tasks'); if (!OCP\App::isEnabled('calendar')) { OCP\Template::printUserPage('tasks', 'no-calendar-app'); exit; } $calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true); if (count($calendars) == 0) { header('Location: ' . OCP\Util::linkTo('calendar', 'index.php')); exit; } OCP\Util::addScript('3rdparty/timepicker', 'jquery.ui.timepicker'); OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker'); OCP\Util::addScript('tasks', 'tasks'); OCP\Util::addStyle('tasks', 'style'); OCP\Util::addScript('contacts', 'jquery.multi-autocomplete'); OCP\Util::addScript('', 'oc-vcategories'); OCP\App::setActiveNavigationEntry('tasks_index'); $categories = OC_Calendar_App::getCategoryOptions(); $priority_options = OC_Task_App::getPriorityOptions(); $output = new OCP\Template('tasks', 'tasks', 'user'); $output->assign('priority_options', $priority_options); $output->assign('categories', $categories, false); $output->printPage();
<?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();
* * 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);
<?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();
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 } ?>
* 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/>. * * JS minified by http://fmarcia.info/jsmin/test.html * */ OCP\Util::addStyle('storagecharts2', 'styles'); OCP\Util::addScript('storagecharts2', 'highcharts.min'); OCP\Util::addScript('3rdparty', 'chosen/chosen.jquery.min'); OCP\Util::addStyle('3rdparty', 'chosen/chosen'); OCP\Util::addScript('storagecharts2', 'units.min'); ?> <script type="text/javascript"> $(document).ready(function(){ $('#stc_sortable').sortable({ axis:'y',handle:'h3',placeholder:'ui-state-highlight',update:function(e,u){ $.ajax({ type:'POST', url:OC.linkTo('storagecharts2','ajax/config.php'), dataType:'json', data:{o:'set',k:'sc_sort',i:$('#stc_sortable').sortable('toArray')}, async:true }); } });
} require_once 'user_saml/user_saml.php'; OCP\App::registerAdmin('user_saml', 'settings'); // register user backend OC_User::useBackend('SAML'); OC::$CLASSPATH['OC_USER_SAML_Hooks'] = 'user_saml/lib/hooks.php'; OCP\Util::connectHook('OC_User', 'post_login', 'OC_USER_SAML_Hooks', 'post_login'); OCP\Util::connectHook('OC_User', 'logout', 'OC_USER_SAML_Hooks', 'logout'); $forceLogin = OCP\Config::getAppValue('user_saml', 'saml_force_saml_login', false); if (isset($_GET['app']) && $_GET['app'] == 'user_saml' || !OCP\User::isLoggedIn() && $forceLogin && !isset($_GET['admin_login'])) { require_once 'user_saml/auth.php'; if (!OC_User::login('', '')) { $error = true; OC_Log::write('saml', 'Error trying to authenticate the user', OC_Log::DEBUG); } if (isset($_GET["linktoapp"])) { $path = OC::$WEBROOT . '/?app=' . $_GET["linktoapp"]; if (isset($_GET["linktoargs"])) { $path .= '&' . urldecode($_GET["linktoargs"]); } header('Location: ' . $path); exit; } OC::$REQUESTEDAPP = ''; OC_Util::redirectToDefaultPage(); } if (!OCP\User::isLoggedIn()) { // Load js code in order to render the SAML link and to hide parts of the normal login form OCP\Util::addScript('user_saml', 'utils'); } }
<?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'); }
* 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');
* 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('user_ldap', 'ldapFilter'); OCP\Util::addScript('user_ldap', 'experiencedAdmin'); OCP\Util::addScript('user_ldap', 'settings'); OCP\Util::addScript('core', 'jquery.multiselect'); OCP\Util::addStyle('user_ldap', 'settings'); OCP\Util::addStyle('core', 'jquery.multiselect'); OCP\Util::addStyle('core', 'jquery-ui-1.10.0.custom'); // fill template $tmpl = new OCP\Template('user_ldap', 'settings'); $prefixes = \OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(); $hosts = \OCA\user_ldap\lib\Helper::getServerConfigurationHosts(); $wizardHtml = ''; $toc = array(); $wControls = new OCP\Template('user_ldap', 'part.wizardcontrols'); $wControls = $wControls->fetchPage(); $sControls = new OCP\Template('user_ldap', 'part.settingcontrols'); $sControls = $sControls->fetchPage(); $l = \OC_L10N::get('user_ldap'); $wizTabs = array();
//add 3rdparty folder to include path $dir = dirname(dirname(__FILE__)) . '/3rdparty'; set_include_path(get_include_path() . PATH_SEPARATOR . $dir); OC::$CLASSPATH['OCA\\Search_Lucene\\Lucene'] = 'search_lucene/lib/lucene.php'; OC::$CLASSPATH['OCA\\Search_Lucene\\Indexer'] = 'search_lucene/lib/indexer.php'; OC::$CLASSPATH['OCA\\Search_Lucene\\Hooks'] = 'search_lucene/lib/hooks.php'; OC::$CLASSPATH['Zend_Search_Lucene'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene.php'; OC::$CLASSPATH['Zend_Search_Lucene_Index_Term'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Index/Term.php'; OC::$CLASSPATH['Zend_Search_Lucene_Search_Query_Term'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Search/Query/Term.php'; OC::$CLASSPATH['Zend_Search_Lucene_Field'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Field.php'; OC::$CLASSPATH['Zend_Search_Lucene_Document'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Document.php'; OC::$CLASSPATH['Zend_Search_Lucene_Document_Html'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Document/Html.php'; OC::$CLASSPATH['Zend_Search_Lucene_Analysis_Analyzer'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Analysis/Analyzer.php'; OC::$CLASSPATH['getID3'] = 'getid3/getid3.php'; OC::$CLASSPATH['App_Search_Helper_PdfParser'] = 'apps/search_lucene/3rdparty/pdf2text.php'; OC::$CLASSPATH['Zend_Pdf'] = 'apps/search_lucene/3rdparty/Zend/Pdf.php'; // --- always add js & css ----------------------------------------------- OCP\Util::addScript('search_lucene', 'checker'); OCP\Util::addStyle('search_lucene', 'lucene'); // --- replace default file search provider ----------------------------------------------- //remove other providers OC_Search::removeProvider('OC_Search_Provider_File'); OC_Search::registerProvider('OCA\\Search_Lucene\\Lucene'); // --- add hooks ----------------------------------------------- //post_create is ignored, as write will be triggered afterwards anyway //connect to the filesystem for auto updating OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_write, 'OCA\\Search_Lucene\\Hooks', OCA\Search_Lucene\Hooks::handle_post_write); //connect to the filesystem for renaming OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_rename, 'OCA\\Search_Lucene\\Hooks', OCA\Search_Lucene\Hooks::handle_post_rename); //listen for file deletions to clean the database OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_delete, 'OCA\\Search_Lucene\\Hooks', OCA\Search_Lucene\Hooks::handle_delete);
* 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/>. * */ /** * @file settings.php * This apps system settings dialog * The dialog will be included in the general framework of the system settings page * @access public * @author Christian Reiner */ // Session checks OCP\User::checkLoggedIn(); OCP\User::checkAdminUser(); OCP\App::checkAppEnabled('imprint'); OCP\Util::addStyle('3rdparty', 'chosen/chosen'); OCP\Util::addStyle('imprint', 'imprint'); OCP\Util::addScript('3rdparty', 'chosen/chosen.jquery.min'); OCP\Util::addScript('imprint', 'settings'); // fetch template $tmpl = new OCP\Template('imprint', 'tmpl_settings'); // render template return $tmpl->fetchPage();
// Check if we are a user OCP\User::checkLoggedIn(); //OCP\App::checkAppEnabled('bookmarks'); OCP\App::checkAppEnabled('roundcube'); // Check if we are a user if (!OCP\User::isLoggedIn()) { header("Location: " . OCP\Util::linkTo('', 'index.php')); exit; } // Load our style OCP\Util::addStyle('roundcube', 'base'); // workaround to detect OC version $ocVersion = @reset(OCP\Util::getVersion()); // OC 5 if ($ocVersion < 6) { OCP\Util::writeLog('roundcube', 'Running on OwnCloud 5', OCP\Util::DEBUG); // add neede JS OCP\Util::addScript('', 'jquery-1.7.2.min'); // OC 6 OCP\Util::addScript('roundcube', 'jquery.plugins'); } else { OCP\Util::writeLog('roundcube', 'Running on OwnCloud ' . $ocVersion, OCP\Util::DEBUG); // add neede JS // Don't, already included, and a second include breaks jquery-migrate. //OC_Util::addScript("jquery-1.10.0.min"); } OCP\Util::addScript('roundcube', 'mail'); // add new navigation entry OCP\App::setActiveNavigationEntry("roundcube_index"); $tmpl = new OCP\Template("roundcube", "mail", "user"); $tmpl->printpage();
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_Calendar'] = 'calendar/lib/sabre/calendar.php'; OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarObject'] = 'calendar/lib/sabre/object.php'; OC::$CLASSPATH['OC_Calendar_Repeat'] = 'calendar/lib/repeat.php'; OC::$CLASSPATH['OC_Calendar_Export'] = 'calendar/lib/export.php'; OC::$CLASSPATH['OC_Calendar_Import'] = 'calendar/lib/import.php'; OC::$CLASSPATH['OC_Share_Backend_Calendar'] = 'calendar/lib/share/calendar.php'; OC::$CLASSPATH['OC_Share_Backend_Event'] = 'calendar/lib/share/event.php'; //General Hooks OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser'); OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser'); //Repeating Events Hooks OCP\Util::connectHook('OC_Calendar', 'addEvent', 'OC_Calendar_Repeat', 'generate'); OCP\Util::connectHook('OC_Calendar', 'editEvent', 'OC_Calendar_Repeat', 'update'); OCP\Util::connectHook('OC_Calendar', 'deleteEvent', 'OC_Calendar_Repeat', 'clean'); OCP\Util::connectHook('OC_Calendar', 'moveEvent', 'OC_Calendar_Repeat', 'update'); OCP\Util::connectHook('OC_Calendar', 'deleteCalendar', 'OC_Calendar_Repeat', 'cleanCalendar'); OCP\App::addNavigationEntry(array('id' => 'calendar_index', 'order' => 10, 'href' => OCP\Util::linkToRoute('calendar_index'), 'icon' => OCP\Util::imagePath('calendar', 'calendar.svg'), 'name' => $l->t('Calendar'))); \OC::$server->getSearch()->registerProvider('OCA\\Calendar\\Search\\Provider', array('apps' => array('calendar'))); OCP\Share::registerBackend('calendar', 'OC_Share_Backend_Calendar'); OCP\Share::registerBackend('event', 'OC_Share_Backend_Event'); $request = \OC::$server->getRequest(); if (isset($request->server['REQUEST_URI'])) { $url = $request->server['REQUEST_URI']; if (preg_match('%index.php/apps/files(/.*)?%', $url)) { OCP\Util::addScript('calendar', 'loader'); OCP\Util::addScript('calendar', '../3rdparty/chosen/js/chosen.jquery.min'); OCP\Util::addStyle('calendar', '../3rdparty/chosen/css/chosen'); OCP\Util::addStyle('calendar', '../3rdparty/miniColors/css/jquery.miniColors'); OCP\Util::addscript('calendar', '../3rdparty/miniColors/js/jquery.miniColors.min'); } }
<?php OCP\User::checkAdminUser(); OCP\Util::addScript("ojsxc", "admin"); $tmpl = new OCP\Template('ojsxc', 'settings'); $tmpl->assign('boshUrl', OCP\Config::getAppValue('ojsxc', 'boshUrl')); $tmpl->assign('xmppDomain', OCP\Config::getAppValue('ojsxc', 'xmppDomain')); $tmpl->assign('xmppResource', OCP\Config::getAppValue('ojsxc', 'xmppResource')); $tmpl->assign('xmppOverwrite', OCP\Config::getAppValue('ojsxc', 'xmppOverwrite')); $tmpl->assign('xmppStartMinimized', OCP\Config::getAppValue('ojsxc', 'xmppStartMinimized')); $tmpl->assign('iceUrl', OCP\Config::getAppValue('ojsxc', 'iceUrl')); $tmpl->assign('iceUsername', OCP\Config::getAppValue('ojsxc', 'iceUsername')); $tmpl->assign('iceCredential', OCP\Config::getAppValue('ojsxc', 'iceCredential')); $tmpl->assign('iceSecret', OCP\Config::getAppValue('ojsxc', 'iceSecret')); $tmpl->assign('iceTtl', OCP\Config::getAppValue('ojsxc', 'iceTtl')); return $tmpl->fetchPage();
* 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 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');
<?php OCP\Util::addScript('files_odfviewer', 'viewer');
<?php /** * owncloud_piwik * * Copyright (c) 2015 Klaus Herberth <*****@*****.**> <br> * Released under the MIT license * * @author Klaus Herberth <*****@*****.**> * @license MIT */ OCP\App::registerAdmin('piwik', 'settings-admin'); $internal = OCP\Config::getAppValue('piwik', 'internal'); if ($internal === 'yes') { OCP\Util::addScript('piwik', 'piwik'); } OCP\Util::addScript('piwik', 'track');
* * 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();
case 'index': // action 'index': list of shortys default: try { // is this a redirect from a call with a target url to be added ? if ( isset($_SESSION['shorty-referrer']) ) { // this takes care of handling the url on the client side OCP\Util::addScript ( 'shorty', 'add' ); // add url taked from the session vars to anything contained in the query string $_SERVER['QUERY_STRING'] = implode('&',array_merge(array('url'=>$_SESSION['shorty-referrer']),explode('&',$_SERVER['QUERY_STRING']))); } else { // simple desktop initialization, no special actions contained OCP\Util::addScript ( 'shorty', 'list' ); } $tmpl = new OCP\Template( 'shorty', 'tmpl_index', 'user' ); // any additional actions registered via hooks that should be offered ? $tmpl->assign ( 'shorty-actions', OC_Shorty_Hooks::requestActions() ); // the (remote) base url of the qrcode generator $tmpl->assign ( 'qrcode-ref', sprintf('%s?service=%s&id=', OCP\Util::linkToAbsolute('', 'public.php'), 'shorty_qrcode') ); // available status options (required for select filter in toolbox) $shorty_status['']=sprintf('- %s -',OC_Shorty_L10n::t('all')); foreach ( OC_Shorty_Type::$STATUS as $status ) $shorty_status[$status] = OC_Shorty_L10n::t($status); $tmpl->assign ( 'shorty-status', $shorty_status ); $tmpl->assign ( 'default-status', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','default-status','private') ); // any referrer we want to hand over to the browser ? if ( array_key_exists('shorty-referrer',$_SESSION) ) $tmpl->assign ( 'shorty-referrer', $_SESSION['shorty-referrer'] );
<?php /** * @author Vincent Petry <*****@*****.**> * * @copyright Copyright (c) 2016, 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/> * */ // Check if we are a user OCP\User::checkLoggedIn(); $tmpl = new OCP\Template('files_sharing', 'list', ''); OCP\Util::addScript('files_sharing', 'app'); OCP\Util::addScript('files_sharing', 'sharedfilelist'); $tmpl->printPage();
* 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\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 {
<?php /** * ownCloud - RainLoop mail plugin * * @author RainLoop Team * @copyright 2015 RainLoop Team * * https://github.com/RainLoop/owncloud */ OC::$CLASSPATH['OC_RainLoop_Helper'] = OC_App::getAppPath('rainloop') . '/lib/RainLoopHelper.php'; OCP\App::registerAdmin('rainloop', 'admin'); OCP\App::registerPersonal('rainloop', 'personal'); if (OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false)) { OCP\Util::connectHook('OC_User', 'post_login', 'OC_RainLoop_Helper', 'login'); OCP\Util::connectHook('OC_User', 'post_setPassword', 'OC_RainLoop_Helper', 'changePassword'); } OCP\Util::connectHook('OC_User', 'logout', 'OC_RainLoop_Helper', 'logout'); OCP\Util::addScript('rainloop', 'rainloop'); OCP\App::addNavigationEntry(array('id' => 'rainloop_index', 'order' => 10, 'href' => OCP\Util::linkToRoute('rainloop_index'), 'icon' => OCP\Util::imagePath('rainloop', 'mail.png'), 'name' => 'Email'));
<?php /** * ownCloud - RainLoop mail plugin * * @author RainLoop Team * @copyright 2015 RainLoop Team * * https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud */ OCP\User::checkAdminUser(); OCP\Util::addScript('rainloop', 'admin'); $oTemplate = new OCP\Template('rainloop', 'admin-local'); $oTemplate->assign('rainloop-admin-panel-link', OC_RainLoop_Helper::getAppUrl() . '?admin'); $oTemplate->assign('rainloop-autologin', OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false)); return $oTemplate->fetchPage();
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 print_unescaped($l->t("Mot de passe changé avec succès. Vous allez être redirigé vers la page d'acceuil du service. <a href=\"/\">Cliquez ici pour y accéder tout de suite</a>.")); ?> </p> </fieldset> </form> <div id="password_policy" class="section"> </div> <?php OCP\Util::addScript('core', 'lostpassword'); OCP\Util::addScript('password_policy', 'lostpassword'); ?> <div>
?> " /> <?php } ?> <?php } ?> <?php } ?> <?php if (isset($_['backends'][$mount['class']]['custom'])) { ?> <?php OCP\Util::addScript('files_external', $_['backends'][$mount['class']]['custom']); ?> <?php } ?> <?php } ?> </td> <?php if ($_['isAdminPage']) { ?> <td class="applicable" align="right" data-applicable-groups='<?php if (isset($mount['applicable']['groups'])) {
<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 // Check if we are a user OCP\User::checkLoggedIn(); $tmpl = new OCP\Template('files_external', 'list', ''); OCP\Util::addScript('files_external', 'app'); OCP\Util::addScript('files_external', 'mountsfilelist'); $tmpl->printPage();
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ if (OCP\App::isEnabled('user_cas')) { include_once 'CAS.php'; require_once 'user_cas/user_cas.php'; OCP\App::registerAdmin('user_cas', 'settings'); // register user backend OC_User::useBackend('CAS'); OC::$CLASSPATH['OC_USER_CAS_Hooks'] = 'user_cas/lib/hooks.php'; OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_USER_CAS_Hooks', 'post_createUser'); OCP\Util::connectHook('OC_User', 'post_login', 'OC_USER_CAS_Hooks', 'post_login'); OCP\Util::connectHook('OC_User', 'logout', 'OC_USER_CAS_Hooks', 'logout'); if (isset($_GET['app']) && $_GET['app'] == 'user_cas') { require_once 'user_cas/auth.php'; if (!OC_User::login('', '')) { $error = true; OC_Log::write('cas', 'Error trying to authenticate the user', OC_Log::DEBUG); } if (isset($_SERVER["QUERY_STRING"]) && !empty($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != 'app=user_cas') { header('Location: ' . OC::$WEBROOT . '/?' . $_SERVER["QUERY_STRING"]); exit; } OC::$REQUESTEDAPP = ''; OC_Util::redirectToDefaultPage(); } if (!OCP\User::isLoggedIn()) { // Load js code in order to render the CAS link and to hide parts of the normal login form OCP\Util::addScript('user_cas', 'utils'); } }
* 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\User::checkAdminUser(); $params = array('av_mode' => 'executable', 'av_socket' => '/var/run/clamav/clamd.ctl', 'av_host' => '', 'av_port' => '', 'av_cmd_options' => '', 'av_chunk_size' => '1024', 'av_path' => '/usr/bin/clamscan', 'infected_action' => 'only_log'); if ($_POST) { OCP\Util::callCheck(); foreach ($params as $param => $default) { if (isset($_POST[$param])) { OCP\Config::setAppValue('files_antivirus', $param, $_POST[$param]); } } } // fill template $tmpl = new OCP\Template('files_antivirus', 'settings'); $tmpl->assign('requesttoken', OCP\Util::callRegister()); OCP\Util::addStyle('files_antivirus', 'settings'); OCP\Util::addScript('files_antivirus', 'settings'); foreach ($params as $param => $default) { $value = OCP\Config::getAppValue('files_antivirus', $param, $default); $tmpl->assign($param, $value); } return $tmpl->fetchPage();