Пример #1
0
<?php

OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('files_pdfviewer');
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
$file = isset($_GET['file']) ? $_GET['file'] : '';
// TODO: add mime type detection and load the template
$mime = "application/pdf";
$page = new OCP\Template('files_pdfviewer', 'pdf');
$page->assign('dir', $dir);
$page->assign('file', $file);
$page->printPage();
Пример #2
0
<?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();
Пример #3
0
<?php

/**
 * Copyright (c) 2011-2012 Thomas Tanghus <*****@*****.**>
 * 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('contacts');
$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : null;
$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : null;
$selectedids = isset($_GET['selectedids']) ? $_GET['selectedids'] : null;
$nl = "\n";
if (!is_null($bookid)) {
    try {
        $addressbook = OCA\Contacts\Addressbook::find($bookid);
    } catch (Exception $e) {
        OCP\JSON::error(array('data' => array('message' => $e->getMessage())));
        exit;
    }
    header('Content-Type: text/directory');
    header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf');
    $start = 0;
    $batchsize = OCP\Config::getUserValue(OCP\User::getUser(), 'contacts', 'export_batch_size', 20);
    while ($cardobjects = OCA\Contacts\VCard::all($bookid, $start, $batchsize, array('carddata'))) {
        foreach ($cardobjects as $card) {
            echo $card['carddata'] . $nl;
        }
        $start += $batchsize;
    }
Пример #4
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/>.
 *
 */
// 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();
Пример #5
0
<?php

/**
 * Copyright (c) 2012 Georg Ehrke <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
$data = $_POST['data'];
$data = explode(',', $data);
$data = end($data);
$data = base64_decode($data);
OCP\JSON::checkLoggedIn();
OCP\App::checkAppEnabled('calendar');
$import = new OC_Calendar_Import($data);
$import->setUserID(OCP\User::getUser());
$import->setTimeZone(OC_Calendar_App::$tz);
$import->disableProgressCache();
if (!$import->isValid()) {
    OCP\JSON::error();
    exit;
}
$newcalendarname = strip_tags($import->createCalendarName());
$newid = OC_Calendar_Calendar::addCalendar(OCP\User::getUser(), $newcalendarname, 'VEVENT,VTODO,VJOURNAL', null, 0, $import->createCalendarColor());
$import->setCalendarID($newid);
$import->import();
$count = $import->getCount();
if ($count == 0) {
    OC_Calendar_Calendar::deleteCalendar($newid);
    OCP\JSON::error(array('message' => OC_Calendar_App::$l10n->t('The file contained either no events or all events are already saved in your calendar.')));
} else {
Пример #6
0
<?php

OCP\App::checkAppEnabled('user_openid_provider');
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/3rdparty');
require_once 'Zend/OpenId/Provider.php';
if (!isset($_REQUEST['openid_mode'])) {
    OC_Template::printGuestPage('user_openid_provider', 'main');
    die;
}
$session = new OC_OpenIdProviderUserSession();
$storage = new OC_OpenIdProviderStorage();
$server = new Zend_OpenId_Provider(null, null, $session, $storage);
if (OCP\User::isLoggedIn() and !$session->getLoggedInUser()) {
    $session->setLoggedInUser(OCP\Util::linkToAbsolute('', '?') . OCP\User::getUser());
}
if (isset($_GET['openid_action']) and $_GET['openid_action'] == 'login') {
    unset($_GET['openid_action']);
    $params = '?' . Zend_OpenId::paramsToQuery($_GET);
    $next = OCP\Util::linkToRemote('openid_provider') . $params;
    $loginPage = OCP\Util::linkToAbsolute('', 'index.php') . '?redirect_url=' . urlencode($next);
    header('Location: ' . $loginPage);
} else {
    if (isset($_GET['openid_action']) and $_GET['openid_action'] == 'trust') {
        OCP\User::checkLoggedIn();
        if (isset($_POST['allow'])) {
            if (isset($_POST['forever'])) {
                $server->allowSite($server->getSiteRoot($_GET));
            }
            $server->respondToConsumer($_GET);
        } else {
            if (isset($_POST['deny'])) {
Пример #7
0
* 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();
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');
Пример #8
0
<?php

OCP\JSON::callCheck();
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('ocDashboard');
OC::$CLASSPATH['ocdWidgets'] = 'ocDashboard/appinfo/widgetConfigs.php';
OC::$CLASSPATH['ocdFactory'] = 'ocDashboard/lib/factory.php';
$user = OCP\User::getUser();
$id = isset($_GET['id']) ? $_GET['id'] : $_POST['id'];
$method = isset($_GET['method']) ? $_GET['method'] : $_POST['method'];
$value = isset($_GET['value']) ? $_GET['value'] : $_POST['value'];
$widgetEnabled = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $id) == "yes";
$RESPONSE["debug"] = "user: "******" | " . "widget: " . $id . " | " . "method: " . $method . " | " . "value: " . $value . " | " . "widgetEnabled: " . $widgetEnabled;
// if widget is enabled
if ($widgetEnabled) {
    $widgetConf = ocdWidgets::getWidgetConfigById($id);
    $widget = ocdFactory::getWidget($widgetConf);
    $result = "";
    if (method_exists($widget, $method)) {
        $result = $widget->{$method}($value);
    }
    if ($result) {
        $RESPONSE["response"] = $result;
        $RESPONSE["success"] = true;
    } else {
        $RESPONSE["success"] = false;
    }
} else {
    $RESPONSE["success"] = false;
}
die(json_encode($RESPONSE));
Пример #9
0
<?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();
Пример #10
0
<?php

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");
Пример #11
0
<?php

/**
 * ownCloud - user_openam
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Begood Technology Corp. <*****@*****.**>
 * @copyright Begood Technology Corp. 2014
 * */
