예제 #1
0
 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     \OCP\Util::addscript('core', 'tags');
     \OCP\Util::addStyle($this->appName, 'style');
     \OCP\Util::addStyle($this->appName, 'jquery.Jcrop');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/animation');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/fontello');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.webui-popover');
     \OCP\Util::addscript($this->appName, 'app');
     \OCP\Util::addscript($this->appName, '3rdparty/jquery.webui-popover');
     \OCP\Util::addscript($this->appName, 'settings');
     \OCP\Util::addscript($this->appName, 'loader');
     \OCP\Util::addscript($this->appName, 'jquery.scrollTo.min');
     \OCP\Util::addscript($this->appName, 'jquery.nicescroll.min');
     \OCP\Util::addscript('files', 'jquery.fileupload');
     \OCP\Util::addscript($this->appName, 'jquery.Jcrop');
     $iosSupport = $this->configInfo->getUserValue($this->userId, $this->appName, 'iossupport');
     $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
     $addressbooks = Addressbook::all($this->userId);
     if (count($addressbooks) == 0) {
         Addressbook::addDefault($this->userId);
         $addressbooks = Addressbook::all($this->userId);
     }
     //ContactsApp::addingDummyContacts(50);
     $params = ['uploadMaxFilesize' => $maxUploadFilesize, 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), 'iossupport' => $iosSupport, 'addressbooks' => $addressbooks];
     $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
     $csp->addAllowedImageDomain('*');
     $csp->addAllowedFrameDomain('*');
     $response = new TemplateResponse($this->appName, 'index');
     $response->setContentSecurityPolicy($csp);
     $response->setParams($params);
     return $response;
 }
