Esempio n. 1
0
* 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();
Esempio n. 2
0
<?php

/*************************************************
 * 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');
Esempio n. 3
0
*
*/
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('gallery');
OCP\App::setActiveNavigationEntry('gallery_index');
OCP\Util::addStyle('files', 'files');
OCP\Util::addStyle('gallery', 'styles');
OCP\Util::addScript('gallery', 'pictures');
OCP\Util::addStyle('gallery', 'supersized');
OCP\Util::addStyle('gallery', 'supersized.shutter');
OCP\Util::addScript('gallery', 'slideshow');
OCP\Util::addScript('gallery', 'jquery.easing.min');
OCP\Util::addScript('gallery', 'supersized.3.2.7.min');
OCP\Util::addScript('gallery', 'supersized.shutter.min');
if (!OCP\App::isEnabled('files_imageviewer')) {
    OCP\Template::printUserPage('gallery', '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(), '');
$root_images = array();
foreach ($files as $file) {
    $filename = $root . $file['name'];
    if ($file['type'] == 'file') {
        $root_images[] = $filename;
    } else {
        // it is a dir, look for images in subdirs. We keep trying till
        // we find some images or there are no subdirs anymore to check.
        $name = $file['name'];