OCP\App::checkAppEnabled('user_openam');
class OC_USER_OPENAM extends OC_User_Backend
{
    public $iPlanetDirectoryPro;
    public $loginName;
    public function __construct()
    {
    }
    public function checkPassword($uid, $password)
    {
        foreach (getallheaders() as $name => $value) {
            if ($name === 'iPlanetDirectoryPro') {
                $this->iPlanetDirectoryPro = $value;
            }
            if ($name === 'user') {
                $this->loginName = $value;
            }
        }
        if (!empty($this->loginName)) {
            if (!OCP\User::userExists($this->loginName)) {
Пример #12
0
<?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')));
<?php

OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('fc_mail_attachments');
OCP\JSON::callCheck();
//OCP\Config::setSystemValue( 'somesetting', $_POST['somesetting'] );
$user = OCP\User::getUser();
$query = \OCP\DB::prepare('SELECT * FROM `*PREFIX*fc_mail_attachments` WHERE user = ?');
$results = $query->execute(array($user))->fetchAll();
$cid = null;
$cdata = array();
$cfields = array("dir", "mail_host", "mail_port", "mail_security", "mail_user", "mail_password");
if (sizeof($results)) {
    $cid = $results[0]["id"];
    $cdata = $results[0];
}
if (!isset($_GET['mail_security']) || $_GET['mail_security'] == "") {
    $_GET['mail_security'] = 'none';
}
$errors = array();
foreach ($cfields as $cfield) {
    if (isset($_GET[$cfield]) && $_GET[$cfield] != "") {
        $cdata[$cfield] = $_GET[$cfield];
    } else {
        if (!isset($cdata[$cfield]) || $cdata[$cfield] == "") {
            $errors[] = "Field '" . $cfield . "' is not set";
        }
    }
}
$RESPONSE = array("success" => false, "errors" => array());
if (sizeof($errors)) {
Пример #14
0
* @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();
Пример #15
0
*
* 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/>.
*
*/
// Do not load FS ...
$RUNTIME_NOSETUPFS = true;
require_once '../../lib/base.php';
require_once '../../lib/user.php';
require_once '../../lib/public/user.php';
require_once '../../lib/app.php';
require_once '../../lib/public/app.php';
require_once '../../3rdparty/Sabre/DAV/Auth/IBackend.php';
require_once '../../3rdparty/Sabre/DAV/Auth/Backend/AbstractBasic.php';
require_once '../../lib/connector/sabre/auth.php';
OCP\App::checkAppEnabled('remoteStorage');
require_once 'lib_remoteStorage.php';
require_once 'BearerAuth.php';
require_once 'oauth_ro_auth.php';
ini_set('default_charset', 'UTF-8');
#ini_set('error_reporting', '');
@ob_clean();
//allow use as remote storage for other websites
if (isset($_SERVER['HTTP_ORIGIN'])) {
    header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
    header('Access-Control-Max-Age: 3600');
    header('Access-Control-Allow-Methods: OPTIONS, GET, PUT, DELETE, PROPFIND');
    header('Access-Control-Allow-Headers: Authorization, Content-Type');
} else {
    header('Access-Control-Allow-Origin: *');
}
Пример #16
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 Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once '3rdparty/feedcreator/feedcreator.class.php';
OCP\App::checkAppEnabled('notify');
OCP\Util::writeLog("notify", "making feed from {$path_info}", OCP\Util::DEBUG);
if ($path_info == '/notify_feed/feed.rss') {
    $type = 'RSS2.0';
} else {
    if ($path_info == '/notify_feed/feed.atom') {
        $type = 'ATOM1.0';
    } else {
        header('HTTP/1.0 404 Not Found');
        exit;
    }
}
if (!isset($_SERVER["PHP_AUTH_USER"]) or !OCP\User::checkPassword($uid = $_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])) {
    header('WWW-Authenticate: Basic realm="ownCloud Login"');
    header('HTTP/1.0 401 Unauthorized');
    exit;
Пример #17
0
* 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();
Пример #18
0
 * 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('storagecharts2');
$tmpl = new OCP\Template('storagecharts2', 'tpl.settings');
if (isset($_POST['storagecharts2_disp']) && count($_POST['storagecharts2_disp']) <= 3) {
    $c = $_POST['storagecharts2_disp'];
    $c_disp = array('cpie_rfsus' => 0, 'clines_usse' => 0, 'chisto_us' => 0);
    foreach (array_keys($c_disp) as $chart) {
        if (in_array($chart, $c)) {
            $c_disp[$chart] = 1;
        }
    }
    OC_DLStCharts::setUConfValue('c_disp', serialize($c_disp));
    $tmpl->assign('stc_save_ok', TRUE);
}
$displays = OC_DLStCharts::getUConfValue('c_disp', array('uc_val' => 'a:3:{s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:1;s:9:"chisto_us";i:1;}'));
$tmpl->assign('displays', unserialize($displays['uc_val']));
// workaround to detect OC version
Пример #19
0
 * 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 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');
Пример #20
0
 * 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/impressionist.php';
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('impressionist');
OCP\App::setActiveNavigationEntry('impressionist_index');
OCP\Util::addStyle('impressionist', 'mainstyle');
OCP\Util::addStyle('impressionist', 'matrices');
OCP\Util::addStyle('impressionist', 'layout');
OCP\Util::addStyle('impressionist', 'colorpicker');
OCP\Util::addStyle('impressionist', 'bootstrap');
OCP\Util::addScript('impressionist', 'appui');
OCP\Util::addScript('impressionist', 'keymaster');
OCP\Util::addScript('impressionist', 'datastore');
OCP\Util::addScript('impressionist', 'colorpicker');
OCP\Util::addScript('impressionist', 'fileops');
OCP\Util::addScript('impressionist', 'templ');
OCP\Util::addScript('impressionist', 'knobdial');
OCP\Util::addScript('impressionist', 'main');
OCP\Util::addScript('impressionist', 'matrices');
Пример #21
0
*
* 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 qrcode.php
 * Generates qrcode barcodes coding a web reference (url) to the shorty
 * @access public
 * @author Christian Reiner
 */

// Session checks
OCP\App::checkAppEnabled ( 'shorty' );

$RUNTIME_NOSETUPFS = true;

require_once ( '3rdparty/php/phpqrcode.php' );

$query = NULL;
$param = array ( );
// we try to guess what the request indicates, it is expected to be one of these:
// - an alphanumerical ID referencing an existing Shorty in the database
// - a _source_ url stored inside an existing Shorty in the database
foreach ($_GET as $key=>$val) // in case there are unexpected, additional arguments like a timestamp added by some stupid proxy
{
	switch ($key)
	{
		default:
Пример #22
0
<!DOCTYPE html>  
<html lang="en">  
  <head>  
    <meta charset="utf-8">  
    <title>News - ownCloud</title>  
  </head>
  <body>
  	<div class="message">
	<?php 
// Check if we are a user
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('news');
$userid = OCP\USER::getUser();
$feedurl = isset($_GET['url']) ? $_GET['url'] : null;
$feedmapper = new OCA\News\FeedMapper($userid);
$feedid = $feedmapper->findIdFromUrl($feedurl);
$l = OC_L10N::get('news');
if ($feedid === null) {
    $feed = OCA\News\Utils::slimFetch($feedurl);
    if ($feed !== null) {
        $feedid = $feedmapper->save($feed, 0);
        //adds in the root folder
    }
    if ($feed === null || !$feedid) {
        echo $l->t('An error occurred');
    } else {
        echo $l->t('Nice! You have subscribed to ') . $feed->getTitle();
    }
} else {
    echo $l->t('You had already subcribed to this feed!');
}
Пример #23
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 Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
OCP\User::checkAdminUser();
OCP\App::checkAppEnabled('admin_migrate');
// Export?
if (isset($_POST['admin_export'])) {
    // Create the export zip
    $response = json_decode(OC_Migrate::export(null, $_POST['export_type']));
    if (!$response->success) {
        // Error
        die('error');
    } else {
        $path = $response->data;
        // Download it
        header("Content-Type: application/zip");
        header("Content-Disposition: attachment; filename=" . basename($path));
        header("Content-Length: " . filesize($path));
        @ob_end_clean();
        readfile($path);
Пример #24
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();
Пример #25
0
<?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();
Пример #26
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');
Пример #27
0
<?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');
Пример #28
0
 * 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\JSON::checkLoggedIn();
OCP\JSON::callCheck();
OCP\App::checkAppEnabled('user_migrate');
// Which operation
if ($_GET['operation'] == 'create') {
    $uid = !empty($_POST['uid']) ? $_POST['uid'] : OCP\USER::getUser();
    if ($uid != OCP\USER::getUser()) {
        // Needs to be admin to export someone elses account
        OCP\JSON::error();
        die;
    }
    // Create the export zip
    $response = json_decode(OC_Migrate::export($uid));
    if (!$response->success) {
        // Error
        OCP\JSON::error();
        die;
    } else {
Пример #29
0
* 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();
?>
 
Пример #30
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\App::checkAppEnabled('ocdownloader');
OCP\User::checkLoggedIn();

$tmpl = new OCP\Template('ocdownloader', 'downloader.tpl', 'user');

// Get user downloader settings
if(!in_array('curl', get_loaded_extensions())){
	$tmpl->assign('curl_error', TRUE);
}else{
	$l = new OC_L10N('ocdownloader');
	
	$tmpl->assign('user_prov_set', OC_ocDownloader::getProvidersList());
	$tmpl->assign('user_history', OC_ocDownloader::getUserHistory($l));
}

$tmpl->printPage();