예제 #2
0
 /**
  * CAUTION: the @Stuff turn off security checks, for this page no admin is
  *          required and no CSRF check. If you don't know what CSRF is, read
  *          it up in the docs or you might create a security hole. This is
  *          basically the only required method to add this exemption, don't
  *          add it to any other method if you don't exactly know what it does
  *
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     $conf = \OCP\CONFIG::getUserValue(\OCP\User::getUser(), 'firstpassmanrun', 'show', 1);
     $params = array('user' => $this->userId);
     $conf = $this->userId === 'test' ? 1 : $conf;
     if ($conf == 1) {
         \OCP\Util::addscript('passman', 'firstrun');
         $exampleItems = array();
         $exampleItems[0] = array('label' => 'Item 1', 'tags' => array(array('text' => 'Example tag'), array('text' => 'Example tag 2')));
         $exampleItems[1] = array('label' => 'Item 2', 'tags' => array(array('text' => 'Example tag 2'), array('text' => 'Example tag 3')));
         foreach ($exampleItems as $key => $val) {
             $this->itemAPI->create('', '', '', '', '', $val['label'], '', '', '', '', $val['tags'], array());
         }
     }
     $response = new TemplateResponse('passman', 'main', $params);
     $csp = new ContentSecurityPolicy();
     $csp->addAllowedObjectDomain('\'self\'');
     $csp->addAllowedImageDomain('data:');
     $response->setContentSecurityPolicy($csp);
     return $response;
     // templates/main.php
 }
예제 #3
0
파일: app.php 프로젝트: ViToni/contactsplus
// add an navigation entr
$navigationEntry = function () use($c) {
    return ['id' => $c->getAppName(), 'order' => 1, 'name' => $c->query('L10N')->t('Contacts+'), 'href' => $c->query('URLGenerator')->linkToRoute($c->getAppName() . '.page.index'), 'icon' => $c->query('URLGenerator')->imagePath($c->getAppName(), 'contacts.svg')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
if (\OCP\User::isLoggedIn()) {
    \OCP\Util::addScript('contactsplus', 'search');
}
\OC::$server->getSearch()->registerProvider('OCA\\ContactsPlus\\Search\\Provider', array('app' => $contactsAppName));
\OCP\Share::registerBackend(ContactsApp::SHAREADDRESSBOOK, 'OCA\\ContactsPlus\\Share\\Backend\\Addressbook');
\OCP\Share::registerBackend(ContactsApp::SHARECONTACT, 'OCA\\ContactsPlus\\Share\\Backend\\Contact');
\OCP\Util::connectHook('OC_User', 'post_deleteUser', '\\OCA\\ContactsPlus\\Hooks', 'deleteUser');
if (\OCP\User::isLoggedIn() && !\OCP\App::isEnabled('contacts')) {
    $request = $c->query('Request');
    if (isset($request->server['REQUEST_URI'])) {
        $url = $request->server['REQUEST_URI'];
        if (preg_match('%index.php/apps/files(/.*)?%', $url) || preg_match('%index.php/s/(/.*)?%', $url)) {
            \OCP\Util::addscript($contactsAppName, 'loader');
        }
    }
}
if (\OCP\User::isLoggedIn()) {
    $cm = \OC::$server->getContactsManager();
    $cm->register(function () use($cm) {
        $myApp = new Application();
        $addressBooks = $myApp->getContainer()->query('AddressbookController')->getAddressBooksForCM();
        foreach ($addressBooks as $addressBook) {
            $cm->registerAddressBook(new AddressbookProvider($addressBook));
        }
    });
}
예제 #4
0
<?php

/**
 * Copyright (c) 2013 Sam Tuke <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
// Add CSS stylesheet
\OC_Util::addStyle('files_encryption', 'settings-personal');
$tmpl = new OCP\Template('files_encryption', 'settings-personal');
$user = \OCP\USER::getUser();
$view = new \OC\Files\View('/');
$util = new \OCA\Files_Encryption\Util($view, $user);
$session = new \OCA\Files_Encryption\Session($view);
$privateKeySet = $session->getPrivateKey() !== false;
// did we tried to initialize the keys for this session?
$initialized = $session->getInitialized();
$recoveryAdminEnabled = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled');
$recoveryEnabledForUser = $util->recoveryEnabledForUser();
$result = false;
if ($recoveryAdminEnabled || !$privateKeySet) {
    \OCP\Util::addscript('files_encryption', 'settings-personal');
    $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
    $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
    $tmpl->assign('privateKeySet', $privateKeySet);
    $tmpl->assign('initialized', $initialized);
    $result = $tmpl->fetchPage();
}
return $result;
예제 #5
0
<?php

\OCP\User::checkLoggedIn();
\OCP\App::checkAppEnabled('ocDashboard');
\OCP\Util::addscript('ocDashboard', 'settings');
OCP\Util::addstyle('ocDashboard', 'ocDashboardSettings');
$user = OCP\User::getUser();
$tmpl = new OCP\Template('ocDashboard', 'settings');
$w = array();
OC::$CLASSPATH['ocdWidgets'] = 'ocDashboard/appinfo/widgetConfigs.php';
OC::$CLASSPATH['ocdFactory'] = 'ocDashboard/lib/factory.php';
foreach (ocdWidgets::$widgets as $widget) {
    $confs = json_decode($widget['conf'], true);
    if (isset($confs) && !empty($confs)) {
        foreach ($confs as $k => $config) {
            if ($config['type'] != 'password') {
                $confs[$k]['value'] = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id'] . "_" . $config['id'], "");
            }
        }
    }
    $enable = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id']);
    $w[] = array("widget" => $widget, "enable" => $enable, "conf" => $confs);
}
//print_r($w);
$tmpl->assign('widgets', $w);
return $tmpl->fetchPage();
예제 #6
0
파일: app.php 프로젝트: hjimmy/owncloud
<?php

OC::$CLASSPATH['OCA\\Encryption\\Crypt'] = 'files_encryption/lib/crypt.php';
OC::$CLASSPATH['OCA\\Encryption\\Hooks'] = 'files_encryption/hooks/hooks.php';
OC::$CLASSPATH['OCA\\Encryption\\Util'] = 'files_encryption/lib/util.php';
OC::$CLASSPATH['OCA\\Encryption\\Keymanager'] = 'files_encryption/lib/keymanager.php';
OC::$CLASSPATH['OCA\\Encryption\\Stream'] = 'files_encryption/lib/stream.php';
OC::$CLASSPATH['OCA\\Encryption\\Proxy'] = 'files_encryption/lib/proxy.php';
OC::$CLASSPATH['OCA\\Encryption\\Session'] = 'files_encryption/lib/session.php';
OC::$CLASSPATH['OCA\\Encryption\\Capabilities'] = 'files_encryption/lib/capabilities.php';
OC::$CLASSPATH['OCA\\Encryption\\Helper'] = 'files_encryption/lib/helper.php';
\OCP\Util::addscript('files_encryption', 'encryption');
\OCP\Util::addscript('files_encryption', 'detect-migration');
if (!OC_Config::getValue('maintenance', false)) {
    OC_FileProxy::register(new OCA\Encryption\Proxy());
    // User related hooks
    OCA\Encryption\Helper::registerUserHooks();
    // Sharing related hooks
    OCA\Encryption\Helper::registerShareHooks();
    // Filesystem related hooks
    OCA\Encryption\Helper::registerFilesystemHooks();
    // App manager related hooks
    OCA\Encryption\Helper::registerAppHooks();
    if (!in_array('crypt', stream_get_wrappers())) {
        stream_wrapper_register('crypt', 'OCA\\Encryption\\Stream');
    }
    // check if we are logged in
    if (OCP\User::isLoggedIn()) {
        // ensure filesystem is loaded
        if (!\OC\Files\Filesystem::$loaded) {
            \OC_Util::setupFS();
예제 #7
0
<?php

/**
 * Copyright (c) 2011 Robin Appelman <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
\OC_Util::checkAdminUser();
$tmpl = new OCP\Template('files_encryption', 'settings-admin');
// Check if an adminRecovery account is enabled for recovering files after lost pwd
$view = new OC_FilesystemView('');
$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
\OCP\Util::addscript('files_encryption', 'settings-admin');
\OCP\Util::addscript('core', 'multiselect');
return $tmpl->fetchPage();
예제 #8
0
    $font_value = $result[0]['configvalue'];
}
//Lockey by name rule
$query = \OCP\DB::prepare("SELECT * FROM *PREFIX*appconfig where configkey='suffix' and appid='files_w2g' LIMIT 1");
$result = $query->execute()->fetchAll();
if (count($result) >= 1) {
    $naming = $result[0]['configvalue'];
}
//Locked files
$exist = \OCP\DB::prepare("SHOW TABLES LIKE '*PREFIX*" . app::table . "'")->execute()->fetchAll();
if ($exist != null) {
    $result = \OCP\DB::prepare("SELECT * FROM *PREFIX*" . app::table)->execute()->fetchAll();
}
//----------------------------------------------------------------------------------------------------------------------------
\OCP\Util::addscript(app::name, 'admin');
\OCP\Util::addscript(app::name, 'jscolor');
?>
<div class="section" id="multiaccess_settings">
<fieldset class="personalblock">
	<h2><?php 
p($l->t('Manage multiaccess'));
?>
</h2>
	
	<?php 
p($l->t("Here you can set the colors for the locked files."));
echo $naming;
echo '
	<br><br>
	<u>' . $l->t("Background color") . ':</u><br>
	#<input id="multicolor" class="color" type="text" value="' . $value . '" style="width:180px;" name="multicolor" original-title="' . $l->t("choose a valid html color") . '"></input>
예제 #9
0
namespace OCA\CalendarPlus\AppInfo;

$app = new Application();
$c = $app->getContainer();
$appName = (string) $c->getAppName();
// add an navigation entry
$navigationEntry = function () use($c) {
    return ['id' => $c->getAppName(), 'order' => 1, 'name' => $c->query('L10N')->t('Calendar+'), 'href' => $c->query('URLGenerator')->linkToRoute($c->getAppName() . '.page.index'), 'icon' => $c->query('URLGenerator')->imagePath($c->getAppName(), 'calendar.svg')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
//upcoming version search for 8.2 perhaps patch https://github.com/owncloud/core/pull/17339/files
//\OC::$server->getSearch()->registerProvider('OCA\CalendarPlus\Search\Provider', array('app' =>$appName,'apps' =>array('tasksplus')));
\OC::$server->getSearch()->registerProvider('OCA\\CalendarPlus\\Search\\Provider', array('app' => $appName));
if (\OC::$server->getAppManager()->isEnabledForUser('activity')) {
    \OC::$server->getActivityManager()->registerExtension(function () {
        return new \OCA\CalendarPlus\Activity();
    });
}
\OCA\CalendarPlus\Hooks::register();
\OCP\Util::addScript($appName, 'alarm');
if (\OCP\User::isLoggedIn() && !\OCP\App::isEnabled('calendar')) {
    $request = $c->query('Request');
    if (isset($request->server['REQUEST_URI'])) {
        $url = $request->server['REQUEST_URI'];
        if (preg_match('%index.php/apps/files(/.*)?%', $url) || preg_match('%index.php/s/(/.*)?%', $url)) {
            \OCP\Util::addScript($appName, 'loaderimport');
            \OCP\Util::addStyle($appName, '3rdparty/colorPicker');
            \OCP\Util::addscript($appName, '3rdparty/jquery.colorPicker');
        }
    }
}
예제 #10
0
<?php

/**
 * ownCloud - User Files Restore
 *
 * @author Patrick Paysant <*****@*****.**>
 * @copyright 2015 CNRS DSI
 * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */
namespace OCA\User_Files_Restore;

use OCA\User_Files_Restore\App\User_Files_Restore;
$app = new User_Files_Restore();
$c = $app->getContainer();
/**
 * add navigation
 */
\OCP\App::addNavigationEntry(array('id' => 'user_files_restore', 'order' => 10, 'href' => \OCP\Util::linkToRoute('user_files_restore.page.index'), 'icon' => \OCP\Util::imagePath($c->query('AppName'), 'restoreApp.svg'), 'name' => $c->query('L10N')->t('Restore')));
/**
 * Load js and overlay icon
 */
\OCP\Util::addscript($c->query('AppName'), 'restore');
\OCP\Util::addStyle($c->query('AppName'), 'restore');
예제 #11
0
파일: main.php 프로젝트: Viperoo/ownmnote
<?php

\OCP\Util::addScript('ownmnote', 'script');
OCP\Util::addStyle('files_texteditor', 'DroidSansMono/stylesheet');
OCP\Util::addStyle('files_texteditor', 'style');
OCP\Util::addStyle('files_texteditor', 'mobile');
OCP\Util::addscript('files_texteditor', 'editor');
OCP\Util::addscript('files_markdown', 'marked');
OCP\Util::addscript('files_texteditor', 'vendor/ace/src-noconflict/ace');
\OCP\Util::addStyle('ownmnote', 'style');
\OCP\Util::addscript('files_markdown', 'editor');
\OCP\Util::addStyle('files_markdown', 'preview');
\OCP\Util::addStyle('files_markdown', 'highlight-default');
$disableAnnouncement = \OCP\Config::getAppValue('ownmnote', 'disableAnnouncement', '');
$l = OCP\Util::getL10N('ownmnote');
$ocVersionArray = OCP\Util::getVersion();
$ocVersion = "";
$oci = 0;
$ocl = sizeof($ocVersionArray);
foreach ($ocVersionArray as $v) {
    $ocVersion .= $v;
    $oci++;
    if ($oci < $ocl) {
        $ocVersion .= ".";
    }
}
?>
<div id="app">
    <div id="app-navigation">
        <ul id="grouplist">
        </ul>
