<?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_share.php'; OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('files_sharing'); OCP\App::setActiveNavigationEntry("files_sharing_list"); OCP\Util::addscript("files_sharing", "list"); $tmpl = new OCP\Template("files_sharing", "list", "user"); $tmpl->assign("shared_items", OC_Share::getMySharedItems()); $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 Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ require_once 'lib/external.php'; OCP\User::checkLoggedIn(); if (isset($_GET['id'])) { $id = $_GET['id']; $id = (int) $id; $sites = OC_External::getSites(); if (sizeof($sites) >= $id) { $url = $sites[$id - 1][1]; OCP\App::setActiveNavigationEntry('external_index' . $id); $tmpl = new OCP\Template('external', 'frame', 'user'); //overwrite x-frame-options $tmpl->addHeader('X-Frame-Options', 'ALLOW-FROM *'); $tmpl->assign('url', $url); $tmpl->printPage(); } }
<?php /** * Copyright (c) 2014 - Arno van Rossum <*****@*****.**> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ OCP\App::checkAppEnabled('ocusagecharts'); OCP\App::setActiveNavigationEntry('ocusagecharts'); OCP\App::addNavigationEntry(array('id' => 'ocusagecharts', 'order' => 60, 'href' => \OCP\Util::linkToRoute('ocusagecharts.chart.frontpage'), 'icon' => OCP\Util::imagePath('ocusagecharts', 'iconchart.png'), 'name' => \OC_L10N::get('ocusagecharts')->t('ocUsageCharts'))); \OCP\Util::addStyle('ocusagecharts', 'style'); \OCP\Backgroundjob::registerJob('OCA\\ocUsageCharts\\Command\\UpdateChartsCommand');
//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();
<?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();
* 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 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
*/ /** * @file index.php * 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();
<?php OCP\App::checkAppEnabled('statistics'); OCP\App::setActiveNavigationEntry('statistics'); OCP\App::addNavigationEntry(array('id' => 'statistics', 'order' => 60, 'href' => \OCP\Util::linkToRoute('statistics.Frontpage.run'), 'icon' => OCP\Util::imagePath('statistics', 'iconchart.png'), 'name' => \OC_L10N::get('statistics')->t('statistics')));
OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('carddavmate'); // load required style sheets: OCP\Util::addStyle('carddavmate', 'oc_app'); OCP\Util::addStyle('carddavmate', 'default'); OCP\Util::addStyle('carddavmate', 'lib/jquery.tagsinput'); // load required javascripts: OCP\Util::addScript('carddavmate', 'lib/jquery-1.7.2.min'); OCP\Util::addScript('carddavmate', 'lib/jshash-2.2_sha256'); OCP\Util::addScript('carddavmate', 'lib/jquery.tagsinput'); OCP\Util::addScript('carddavmate', 'lib/jquery.quicksearch'); OCP\Util::addScript('carddavmate', 'lib/jquery.placeholder-1.1.9'); OCP\Util::addScript('carddavmate', 'config'); OCP\Util::addScript('carddavmate', 'localization'); OCP\Util::addScript('carddavmate', 'interface'); OCP\Util::addScript('carddavmate', 'vcard_rfc_regex'); OCP\Util::addScript('carddavmate', 'webdav_protocol'); OCP\Util::addScript('carddavmate', 'common'); OCP\Util::addScript('carddavmate', 'resource'); OCP\Util::addScript('carddavmate', 'addressbook'); OCP\Util::addScript('carddavmate', 'data_process'); OCP\Util::addScript('carddavmate', 'main'); OCP\Util::addScript('carddavmate', 'oc_app'); // unfortunately ownCloud's default jquery-UI makes it behave awkward: OCP\Util::addStyle('carddavmate', 'lib/jquery-ui-1.8.20.custom'); OCP\Util::addScript('carddavmate', 'lib/jquery-ui-1.8.20.custom.min'); OCP\App::setActiveNavigationEntry('carddavmate_index'); $carddavUrl = OCP\Util::linkToRemote('carddav') . 'addressbooks/'; $tmpl = new OCP\Template("carddavmate", "mate", "user"); $tmpl->assign("carddavUrl", $carddavUrl); $tmpl->printPage();
* @copyleft 2012 bastienho@urbancube.fr * @projeturl http://ecolosites.eelv.fr * * Free Software under creative commons licence * http://creativecommons.org/licenses/by-nc/3.0/ * Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) * * You are free: * to Share — to copy, distribute and transmit the work * to Remix — to adapt the work * * Under the following conditions: * Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that * suggests that they endorse you or your use of the work). * Noncommercial — You may not use this work for commercial purposes. * */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('user_wordpress'); OCP\App::setActiveNavigationEntry('wordpress_sites'); $uid = OC_User::getUser(); $wp_instance = new OC_wordpress(); $blogs = $wp_instance->getUserBlogs($uid); $tmpl = new OCP\Template('user_wordpress', 'sites', 'user'); foreach ($wp_instance->params as $param => $value) { $tmpl->assign($param, $value); } $tmpl->assign('uid', $uid); $tmpl->assign('blogs', $blogs); $tmpl->printPage();
* ownCloud - App Template Example * * @author Jakob Sack * @copyright 2012 Jakob Sack mail@jakobsack.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/>. * */ // Check if we are a user if (!OCP\User::isLoggedIn()) { header("Location: " . OCP\Util::linkTo('', 'index.php')); exit; } // Add JavaScript and CSS files OCP\Util::addScript('mail', 'mail'); OCP\Util::addScript('mail', 'jquery.endless-scroll'); OCP\Util::addStyle('mail', 'mail'); OCP\App::setActiveNavigationEntry('mail'); $tmpl = new OCP\Template('mail', 'index', 'user'); $tmpl->printPage();
<?php /** * Copyright (c) 2012 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('files_sharing_log'); OCP\App::setActiveNavigationEntry('files_sharing_log_index'); OCP\Util::addStyle('files_sharing_log', 'style'); $query = OCP\DB::prepare('SELECT * FROM `*PREFIX*sharing_log` WHERE `user_id` = ?'); $log = $query->execute(array(OCP\User::getUser()))->fetchAll(); $output = new OCP\Template('files_sharing_log', 'index', 'user'); $output->assign('log', $log); $output->printPage();
* * 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/>. */ // Highlight current menu item OCP\App::setActiveNavigationEntry('oclife'); // Include what's needed by fancytree \OCP\Util::addStyle('oclife', 'ui.fancytree'); \OCP\Util::addScript('oclife', 'fancytree/jquery.fancytree-all'); // Following is needed by layout manager \OCP\Util::addScript('oclife', 'layout/jquery.sizes'); \OCP\Util::addScript('oclife', 'layout/jlayout.border'); \OCP\Util::addScript('oclife', 'layout/jquery.jlayout'); \OCP\Util::addScript('oclife', 'layout/layout'); // THEN execute what needed by us... \OCP\Util::addStyle('oclife', 'oclife'); \OCP\Util::addScript('oclife', 'oclife/oclife_tagstree'); // Look up other security checks in the docs! \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('oclife'); $tpl = new OCP\Template("oclife", "main", "user");
<?php /** * ownCloud - RainLoop mail plugin * * @author RainLoop Team * @copyright 2014 RainLoop Team * * https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud */ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('rainloop'); OCP\App::setActiveNavigationEntry('rainloop_index'); $sUrl = trim(OCP\Config::getAppValue('rainloop', 'rainloop-url', '')); $sPath = trim(OCP\Config::getAppValue('rainloop', 'rainloop-path', '')); $bAutologin = OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false); if ('' === $sUrl || '' === $sPath) { $oTemplate = new OCP\Template('rainloop', 'index-empty', 'user'); } else { include_once OC_App::getAppPath('rainloop') . '/lib/RainLoopHelper.php'; OC_Config::setValue('xframe_restriction', false); $sUser = OCP\User::getUser(); if ($bAutologin) { $sEmail = $sUser; $sEncodedPassword = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-autologin-password', ''); } else { $sEmail = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-email', ''); $sEncodedPassword = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-password', ''); } $sDecodedPassword = OC_RainLoop_Helper::decodePassword($sEncodedPassword, md5($sEmail)); $sSsoHash = OC_RainLoop_Helper::getSsoHash($sPath, $sEmail, $sDecodedPassword);
<?php /** * ownCloud - App Template Example * * @author Frank Karlitschek * @author Florian Hülsmann * @copyright 2011 Frank Karlitschek karlitschek@kde.org * @copyright 2012 Florian Hülsmann fh@cbix.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 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(); $somesetting = OCP\Config::getSystemValue("somesetting", ''); OCP\App::setActiveNavigationEntry('apptemplate'); $tmpl = new OCP\Template('apptemplate', 'main', 'user'); $tmpl->assign('somesetting', $somesetting); $tmpl->printPage();
* This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); // Get active address books. This creates a default one if none exists. $ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser()); $has_contacts = count(OC_Contacts_VCard::all($ids, 0, 1)) > 0 ? true : false; // just to check if there are any contacts. if ($has_contacts === false) { OCP\Util::writeLog('contacts', 'index.html: No contacts found.', OCP\Util::DEBUG); } // Load the files we need OCP\App::setActiveNavigationEntry('contacts_index'); // Load a specific user? $id = isset($_GET['id']) ? $_GET['id'] : null; $impp_types = OC_Contacts_App::getTypesOfProperty('IMPP'); $phone_types = OC_Contacts_App::getTypesOfProperty('TEL'); $email_types = OC_Contacts_App::getTypesOfProperty('EMAIL'); $ims = OC_Contacts_App::getIMOptions(); $im_protocols = array(); foreach ($ims as $name => $values) { $im_protocols[$name] = $values['displayname']; } $categories = OC_Contacts_App::getCategories(); $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); $maxUploadFilesize = min($upload_max_filesize, $post_max_size); $freeSpace = OC_Filesystem::free_space('/');
<?php // Check if we are a user //OCP\User::checkLoggedIn(); OCP\App::setActiveNavigationEntry('polls'); //echo '<pre>r_uri: '; print_r($_SERVER); '</pre>'; if (OCP\User::isLoggedIn()) { $tmpl = new OCP\Template('polls', 'main', 'user'); } else { $tmpl = new OCP\Template('polls', 'main', 'base'); } $tmpl->printPage();
<?php /** * ownCloud - Reveal Application for ownCloud * * @author Raghu Nayyar and 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/reveal.php'; OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('reveal'); OCP\Util::addStyle('reveal', 'style'); OCP\App::setActiveNavigationEntry('reveal_index'); $list = \OCA_reveal\Storage::getPresentations(); $tmpl = new OCP\Template('reveal', 'presentations', 'user'); $tmpl->assign('list', $list); $tmpl->printPage();
<?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();
<?php /** * ownCloud - News app * * @author Alessandro Cosentino * Copyright (c) 2012 - Alessandro Cosentino <*****@*****.**> * * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file * */ require_once OC_App::getAppPath('news') . '/controllers/controller.php'; require_once OC_App::getAppPath('news') . '/controllers/news.controller.php'; OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('news'); OCP\App::setActiveNavigationEntry('news'); $controller = new OCA\News\NewsController(); // routes if (isset($_GET['jstest'])) { $controller->javascriptTests(); } else { $controller->index(); }
* 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\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'));
* 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\User::checkLoggedIn(); OCP\App::checkAppEnabled('facefinder'); OCP\App::setActiveNavigationEntry('facefinder'); OCP\Util::addStyle('facefinder', 'styles'); OCP\Util::addScript('facefinder', 'new_1'); if (!OCP\App::isEnabled('files_imageviewer')) { OCP\Template::printUserPage('facefinder', 'no-image-app'); exit; } $root = !empty($_GET['root']) ? $_GET['root'] : '/'; $files = \OC_Files::getDirectoryContent($root, 'image'); $tl = new \OC\Pictures\TilesLine(); $ts = new \OC\Pictures\TileStack(array(), ''); $tmpl = new OCP\Template('facefinder', 'index', 'user'); $tmpl->assign('root', $root, false); $tmpl->assign('tl', $tl, false); $tmpl->printPage();
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'); \OCP\Util::addScript('files', 'mainfileinfodetailview'); \OCP\Util::addScript('files', 'detailsview'); \OCP\Util::addStyle('files', 'detailsView'); \OC_Util::addVendorScript('core', 'handlebars/handlebars'); OCP\App::setActiveNavigationEntry('files_index'); $l = \OC::$server->getL10N('files'); $isIE8 = false; preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); if (count($matches) > 0 && $matches[1] <= 9) { $isIE8 = true; } // if IE8 and "?dir=path&view=someview" was specified, reformat the URL to use a hash like "#?dir=path&view=someview" if ($isIE8 && (isset($_GET['dir']) || isset($_GET['view']))) { $hash = '#?'; $dir = isset($_GET['dir']) ? $_GET['dir'] : '/'; $view = isset($_GET['view']) ? $_GET['view'] : 'files'; $hash = '#?dir=' . \OCP\Util::encodePath($dir); if ($view !== 'files') { $hash .= '&view=' . urlencode($view); }
* * @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/>. * */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('bookmarks'); OCP\App::setActiveNavigationEntry('bookmarks_index'); OCP\Util::addscript('bookmarks', 'settings'); OCP\Util::addscript('bookmarks', 'bookmarks'); OCP\Util::addStyle('bookmarks', 'bookmarks'); OCP\Util::addscript('bookmarks/3rdparty', 'tag-it'); OCP\Util::addscript('bookmarks/3rdparty', 'js_tpl'); OCP\Util::addStyle('bookmarks/3rdparty', 'jquery.tagit'); $tmpl = new OCP\Template('bookmarks', 'list', 'user'); $tmpl->assign('req_tag', isset($_GET['tag']) ? $_GET['tag'] : ''); $tmpl->printPage();
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ OCP\User::checkAdminUser(); $htaccessWorking = getenv('htaccessWorking') == 'true'; $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); $maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size)); if ($_POST && OC_Util::isCallRegistered()) { if (isset($_POST['maxUploadSize'])) { if (($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) { $maxUploadFilesize = OCP\Util::humanFileSize($setMaxSize); } } } OCP\App::setActiveNavigationEntry("files_administration"); $htaccessWritable = is_writable(OC::$SERVERROOT . '/.htaccess'); $tmpl = new OCP\Template('files', 'admin'); /* * extended version * + only users with permission can delete files(in the files app only) * + file type restriction */ $filetyprestriction = \OC_Appconfig::getValue('core', 'filetyperes_enabled', 'no'); $allowed_types = \OC_Appconfig::getValue('core', 'allowed_filetypes', ''); $deleteGroupsList = \OC_Appconfig::getValue('core', 'delete', ''); $deleteGroupsList = explode(',', $deleteGroupsList); $tmpl->assign('deleteGroupsList', implode('|', $deleteGroupsList)); $tmpl->assign('fileTypeRes', $filetyprestriction); $tmpl->assign('allowed_filetypes', $allowed_types); $tmpl->assign('uploadChangable', $htaccessWorking and $htaccessWritable);
* 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 /** * 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();
// 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();
* 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 // check if we are a user OCP\User::checkLoggedIn(); // load files OCP\Util::addStyle('files', 'files'); OCP\Util::addStyle('search', 'search'); 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'); OCP\Util::addscript('files', 'keyboardshortcuts'); // activate link OCP\App::setActiveNavigationEntry('search'); // get results $query = isset($_GET['query']) ? $_GET['query'] : ''; $results = null; if ($query) { $results = OC_Search::search($query); } // create HTML table $files = array(); if (is_array($results)) { foreach ($results as $result) { // create file $_file = $result->fileData; // discard versions if (strpos($_file['path'], '_versions') === 0) { continue; }