<?php \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('pdflintview'); \OCP\App::setActiveNavigationEntry( 'pdflintview' ); \OCP\Util::addScript('pdflintview', 'ajaxaggregator'); ?>
* 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/>. * */ namespace OCA\Documents; \OCP\User::checkLoggedIn(); \OCP\JSON::checkAppEnabled('documents'); \OCP\App::setActiveNavigationEntry('documents_index'); \OCP\Util::addStyle('documents', 'style'); \OCP\Util::addStyle('documents', '3rdparty/webodf/dojo-app'); \OCP\Util::addScript('documents', 'documents'); \OCP\Util::addScript('files', 'file-upload'); \OCP\Util::addScript('files', 'jquery.iframe-transport'); \OCP\Util::addScript('files', 'jquery.fileupload'); $tmpl = new \OCP\Template('documents', 'documents', 'user'); $previewsEnabled = \OC::$server->getConfig()->getSystemValue('enable_previews', true); $unstable = \OCP\Config::getAppValue('documents', 'unstable', 'false'); $maxUploadFilesize = \OCP\Util::maxUploadFilesize("/"); $savePath = \OCP\Config::getUserValue(\OCP\User::getUser(), 'documents', 'save_path', '/'); $tmpl->assign('enable_previews', $previewsEnabled); $tmpl->assign('useUnstable', $unstable); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', \OCP\Util::humanFileSize($maxUploadFilesize));
<?php namespace apps2_games; /** * @brief ownCloud Games Integration * @site http://oc-apps2.sourceforge.net/ * * @author Pierre Fauconnier * @copyright 2014 Pierre Fauconnier * @license CeCILL v2.1 - http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt */ // Main -> fired by ownCloud via appinfo/app.php \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled(K_APP_NAME); \OCP\App::setActiveNavigationEntry(K_APP_NAME); // $myJSON =<<<EOJ [ {"id":"minesweeper" ,"js":"g/jsminesweeper/JsMinesweeper.html" ,"caption":"Mine Sweeper" ,"ico":"img/minesweeper.png" ,"title":"Minesweeper is a small naval warship designed to engage in minesweeping.<br>By using various mechanisms intended to counter the threat posed by naval mines, minesweepers keep waterways clear for shipping." },{"id":"titactoe" ,"js":"g/tictactoe/tictactoe.html" ,"caption":"Tic-Tac-Toe" ,"ico":"img/tictactoe.png" ,"title":"Tic-tac-toe (or Noughts and crosses, Xs and Os, Terni Lapilli) is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3\u00d73 grid.<br>The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game." },{"id":"fiveInRow" ,"js":"g/fiveInRow/fir.html" ,"caption":"Five in Row" ,"ico":"img/FiR.jpg" ,"title":"Traditionally played with Go pieces (black and white stones) on a go board with 19\u00d719 intersections.<br>User plays first, then players alternate in placing a mark of their own on an empty place. The winner is the first player to get an unbroken row of five marks horizontally, vertically, or diagonally."
/** * Sets the current navigation entry to the currently running app */ public function activateNavigationEntry() { \OCP\App::setActiveNavigationEntry($this->appName); }
* 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/>. * */ /** * @file index.php * This is the apps central view * @access public * @author Christian Reiner */ // Session checks \OCP\App::checkAppEnabled('imprint'); \OCP\Util::addScript('imprint', 'content'); \OCP\App::setActiveNavigationEntry('imprint'); \OCP\Util::addStyle('imprint', 'reference'); // prepare view $tmpl_view = \OCP\User::isLoggedIn() ? 'user' : 'guest'; // fetch content $tmpl = new \OCP\Template('imprint', 'tmpl_index', $tmpl_view); // render template $tmpl->printPage();
<?php // Look up other security checks in the docs! \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled('ocDashboard'); \OCP\App::setActiveNavigationEntry('ocDashboard'); OCP\Util::addscript('ocDashboard', 'ocDashboard'); OCP\Util::addscript('ocDashboard', 'ajaxService'); OCP\Util::addStyle('ocDashboard', 'ocDashboard'); $user = OCP\User::getUser(); $w = array(); OC::$CLASSPATH['ocdWidgets'] = 'ocDashboard/appinfo/widgetConfigs.php'; OC::$CLASSPATH['ocdFactory'] = 'ocDashboard/lib/factory.php'; foreach (ocdWidgets::$widgets as $widget) { // if widget is enabled if (OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id']) == "yes") { $w[] = ocdFactory::getWidget($widget)->getData(); } } //if all deactivated if (empty($w)) { $l = new OC_L10N('ocDashboard'); $w[0]['error'] = "You can configure this site in your personal settings."; $w[0]['id'] = "none"; $w[0]['name'] = ""; $w[0]['status'] = "3"; $w[0]['interval'] = "0"; $w[0]['icon'] = ""; } $tpl = new OCP\Template("ocDashboard", "main", "user"); $tpl->assign('widgets', $w);
* 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 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', 'script'); \OCP\Util::addStyle('activity', 'style'); $navigation = new \OCA\Activity\Navigation(\OCP\Util::getL10N('activity'), \OC::$server->getActivityManager(), \OC::$server->getURLGenerator()); $navigation->setRSSToken(\OCP\Config::getUserValue(\OCP\User::getUser(), 'activity', 'rsstoken')); // get the page that is requested. Needed for endless scrolling $data = new \OCA\Activity\Data(\OC::$server->getActivityManager()); $page = $data->getPageFromParam() - 1; $filter = $data->getFilterFromParam(); // show activity template $tmpl = new \OCP\Template('activity', 'list', 'user'); $tmpl->assign('filter', $filter); $tmpl->assign('appNavigation', $navigation->getTemplate($filter)); $tmpl->printPage();
<?php /** * ownCloud - ownpad_lite plugin * * @author Victor Dubiniuk * @copyright 2012 Victor Dubiniuk victor.dubiniuk@gmail.com * * This file is licensed under the Affero General Public License version 3 or * later. */ namespace OCA\ownpad_lite; // Check if we are a user \OCP\User::checkLoggedIn(); \OCP\App::checkAppEnabled(App::APP_ID); \OCP\Util::addStyle(App::APP_ID, 'style'); \OCP\Util::addScript(App::APP_ID, 'etherpad'); \OCP\App::setActiveNavigationEntry('ownpad_lite_index'); $tmpl = new \OCP\Template(App::APP_ID, "index", "user"); $tmpl->assign(App::CONFIG_ETHERPAD_URL, App::getServiceUrl()); $tmpl->assign(App::CONFIG_USERNAME, App::getUsername()); $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/>. * */ namespace OCA\Videos; \OCP\User::checkLoggedIn(); \OCP\JSON::checkAppEnabled('videos'); \OCP\App::setActiveNavigationEntry('videos_index'); \OCP\Util::addStyle('videos', 'style'); \OCP\Util::addScript('videos', 'app'); \OCP\Util::addScript('videos/3rdparty', 'masonry.pkgd'); \OCP\Util::addStyle('files_videoviewer', 'style'); \OCP\Util::addStyle('files_videoviewer', 'mediaelementplayer'); \OCP\Util::addscript('files_videoviewer', 'viewer'); $manager = new VideosManager(); $videos = $manager->getVideos(); $tmpl = new \OCP\Template('videos', 'videos', 'user'); $tmpl->assign('videos', $videos); $tmpl->printPage();