예제 #12
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/>.
 * 
 */
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();
예제 #13
0
파일: app.php 프로젝트: Greenworker/oclife
 * 
 * This file is part of oclife.
 * 
 * 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/>.
 */
\OCP\App::addNavigationEntry(array('id' => 'oclife', 'order' => 10, 'href' => \OCP\Util::linkToRoute('oclife_index'), 'icon' => \OCP\Util::imagePath('oclife', 'nav-icon.svg'), 'name' => 'Tags'));
// Handle translations
//$l = new \OC_L10N('oclife');
$l = \OCP\Util::getL10N('oclife');
// Add what's needed by TagManager
\OCP\Util::addStyle('oclife', 'bootstrap-tokenfield');
\OCP\Util::addStyle('oclife', 'oclife_fileInfo');
\OCP\Util::addScript('oclife', 'bootstrap-tokenfield/bootstrap-tokenfield');
\OCP\Util::addScript('oclife', 'bootstrap-tokenfield/typeahead.bundle');
\OCP\Util::addScript('oclife', 'bootstrap-tokenfield/affix');
\OCP\App::registerAdmin('oclife', 'settings');
\OCP\Util::addscript('oclife', 'oclife/oclife_fileExtendedInfo');
// Register filesystem hooks to remove thumbnails and tags DB entries
\OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\\OCLife\\utilities', 'cleanupForDelete');
\OCP\Util::connectHook('OC_Filesystem', 'rename', 'OCA\\OCLife\\utilities', 'cleanupForRename');
예제 #14
0
namespace OCA\CalendarPlus\AppInfo;

$app = new Application();
$c = $app->getContainer();
$appName = (string) $c->getAppName();
// add an navigation entry
$navigationEntry = function () use($c) {
    return ['id' => $c->getAppName(), 'order' => 1, 'name' => $c->query('L10N')->t('Calendar+'), 'href' => $c->query('URLGenerator')->linkToRoute($c->getAppName() . '.page.index'), 'icon' => $c->query('URLGenerator')->imagePath($c->getAppName(), 'calendar.svg')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
//upcoming version search for 8.2 perhaps patch https://github.com/owncloud/core/pull/17339/files
//\OC::$server->getSearch()->registerProvider('OCA\CalendarPlus\Search\Provider', array('app' =>$appName,'apps' =>array('tasksplus')));
\OC::$server->getSearch()->registerProvider('OCA\\CalendarPlus\\Search\\Provider', array('app' => $appName));
if (\OC::$server->getAppManager()->isEnabledForUser('activity')) {
    \OC::$server->getActivityManager()->registerExtension(function () {
        return new \OCA\CalendarPlus\Activity();
    });
}
\OCA\CalendarPlus\Hooks::register();
\OCP\Util::addScript($appName, 'alarm');
if (\OCP\User::isLoggedIn() && !\OCP\App::isEnabled('calendar')) {
    $request = $c->query('Request');
    if (isset($request->server['REQUEST_URI'])) {
        $url = $request->server['REQUEST_URI'];
        if (preg_match('%index.php/apps/files(/.*)?%', $url) || preg_match('%index.php/s/(/.*)?%', $url)) {
            \OCP\Util::addScript($appName, 'loaderimport');
            \OCP\Util::addStyle($appName, '3rdparty/jquery.miniColors');
            \OCP\Util::addscript($appName, '3rdparty/jquery.miniColors.min');
        }
    }
}
예제 #15
0
<?php

/**
 * ownCloud - Files_Reader App
 *
 * @author Frank de Lange
 * @copyright 2015 Frank de Lange
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 */
namespace OCA\Files_Reader\AppInfo;

use OCP\Util;
Util::addscript('files_reader', 'plugin');
예제 #16
0
 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     if (\OC::$server->getAppManager()->isEnabledForUser('contactsplus')) {
         $appinfo = \OCP\App::getAppVersion('contactsplus');
         if (version_compare($appinfo, '1.0.6', '>=')) {
             $calId = $this->calendarController->checkBirthdayCalendarByUri('bdaycpltocal_' . $this->userId);
         }
     }
     $calendars = CalendarCalendar::allCalendars($this->userId, false, false, false);
     if (count($calendars) == 0) {
         CalendarCalendar::addDefaultCalendars($this->userId);
         $calendars = CalendarCalendar::allCalendars($this->userId, true);
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "onedayview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "agendaDay");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "oneweekview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "agendaWeek");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "onemonthview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "month");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "listview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "list");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "fourweeksview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "fourweeks");
     }
     \OCP\Util::addStyle($this->appName, '3rdparty/colorPicker');
     \OCP\Util::addscript($this->appName, '3rdparty/jquery.colorPicker');
     \OCP\Util::addScript($this->appName, '3rdparty/fullcalendar');
     \OCP\Util::addStyle($this->appName, '3rdparty/fullcalendar');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.timepicker');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/animation');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/fontello');
     \OCP\Util::addScript($this->appName, 'jquery.scrollTo.min');
     //\OCP\Util::addScript($this->appName,'timepicker');
     \OCP\Util::addScript($this->appName, '3rdparty/datepair');
     \OCP\Util::addScript($this->appName, '3rdparty/jquery.datepair');
     \OCP\Util::addScript($this->appName, '3rdparty/jquery.timepicker');
     \OCP\Util::addScript($this->appName, "3rdparty/jquery.webui-popover");
     \OCP\Util::addScript($this->appName, "3rdparty/chosen.jquery.min");
     \OCP\Util::addStyle($this->appName, "3rdparty/chosen");
     \OCP\Util::addScript($this->appName, '3rdparty/tag-it');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.tagit');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.webui-popover');
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'timezone') == null || $this->configInfo->getUserValue($this->userId, $this->appName, 'timezonedetection') == 'true') {
         \OCP\Util::addScript($this->appName, '3rdparty/jstz-1.0.4.min');
         \OCP\Util::addScript($this->appName, 'geo');
     }
     \OCP\Util::addScript($this->appName, '3rdparty/printThis');
     \OCP\Util::addScript($this->appName, 'app');
     \OCP\Util::addScript($this->appName, 'loaderimport');
     \OCP\Util::addStyle($this->appName, 'style');
     \OCP\Util::addStyle($this->appName, "mobile");
     \OCP\Util::addScript($this->appName, 'jquery.multi-autocomplete');
     \OCP\Util::addScript('core', 'tags');
     \OCP\Util::addScript($this->appName, 'on-event');
     $leftNavAktiv = $this->configInfo->getUserValue($this->userId, $this->appName, 'calendarnav');
     $rightNavAktiv = $this->configInfo->getUserValue($this->userId, $this->appName, 'tasknav');
     $pCalendar = $calendars;
     $pHiddenCal = 'class="isHiddenCal"';
     $pButtonCalAktive = '';
     if ($leftNavAktiv === 'true') {
         $pHiddenCal = '';
         $pButtonCalAktive = 'button-info';
     }
     $pButtonTaskAktive = '';
     $pTaskOutput = '';
     $pRightnavAktiv = $rightNavAktiv;
     $pIsHidden = 'class="isHiddenTask"';
     if ($rightNavAktiv === 'true' && \OC::$server->getAppManager()->isEnabledForUser('tasksplus')) {
         $allowedCals = [];
         foreach ($calendars as $calInfo) {
             $isAktiv = (int) $calInfo['active'];
             if ($this->configInfo->getUserValue($this->userId, $this->appName, 'calendar_' . $calInfo['id']) !== '') {
                 $isAktiv = (int) $this->configInfo->getUserValue($this->userId, $this->appName, 'calendar_' . $calInfo['id']);
             }
             if ($isAktiv === 1) {
                 $allowedCals[] = $calInfo;
             }
         }
         $cDataTimeLine = new \OCA\TasksPlus\Timeline();
         $cDataTimeLine->setCalendars($allowedCals);
         $taskOutPutbyTime = $cDataTimeLine->generateAddonCalendarTodo();
         $paramsList = ['taskOutPutbyTime' => $taskOutPutbyTime];
         $list = new TemplateResponse('tasksplus', 'calendars.tasks.list', $paramsList, '');
         $pButtonTaskAktive = 'button-info';
         $pTaskOutput = $list->render();
         $pIsHidden = '';
     }
     $params = ['calendars' => $pCalendar, 'leftnavAktiv' => $leftNavAktiv, 'isHiddenCal' => $pHiddenCal, 'buttonCalAktive' => $pButtonCalAktive, 'isHidden' => $pIsHidden, 'buttonTaskAktive' => $pButtonTaskAktive, 'taskOutput' => $pTaskOutput, 'rightnavAktiv' => $pRightnavAktiv, 'mailNotificationEnabled' => \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_mail_notification', 'yes'), 'allowShareWithLink' => \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_links', 'yes'), 'mailPublicNotificationEnabled' => \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_public_notification', 'no')];
     $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
     $csp->addAllowedImageDomain('*');
     $response = new TemplateResponse($this->appName, 'calendar', $params);
     $response->setContentSecurityPolicy($csp);
     return $response;
 }
예제 #17
0
\Sabre\VObject\Property::$classMap['ADR'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['GEO'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['ORG'] = '\\OC\\VObject\\CompoundProperty';
\OC::$server->getNavigationManager()->add(array('id' => 'contacts', 'order' => 10, 'href' => \OCP\Util::linkToRoute('contacts_index'), 'icon' => \OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => \OCP\Util::getL10N('contacts')->t('Contacts')));
$api = new API('contacts');
$api->connectHook('OC_User', 'post_createUser', '\\OCA\\Contacts\\Hooks', 'userCreated');
$api->connectHook('OC_User', 'post_deleteUser', '\\OCA\\Contacts\\Hooks', 'userDeleted');
$api->connectHook('OCA\\Contacts', 'pre_deleteAddressBook', '\\OCA\\Contacts\\Hooks', 'addressBookDeletion');
$api->connectHook('OCA\\Contacts', 'pre_deleteContact', '\\OCA\\Contacts\\Hooks', 'contactDeletion');
$api->connectHook('OCA\\Contacts', 'post_createContact', 'OCA\\Contacts\\Hooks', 'contactAdded');
$api->connectHook('OCA\\Contacts', 'post_updateContact', '\\OCA\\Contacts\\Hooks', 'contactUpdated');
$api->connectHook('OCA\\Contacts', 'scanCategories', '\\OCA\\Contacts\\Hooks', 'scanCategories');
$api->connectHook('OCA\\Contacts', 'indexProperties', '\\OCA\\Contacts\\Hooks', 'indexProperties');
$api->connectHook('OC_Calendar', 'getEvents', 'OCA\\Contacts\\Hooks', 'getBirthdayEvents');
$api->connectHook('OC_Calendar', 'getSources', 'OCA\\Contacts\\Hooks', 'getCalenderSources');
\OCP\Util::addscript('contacts', 'loader');
\OCP\Util::addscript('contacts', 'admin');
\OC_Search::registerProvider('OCA\\Contacts\\Search\\Provider');
//\OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
\OCP\Share::registerBackend('addressbook', 'OCA\\Contacts\\Share\\Addressbook', 'contact');
//\OCP\App::registerPersonal('contacts','personalsettings');
\OCP\App::registerAdmin('contacts', 'admin');
if (\OCP\User::isLoggedIn()) {
    $app = new App($api->getUserId());
    $addressBooks = $app->getAddressBooksForUser();
    foreach ($addressBooks as $addressBook) {
        if ($addressBook->isActive()) {
            \OCP\Contacts::registerAddressBook($addressBook->getSearchProvider());
        }
    }
}
예제 #18
0
파일: popup.php 프로젝트: viki53/passman
\OCP\Util::addscript('passman', 'sjcl');
\OCP\Util::addscript('passman', 'angular.min');
\OCP\Util::addscript('passman', 'tagsInput.min');
\OCP\Util::addscript('passman', 'bower_components/ng-clip/dest/ng-clip.min');
\OCP\Util::addscript('passman', 'bower_components/zeroclipboard/dist/ZeroClipboard.min');
\OCP\Util::addscript('passman', 'jstorage');
\OCP\Util::addscript('passman', 'bower_components/zxcvbn/zxcvbn-async');
\OCP\Util::addscript('passman', 'pwgen');
\OCP\Util::addscript('passman', 'qrReader/llqrcode');
\OCP\Util::addscript('passman', 'sha');
\OCP\Util::addscript('passman', 'func');
\OCP\Util::addscript('passman', 'popup');
\OCP\Util::addscript('passman', 'app.service');
\OCP\Util::addscript('passman', 'app.directive');
\OCP\Util::addscript('passman', 'app.filter');
\OCP\Util::addStyle('passman', 'ocPassman');
\OCP\Util::addStyle('passman', 'popup');
\OCP\Util::addStyle('passman', 'ng-tags-input.min');
\OCP\Util::addStyle('passman', 'bootstrapGrid');
?>

<div ng-controller="popupCtrl" ng-app="passman">
	<div class="container">
		<div class="tabHeader" ng-class="'tab'+tabActive" ng-init="tabActive=1">
			<div class="col-xs-2 nopadding tab1" ng-click="tabActive=1;"
				 ng-class="{'active': tabActive==1}"><?php 
p($l->t('General'));
?>
</div>
			<div class="col-xs-2 nopadding tab2" ng-click="tabActive=2;"
예제 #19
0
파일: main.php 프로젝트: viki53/passman
\OCP\Util::addscript('passman', 'tagsInput.min');
\OCP\Util::addscript('passman', 'bower_components/ng-clip/dest/ng-clip.min');
\OCP\Util::addscript('passman', 'bower_components/zeroclipboard/dist/ZeroClipboard.min');
\OCP\Util::addscript('passman', 'jstorage');
\OCP\Util::addscript('passman', 'bower_components/zxcvbn/zxcvbn-async');
\OCP\Util::addscript('passman', 'pwgen');
\OCP\Util::addscript('passman', 'textAngular-rangy.min');
\OCP\Util::addscript('passman', 'textAngular.min');
\OCP\Util::addscript('passman', 'qrReader/llqrcode');
\OCP\Util::addscript('passman', 'sha');
\OCP\Util::addscript('passman', 'func');
\OCP\Util::addscript('passman', 'app');
\OCP\Util::addscript('passman', 'app.service');
\OCP\Util::addscript('passman', 'app.directive');
\OCP\Util::addscript('passman', 'app.filter');
\OCP\Util::addscript('passman', 'module.fileReader');
\OCP\Util::addScript('passman', 'jsrsasign-4.7.0-all-min');
\OCP\Util::addStyle('passman', 'ocPassman');
\OCP\Util::addStyle('passman', 'textAngular');
\OCP\Util::addStyle('passman', 'ng-tags-input.min');
\OCP\Util::addStyle('passman', 'bootstrapGrid');
\OCP\Util::addStyle('passman', 'fontawsome/font-awesome');
?>

<div ng-app="passman" id="app" ng-controller="appCtrl">
  <div class="loaderContainer" hide-loaded>
    <div class="loader"></div>
    <div class="text"><?php 
p($l->t('Loading...'));
?>
</div>
예제 #20
0
 public static function launch()
 {
     \OCP\Util::addscript(self::name, 'workin2gether');
     \OCP\Util::addstyle(self::name, 'styles');
     \OCP\App::registerAdmin(self::name, 'admin');
 }
예제 #21
0
 /**
  * @NoCSRFRequired
  * @NoAdminRequired
  *
  * @param string $dir
  * @param string $view
  * @return TemplateResponse
  * @throws \OCP\Files\NotFoundException
  */
 public function index($dir = '', $view = '')
 {
     $nav = new \OCP\Template('files', 'appnavigation', '');
     // Load the files we need
     \OCP\Util::addStyle('files', 'files');
     \OCP\Util::addStyle('files', 'upload');
     \OCP\Util::addStyle('files', 'mobile');
     \OCP\Util::addscript('files', 'app');
     \OCP\Util::addscript('files', 'file-upload');
     \OCP\Util::addscript('files', 'newfilemenu');
     \OCP\Util::addscript('files', 'jquery.iframe-transport');
     \OCP\Util::addscript('files', 'jquery.fileupload');
     \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\Util::addscript('files', 'fileactions');
     \OCP\Util::addscript('files', 'fileactionsmenu');
     \OCP\Util::addscript('files', 'files');
     \OCP\Util::addscript('files', 'keyboardshortcuts');
     \OCP\Util::addscript('files', 'navigation');
     // if IE8 and "?dir=path&view=someview" was specified, reformat the URL to use a hash like "#?dir=path&view=someview"
     $isIE8 = $this->request->isUserAgent([Request::USER_AGENT_IE_8]);
     if ($isIE8 && ($dir !== '' || $view !== '')) {
         $dir = !empty($dir) ? $dir : '/';
         $view = !empty($view) ? $view : 'files';
         $hash = '#?dir=' . \OCP\Util::encodePath($dir);
         if ($view !== 'files') {
             $hash .= '&view=' . urlencode($view);
         }
         return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index') . $hash);
     }
     // mostly for the home storage's free space
     // FIXME: Make non static
     $storageInfo = $this->getStorageInfo();
     \OCA\Files\App::getNavigationManager()->add(['id' => 'favorites', 'appname' => 'files', 'script' => 'simplelist.php', 'order' => 5, 'name' => $this->l10n->t('Favorites')]);
     $navItems = \OCA\Files\App::getNavigationManager()->getAll();
     usort($navItems, function ($item1, $item2) {
         return $item1['order'] - $item2['order'];
     });
     $nav->assign('navigationItems', $navItems);
     $contentItems = [];
     // render the container content for every navigation item
     foreach ($navItems as $item) {
         $content = '';
         if (isset($item['script'])) {
             $content = $this->renderScript($item['appname'], $item['script']);
         }
         $contentItem = [];
         $contentItem['id'] = $item['id'];
         $contentItem['content'] = $content;
         $contentItems[] = $contentItem;
     }
     $this->eventDispatcher->dispatch('OCA\\Files::loadAdditionalScripts');
     $params = [];
     $params['usedSpacePercent'] = (int) $storageInfo['relative'];
     $params['owner'] = $storageInfo['owner'];
     $params['ownerDisplayName'] = $storageInfo['ownerDisplayName'];
     $params['isPublic'] = false;
     $params['mailNotificationEnabled'] = $this->config->getAppValue('core', 'shareapi_allow_mail_notification', 'no');
     $params['mailPublicNotificationEnabled'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no');
     $params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes');
     $params['appNavigation'] = $nav;
     $params['appContents'] = $contentItems;
     $this->navigationManager->setActiveEntry('files_index');
     $response = new TemplateResponse($this->appName, 'index', $params);
     $policy = new ContentSecurityPolicy();
     $policy->addAllowedFrameDomain('\'self\'');
     $response->setContentSecurityPolicy($policy);
     return $response;
 }
예제 #22
0
파일: app.php 프로젝트: CDN-Sparks/owncloud
\Sabre\VObject\Property::$classMap['X-EVOLUTION-FILE-AS'] = '\\OC\\VObject\\StringProperty';
\Sabre\VObject\Property::$classMap['N'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['ADR'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['GEO'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['ORG'] = '\\OC\\VObject\\CompoundProperty';
\OC::$server->getNavigationManager()->add(array('id' => 'contacts', 'order' => 10, 'href' => \OCP\Util::linkToRoute('contacts_index'), 'icon' => \OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => \OCP\Util::getL10N('contacts')->t('Contacts')));
$api = new API('contacts');
$api->connectHook('OC_User', 'post_createUser', '\\OCA\\Contacts\\Hooks', 'userCreated');
$api->connectHook('OC_User', 'post_deleteUser', '\\OCA\\Contacts\\Hooks', 'userDeleted');
$api->connectHook('OCA\\Contacts', 'pre_deleteAddressBook', '\\OCA\\Contacts\\Hooks', 'addressBookDeletion');
$api->connectHook('OCA\\Contacts', 'pre_deleteContact', '\\OCA\\Contacts\\Hooks', 'contactDeletion');
$api->connectHook('OCA\\Contacts', 'post_createContact', 'OCA\\Contacts\\Hooks', 'contactAdded');
$api->connectHook('OCA\\Contacts', 'post_updateContact', '\\OCA\\Contacts\\Hooks', 'contactUpdated');
$api->connectHook('OCA\\Contacts', 'scanCategories', '\\OCA\\Contacts\\Hooks', 'scanCategories');
$api->connectHook('OCA\\Contacts', 'indexProperties', '\\OCA\\Contacts\\Hooks', 'indexProperties');
$api->connectHook('OC_Calendar', 'getEvents', 'OCA\\Contacts\\Hooks', 'getBirthdayEvents');
$api->connectHook('OC_Calendar', 'getSources', 'OCA\\Contacts\\Hooks', 'getCalenderSources');
\OCP\Util::addscript('contacts', 'loader');
\OC_Search::registerProvider('OCA\\Contacts\\SearchProvider');
//\OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
\OCP\Share::registerBackend('addressbook', 'OCA\\Contacts\\Share\\Addressbook', 'contact');
//\OCP\App::registerPersonal('contacts','personalsettings');
if (\OCP\User::isLoggedIn()) {
    $app = new App($api->getUserId());
    $addressBooks = $app->getAddressBooksForUser();
    foreach ($addressBooks as $addressBook) {
        if ($addressBook->isActive()) {
            \OCP\Contacts::registerAddressBook(new AddressbookProvider($addressBook));
        }
    }
}
예제 #23
0
파일: app.php 프로젝트: GitHubUser4234/core
/**
 * @author Björn Schießle <*****@*****.**>
 * @author Clark Tomlinson <*****@*****.**>
 *
 * @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/>
 *
 */
namespace OCA\Encryption\AppInfo;

\OCP\Util::addscript('encryption', 'encryption');
$encryptionSystemReady = \OC::$server->getEncryptionManager()->isReady();
$app = new Application([], $encryptionSystemReady);
if ($encryptionSystemReady) {
    $app->registerEncryptionModule();
    $app->registerHooks();
    $app->registerSettings();
}
예제 #24
0
<?php

/**
 * ownCloud - User Files Restore
 *
 * @author Patrick Paysant <*****@*****.**>
 * @copyright 2015 CNRS DSI
 * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */
namespace OCA\User_Files_Restore;

use OCA\User_Files_Restore\App\User_Files_Restore;
$app = new User_Files_Restore();
$c = $app->getContainer();
/**
 * add navigation
 */
\OCP\App::addNavigationEntry(array('id' => 'user_files_restore', 'order' => 10, 'href' => \OCP\Util::linkToRoute('user_files_restore.page.index'), 'icon' => \OCP\Util::imagePath($c->query('AppName'), 'restoreApp.svg'), 'name' => $c->query('L10N')->t('Restore')));
/**
 * Load js and overlay icon
 */
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () use($c) {
    \OCP\Util::addscript($c->query('AppName'), 'app');
    \OCP\Util::addscript($c->query('AppName'), 'userfilesrestoretabview');
    \OCP\Util::addscript($c->query('AppName'), 'filesplugin');
    \OCP\Util::addStyle($c->query('AppName'), 'restore');
});
<?php

\OCP\User::checkLoggedIn();
\OCP\App::checkAppEnabled('fc_mail_attachments');
\OCP\Util::addscript('fc_mail_attachments', 'utils');
\OCP\Util::addscript('fc_mail_attachments', 'account');
//OCP\Util::addstyle('fc_mail_attachments', 'style');
$user = OCP\User::getUser();
$tmpl = new OCP\Template('fc_mail_attachments', 'settings');
$query = \OCP\DB::prepare('SELECT * FROM `*PREFIX*fc_mail_attachments` WHERE user = ?');
$results = $query->execute(array($user))->fetchAll();
if (sizeof($results)) {
    $conf = $results[0];
    $tmpl->assign('dir', $conf['dir']);
    $tmpl->assign('mail_host', $conf['mail_host']);
    $tmpl->assign('mail_port', $conf['mail_port']);
    $tmpl->assign('mail_security', $conf['mail_security']);
    $tmpl->assign('mail_user', $conf['mail_user']);
}
return $tmpl->fetchPage();
예제 #26
0
<?php

/**
 * ownCloud - User Set Password
 *
 * @author Patrick Paysant <*****@*****.**>
 * @copyright 2015 CNRS DSI
 * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */
namespace OCA\User_Set_Password;

use OCA\User_Set_Password\App\User_Set_Password;
use OCA\User_Set_Password\Lib\Helper;
$app = new User_Set_Password();
$c = $app->getContainer();
/**
 * Load js and css
 */
\OCP\Util::addStyle($c->query('AppName'), 'colorbox');
\OCP\Util::addScript($c->query('AppName'), 'jquery.colorbox');
\OCP\Util::addscript($c->query('AppName'), 'setpassword');
\OCP\Util::addStyle($c->query('AppName'), 'setpassword');
if (\OCP\User::isLoggedIn() and Helper::isEnabled()) {
    \OC_Util::addScript('3rdparty', 'strengthify/jquery.strengthify');
    \OC_Util::addStyle('3rdparty', 'strengthify/strengthify');
    \OC_Util::addScript('3rdparty', 'chosen/chosen.jquery.min');
    \OC_Util::addStyle('3rdparty', 'chosen/chosen');
    \OCP\Util::addScript($c->query('AppName'), 'activate');
}