function search($query) { $addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1); // if(count($calendars)==0 || !OCP\App::isEnabled('contacts')){ // //return false; // } // NOTE: Does the following do anything $results = array(); $searchquery = array(); if (substr_count($query, ' ') > 0) { $searchquery = explode(' ', $query); } else { $searchquery[] = $query; } $l = new OC_l10n('contacts'); foreach ($addressbooks as $addressbook) { $vcards = OC_Contacts_VCard::all($addressbook['id']); foreach ($vcards as $vcard) { if (substr_count(strtolower($vcard['fullname']), strtolower($query)) > 0) { $link = OCP\Util::linkTo('contacts', 'index.php') . '?id=' . urlencode($vcard['id']); $results[] = new OC_Search_Result($vcard['fullname'], '', $link, $l->t('Contact')); //$name,$text,$link,$type } } } return $results; }
public static function getCalenderSources($parameters) { $base_url = OCP\Util::linkTo('calendar', 'ajax/events.php') . '?calendar_id='; foreach (OC_Contacts_Addressbook::all(OCP\USER::getUser()) as $addressbook) { $parameters['sources'][] = array('url' => $base_url . 'birthday_' . $addressbook['id'], 'backgroundColor' => '#cccccc', 'borderColor' => '#888', 'textColor' => 'black', 'cache' => true, 'editable' => false); } }
function search($query) { $stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*gallery_albums` WHERE `uid_owner` = ? AND `album_name` LIKE ?'); $result = $stmt->execute(array(OCP\USER::getUser(), '%' . $query . '%')); $results = array(); while ($row = $result->fetchRow()) { $results[] = new OC_Search_Result($row['album_name'], '', OCP\Util::linkTo('gallery', 'index.php') . '?view=' . $row['album_name'], (string) $l->t('Galleries')); } return $results; }
function search($query) { $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), true); if (count($calendars) == 0 || !OCP\App::isEnabled('calendar')) { //return false; } $results = array(); $searchquery = array(); if (substr_count($query, ' ') > 0) { $searchquery = explode(' ', $query); } else { $searchquery[] = $query; } $user_timezone = OC_Calendar_App::getTimezone(); $l = new OC_l10n('calendar'); foreach ($calendars as $calendar) { $objects = OC_Calendar_Object::all($calendar['id']); foreach ($objects as $object) { if ($object['objecttype'] != 'VEVENT') { continue; } if (substr_count(strtolower($object['summary']), strtolower($query)) > 0) { $calendardata = OC_VObject::parse($object['calendardata']); $vevent = $calendardata->VEVENT; $dtstart = $vevent->DTSTART; $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); $start_dt = $dtstart->getDateTime(); $start_dt->setTimezone(new DateTimeZone($user_timezone)); $end_dt = $dtend->getDateTime(); $end_dt->setTimezone(new DateTimeZone($user_timezone)); if ($dtstart->getDateType() == Sabre\VObject\Property\DateTime::DATE) { $end_dt->modify('-1 sec'); if ($start_dt->format('d.m.Y') != $end_dt->format('d.m.Y')) { $info = $l->t('Date') . ': ' . $start_dt->format('d.m.Y') . ' - ' . $end_dt->format('d.m.Y'); } else { $info = $l->t('Date') . ': ' . $start_dt->format('d.m.Y'); } } else { $info = $l->t('Date') . ': ' . $start_dt->format('d.m.y H:i') . ' - ' . $end_dt->format('d.m.y H:i'); } $link = OCP\Util::linkTo('calendar', 'index.php') . '?showevent=' . urlencode($object['id']); $results[] = new OC_Search_Result($object['summary'], $info, $link, (string) $l->t('Cal.')); //$name,$text,$link,$type } } } return $results; }
function display_sub_dirs($current_dir, $sub_dirs) { $results = explore($current_dir, $sub_dirs, 1); foreach ($results as $r) { echo '<tr id = "row" data-file="' . $r[0] . '" data-type="dir"> <td id = "thumbnail_container" width = "14%"><div id = "thumbs">'; $is_dir = check_dir_exists($current_dir, $r[0]); $margin = 10; $img_id = 1; foreach ($r[1] as $thumbs) { $thumb_exists = false; $thumb_exists = check_thumb_exists($current_dir . $r[0] . '/' . $thumbs); $img_path = \OCP\Util::linkTo('reader', 'ajax/thumbnail.php') . '&filepath=' . urlencode($current_dir . $r[0] . '/' . rtrim($thumbs, 'pdf') . 'png'); $counter = 3; for ($i = 1; $i <= $counter; $i++) { echo '<img id = "' . $current_dir . $r[0] . '/' . $thumbs . '" src = "' . $img_path . '" value = "' . $thumb_exists . '" style = "position:absolute;top:-55px;left:10px;margin-left:' . $margin . 'px; z-index:' . (50 - $margin) . ';"/>'; $margin = $margin + 5; $img_id = $img_id + 1; } } echo '</div></td>'; echo '<td class = "filename svg" width = "86%"> <a class = "dirs" id = "' . $r[0] . '" href = "' . OCP\Util::linkTo('reader', 'index.php') . '&dir=' . $current_dir . $r[0] . '/' . '"> <span class = "nametext">' . htmlspecialchars($r[0]) . '</span> </a> <div id = "more_info" style = "color:#666;margin-left:15px;margin-top:35px; vertical-align:bottom">'; echo "Browse in for"; echo '<br>'; $dir_browse_results = explore($current_dir, array($r[0]), 5); foreach ($dir_browse_results as $browse_result) { foreach ($browse_result[1] as $each) { $each_sub_dir = explode("/", $each); if (count($each_sub_dir) > 1) { foreach ($each_sub_dir as $element) { echo '<span style = "color:#DDD;">>></span>' . $element; } } else { echo '<span style = "color:#DDD;"> >></span>' . $each; } echo '<br>'; } } echo '</div> </td> </tr>'; } }
function search($query) { if (!OCP\App::isEnabled('news')) { return array(); } $feedMapper = new OCA\News\FeedMapper(OCP\USER::getUser()); $results = array(); if ($feedMapper->feedCount() > 0) { $allFeeds = $feedMapper->findAll(); $l = new OC_l10n('news'); foreach ($allFeeds as $feed) { if (substr_count(strtolower($feed['title']), strtolower($query)) > 0) { $link = OCP\Util::linkTo('news', 'index.php') . '?feedid=' . urlencode($feed['id']); $results[] = new OC_Search_Result($feed['title'], '', $link, (string) $l->t('News')); } } } return $results; }
function search($query) { $addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser(), 1); if (count($addressbooks) == 0 || !OCP\App::isEnabled('contacts')) { return array(); } $results = array(); $l = new OC_l10n('contacts'); foreach ($addressbooks as $addressbook) { $vcards = OC_Contacts_VCard::all($addressbook['id']); foreach ($vcards as $vcard) { if (substr_count(strtolower($vcard['fullname']), strtolower($query)) > 0) { $link = OCP\Util::linkTo('contacts', 'index.php') . '&id=' . urlencode($vcard['id']); $results[] = new OC_Search_Result($vcard['fullname'], '', $link, (string) $l->t('Contact')); //$name,$text,$link,$type } } } return $results; }
* * 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/>. * */ /* ### CONFIG ### ----------------------------------------------------- */ /* Allow that users can delete own posts, admin can delete all */ define('USER_CONVERSATIONS_CAN_DELETE', true); /* Allow messages to a single user */ define('UC_SINGLE_USER_MSG', true); /* FILE ATACHMENTS This is a beta feature with some known bugs. It could changed in a future release without backward compatibility! */ define('USER_CONVERSATIONS_ATTACHMENTS', true); /* end of configration ------------------------------ */ // register model-file OC::$CLASSPATH['OC_Conversations'] = 'conversations/lib/conversations.php'; // add update script to change the app-icon even when app is not active, TODO: find app-not-active function...! OCP\Util::addscript('conversations', 'updateCheck'); // register HOOK change user group OC_HOOK::connect('OC_User', 'post_addToGroup', 'OC_Conversations', 'changeUserGroup'); OC_HOOK::connect('OC_User', 'post_removeFromGroup', 'OC_Conversations', 'changeUserGroup'); $l = OC_L10N::get('conversations'); OCP\App::addNavigationEntry(array('id' => 'conversations', 'order' => 5, 'href' => OCP\Util::linkTo('conversations', 'index.php'), 'icon' => OCP\Util::imagePath('conversations', 'conversations.png'), 'name' => $l->t('Conversation')));
public static function getEventSourceInfo($calendar) { return array('url' => OCP\Util::linkTo('calendar', 'ajax/events.php') . '?calendar_id=' . $calendar['id'], 'backgroundColor' => $calendar['calendarcolor'], 'borderColor' => '#888', 'textColor' => 'black', 'cache' => true); }
<?php /** * ownCloud - Impressionist & Impress App * * @author Raghu Nayyar & Frank Karlitschek * @copyright 2012 me@iraghu.com 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/>. * */ OCP\Util::addStyle('impressionist', 'style'); // Basic layout of the page. OCP\App::addNavigationEntry(array('id' => 'impressionist_index', 'order' => 74, 'href' => OCP\Util::linkTo('impressionist', 'index.php'), 'icon' => OCP\Util::imagePath('impressionist', 'impress.png'), 'name' => 'Impressionist'));
p($l->t('Preferences')); ?> " /> <input type="button" id="ocsvgBtnPrint" value="<?php p($l->t('Print')); ?> " /> <div class="separator"></div> <input type="button" id="ocsvgBtnClose" value="<?php p($l->t('Close')); ?> " /> </div> <div id="svgEditor"> <iframe src="<?php print_unescaped(OCP\Util::linkTo('files_svgedit', 'svg-edit/svg-editor.html')); ?> " id="svgedit"></iframe> </div> <div id="svgEditorSave" title="<?php p($l->t('Save')); ?> "> <ul> <li><a href="#svgSave"> <img src="<?php print_unescaped(OC_Helper::mimetypeIcon("image/svg+xml")); ?> " class="mimetypeTab" /> <?php p($l->t('Save SVG'));
$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); } header('Location: ' . OCP\Util::linkTo('files', 'index.php') . $hash); exit; } $user = OC_User::getUser(); $config = \OC::$server->getConfig(); // mostly for the home storage's free space $dirInfo = \OC\Files\Filesystem::getFileInfo('/', false); $storageInfo = OC_Helper::getStorageInfo('/', $dirInfo); $nav = new OCP\Template('files', 'appnavigation', ''); function sortNavigationItems($item1, $item2) { return $item1['order'] - $item2['order']; } \OCA\Files\App::getNavigationManager()->add(array('id' => 'favorites', 'appname' => 'files', 'script' => 'simplelist.php', 'order' => 5, 'name' => $l->t('Favorites'))); $navItems = \OCA\Files\App::getNavigationManager()->getAll(); usort($navItems, 'sortNavigationItems');
')" data-type='folder'><p><?php echo $l->t('Folder'); ?> </p></li> <li style="background-image:url('<?php echo OCP\image_path('core', 'actions/public.png'); ?> ')" data-type='web'><p><?php echo $l->t('From url'); ?> </p></li> </ul> </div> <div class="file_upload_wrapper svg"> <form data-upload-id='1' id="data-upload-form" class="file_upload_form" action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?> " method="post" enctype="multipart/form-data" target="file_upload_target_1"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize']; ?> " id="max_upload"> <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?> )"> <input type="hidden" name="dir" value="<?php echo $_['dir']; ?> " id="dir"> <input class="file_upload_start" type="file" name='files[]'/>
break 2; } } // if $act='index'; break 2; } // switch key } // foreach key // next, execute the "act" whilst considering the 'arg' switch ($act) { case 'acquire': // add url as new shorty // keep the url specified as referer, that is the one we want to store $_SESSION['shorty-referrer'] = $arg; OCP\Util::writeLog( 'shorty', sprintf("Detected an incoming Shortlet request for url '%s...'",substr($arg,0,80)), OCP\Util::DEBUG ); header ( sprintf('Location: %s', OCP\Util::linkTo('shorty','index.php')) ); exit(); // ===== case 'index': // action 'index': list of shortys default: try { // is this a redirect from a call with a target url to be added ? if ( isset($_SESSION['shorty-referrer']) ) { // this takes care of handling the url on the client side OCP\Util::addScript ( 'shorty', 'add' ); // add url taked from the session vars to anything contained in the query string $_SERVER['QUERY_STRING'] = implode('&',array_merge(array('url'=>$_SESSION['shorty-referrer']),explode('&',$_SERVER['QUERY_STRING']))); }
<?php /** * ownCloud - user_migrate * * @author Tom Needham * @copyright 2012 Tom Needham tom@owncloud.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/>. * */ OCP\App::registerPersonal('user_migrate', 'settings'); OCP\Util::addscript('user_migrate', 'export'); OCP\Util::addstyle('user_migrate', 'style'); // add settings page to navigation $entry = array('id' => "user_migrate_settings", 'order' => 1, 'href' => OCP\Util::linkTo("user_migrate", "admin.php"), 'name' => 'Import');
</td> <td class="tel">{tel}</td> <td class="adr">{adr}</td> <td class="categories">{categories}</td> </tr> </script> <script id="contactDragItemTemplate" type="text/template"> <div class="dragContact thumbnail" data-id="{id}"> {name} </div> </script> <script id="contactFullTemplate" type="text/template"> <tr><td colspan="6"> <form action="<?php print_unescaped(OCP\Util::linkTo('contacts', 'index.php')); ?>" method="post" enctype="multipart/form-data"> <section id="contact" data-id="{id}"> <header> <a class="delete"> <?php p($l->t('Delete')); ?> <img class="svg" alt="<?php p($l->t('Delete'))?>" src="<?php print_unescaped(OCP\image_path("core", "actions/delete.svg")); ?>" /> </a> </header> <ul> <li> <div id="photowrapper" class="propertycontainer" data-element="photo"> <ul id="phototools" class="transparent hidden"> <li><a class="svg icon-delete action delete" title="<?php echo $l->t('Delete current photo'); ?>"></a></li> <li><a class="svg icon-rename action edit" title="<?php echo $l->t('Edit current photo'); ?>"></a></li> <li><a class="svg icon-upload action upload" title="<?php echo $l->t('Upload new photo'); ?>"></a></li> <li><a class="svg icon-folder action cloud icon-cloud" title="<?php echo $l->t('Select photo from Files'); ?>"></a></li>
<?php OCP\JSON::checkLoggedIn(); \OC::$session->close(); $l = OC_L10N::get('files'); // Load the files $dir = isset($_GET['dir']) ? $_GET['dir'] : ''; $dir = \OC\Files\Filesystem::normalizePath($dir); try { $dirInfo = \OC\Files\Filesystem::getFileInfo($dir); if (!$dirInfo || !$dirInfo->getType() === 'dir') { header("HTTP/1.0 404 Not Found"); exit; } $data = array(); $baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir='; $permissions = $dirInfo->getPermissions(); $sortAttribute = isset($_GET['sort']) ? $_GET['sort'] : 'name'; $sortDirection = isset($_GET['sortdirection']) ? $_GET['sortdirection'] === 'desc' : false; // make filelist $files = \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection); $data['directory'] = $dir; $data['files'] = \OCA\Files\Helper::formatFileInfos($files); $data['permissions'] = $permissions; OCP\JSON::success(array('data' => $data)); } catch (\OCP\Files\StorageNotAvailableException $e) { OCP\JSON::error(array('data' => array('exception' => '\\OCP\\Files\\StorageNotAvailableException', 'message' => $l->t('Storage not available')))); } catch (\OCP\Files\StorageInvalidException $e) { OCP\JSON::error(array('data' => array('exception' => '\\OCP\\Files\\StorageInvalidException', 'message' => $l->t('Storage invalid')))); } catch (\Exception $e) { OCP\JSON::error(array('data' => array('exception' => '\\Exception', 'message' => $l->t('Unknown error'))));
<span class="action"> <a href="#" id="chooseCalendar-showCalDAVURL" data-user="******" data-caldav="<?php p($caldav); ?> " title="<?php p($l->t('CalDav Link')); ?> " class="icon-public permanent"></a> </span> <span class="action"> <a href="<?php print_unescaped(OCP\Util::linkTo('calendar', 'export.php') . '?calid=' . $_['calendar']['id']); ?> " title="<?php p($l->t('Download')); ?> " class="icon-download"></a> </span> <span class="action"> <?php if ($_['calendar']['permissions'] & OCP\PERMISSION_UPDATE) { ?> <a href="#" id="chooseCalendar-edit" data-id="<?php p($_['calendar']['id']); ?>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> <script type="text/javascript"> PDFJS.workerSrc = 'apps/reader/js/pdf.js'; </script> <div id = "controls"> <?php $current_dir = empty($_['path']) ? '/' : $_['path']; $base_url = OCP\Util::linkTo('reader', 'index.php') . '?dir='; $curr_path = ''; $path = explode('/', trim($current_dir, '/')); // Navaigation Tab. if ($path != '') { for ($i = 0; $i < count($path); $i++) { $curr_path .= '/' . str_replace('+', '%20', urlencode($path[$i])); ?> <div class="crumb <?php if ($i == count($path) - 1) { p('last'); } ?> svg" data-dir='<?php p($curr_path); ?> ' style='background-image:url("<?php print_unescaped(OCP\image_path('core', 'breadcrumb.png')); ?> ")'> <a href="<?php print_unescaped($base_url . $curr_path . '/');
* 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/ * */ $l = OC_L10N::get('media'); OC::$CLASSPATH['OCA\\Media\\Media'] = 'media/lib/media.php'; OC::$CLASSPATH['OCA\\Media\\Ampache'] = 'media/lib/ampache.php'; OC::$CLASSPATH['OCA\\Media\\SearchProvider'] = 'media/lib/media.php'; OC::$CLASSPATH['OCA\\Media\\Collection'] = 'media/lib/collection.php'; OC::$CLASSPATH['OCA\\Media\\Scanner'] = 'media/lib/scanner.php'; OC::$CLASSPATH['OCA\\Media\\Extractor'] = 'media/lib/extractor.php'; OC::$CLASSPATH['OCA\\Media\\Extractor_GetID3'] = 'media/lib/extractor.php'; OC::$CLASSPATH['OCA\\Media\\Extractable'] = 'media/lib/track.php'; OC::$CLASSPATH['OCA\\Media\\Track'] = 'media/lib/track.php'; //we need to have the sha256 hash of passwords for ampache OCP\Util::connectHook('OC_User', 'post_login', 'OCA\\Media\\Media', 'loginListener'); OCP\Util::connectHook('OC_User', 'post_setPassword', 'OCA\\Media\\Media', 'passwordChangeListener'); //connect to the filesystem for auto updating OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\\Media\\Media', 'updateFile'); //listen for file deletions to clean the database if a song is deleted OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\\Media\\Media', 'deleteFile'); //list for file moves to update the database OCP\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\\Media\\Media', 'moveFile'); OCP\App::registerPersonal('media', 'settings'); OCP\App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OCP\Util::linkTo('media', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music'))); OC_Search::registerProvider('OCA\\Media\\SearchProvider');
?> " /> </a></span> </th> </tr> </thead> <tbody id="fileList"> </tbody> <tfoot> </tfoot> </table> <input type="hidden" name="dir" id="dir" value="" /> <div class="hiddenuploadfield"> <input type="file" id="file_upload_start" class="hiddenuploadfield" name="files[]" data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?> " /> </div> <div id="editor"></div><!-- FIXME Do not use this div in your app! It is deprecated and will be removed in the future! --> <div id="uploadsize-message" title="<?php p($l->t('Upload too large')); ?> "> <p> <?php p($l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.')); ?> </p> </div> <div id="scanning-message">
$files = \OCA\Files\Helper::getFiles($dir); } $freeSpace = \OC\Files\Filesystem::free_space($dir); $needUpgrade = false; } // Make breadcrumb $breadcrumb = \OCA\Files\Helper::makeBreadcrumb($dir); // make breadcrumb und filelist markup $list = new OCP\Template('files', 'part.list', ''); $list->assign('files', $files); $list->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir='); $list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/'))); $list->assign('isPublic', false); $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb); $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir='); $permissions = \OCA\Files\Helper::getDirPermissions($dir); if ($needUpgrade) { OCP\Util::addscript('files', 'upgrade'); $tmpl = new OCP\Template('files', 'upgrade', 'user'); $tmpl->printPage(); } else { // information about storage capacities $storageInfo = OC_Helper::getStorageInfo($dir); $maxUploadFilesize = OCP\Util::maxUploadFilesize($dir); $publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'); // if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code) $encryptionInitStatus = 2; if (OC_App::isEnabled('files_encryption')) { $session = new \OCA\Encryption\Session(new \OC\Files\View('/')); $encryptionInitStatus = $session->getInitialized();
<?php /** * ownCloud - facefinder * * @author Aaron Messner * @copyright 2012 Aaron Messner aaron.messner@stuudent.uibk.ac.at * * 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\Share::registerBackend('photo', new OC_Share_Backend_Photo()); //$l = OC_L10N::get('gallery'); OCP\App::addNavigationEntry(array('id' => 'facefinder', 'order' => 20, 'href' => OCP\Util::linkTo('facefinder', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/picture.svg'), 'name' => "FaceFinder"));
<?php /** * ownCloud - External plugin * * @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/>. * */ OC::$CLASSPATH['OC_External'] = 'apps/external/lib/external.php'; OCP\Util::addStyle('external', 'style'); OCP\App::registerAdmin('external', 'settings'); OCP\App::register(array('order' => 70, 'id' => 'external', 'name' => 'External')); $sites = OC_External::getSites(); for ($i = 0; $i < sizeof($sites); $i++) { OCP\App::addNavigationEntry(array('id' => 'external_index' . ($i + 1), 'order' => 80 + $i, 'href' => OCP\Util::linkTo('external', 'index.php') . '?id=' . ($i + 1), 'icon' => OCP\Util::imagePath('external', 'external.png'), 'name' => $sites[$i][0])); }
<?php require_once __DIR__ . '/bootstrap.php'; OCP\App::addNavigationEntry(array('id' => 'contacts_index', 'order' => 10, 'href' => OCP\Util::linkTo('contacts', 'index.php'), 'icon' => OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => OC_L10N::get('contacts')->t('Contacts'))); OCP\Util::addscript('contacts', 'loader'); OC_Search::registerProvider('OCA\\Contacts\\SearchProvider'); if (OCP\User::isLoggedIn()) { foreach (OCA\Contacts\Addressbook::all(OCP\USER::getUser()) as $addressbook) { OCP\Contacts::registerAddressBook(new OCA\Contacts\AddressbookProvider($addressbook['id'])); } }
<textarea id="event-description" placeholder="<?php p($l->t('Description')); ?> " name="description"><?php p(isset($_['description']) ? $_['description'] : ''); ?> </textarea> <?php if ($_['eventid'] != 'new') { ?> <input type="button" class="submit" id="editEvent-export" name="export" value="<?php p($l->t('Export event')); ?> " data-link="<?php print_unescaped(OCP\Util::linkTo('calendar', 'export.php')); ?> ?eventid=<?php p($_['eventid']); ?> "> <?php } ?> </div> </div> <div id="tabs-2"> <table style="width:100%"> <tr> <th width="75px"><?php
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]--> <!-- search form --> <div id="controls"> <form id="search-form" action="<?php print_unescaped(OCP\Util::linkTo('search', 'index.php')); ?> " method="get"> <input type="text" name="query" id="search_query" value="<?php p($_['breadcrumb']); ?> "> <button class="button search_button">Search</button> </form> </div> <div id="file_action_panel"></div> <div id='notification'></div> <?php if (empty($_['files'])) { ?> <div id="emptyfolder"><?php p($l->t('Nothing found.')); ?> </div> <?php } ?> <!-- results list --> <table class="resultsList">
<form class="addBm" method="post" action="<?php print_unescaped(OCP\Util::linkTo('bookmarks', 'ajax/editBookmark.php')); ?> "> <?php if (!isset($embedded) || !$embedded) { ?> <script type="text/javascript" src="<?php print_unescaped(OC_Helper::linkTo('bookmarks/js', 'full_tags.php')); ?> "></script> <h1><?php p($l->t('Add a bookmark')); ?> </h1> <div class="close_btn"> <a href="javascript:self.close()" class="ui-icon ui-icon-closethick"> <?php p($l->t('Close')); ?> </a> </div> <?php } ?> <fieldset class="bm_desc"> <ul> <li> <input type="text" name="title" class="title" value="<?php p($_['bookmark']['title']);
<?php OC::$CLASSPATH['OCA\\Mail\\App'] = 'apps/mail/lib/mail.php'; OC::$CLASSPATH['OCA\\Mail\\Account'] = 'apps/mail/lib/account.php'; OC::$CLASSPATH['OCA\\Mail\\Mailbox'] = 'apps/mail/lib/mailbox.php'; OC::$CLASSPATH['OCA\\Mail\\Message'] = 'apps/mail/lib/message.php'; OC::$CLASSPATH['OC_Translation_Handler'] = 'apps/mail/lib/OC_Translation_Handler.php'; OCP\App::addNavigationEntry(array('id' => 'mail_index', 'order' => 1, 'href' => OCP\Util::linkTo('mail', 'index.php'), 'icon' => OCP\Util::imagePath('mail', 'icon.png'), 'name' => 'Mail')); OCP\App::registerPersonal('mail', 'settings');
<form class="addBm" method="post" action="<?php echo OCP\Util::linkTo('bookmarks', 'ajax/editBookmark.php'); ?> "> <?php if (!isset($embedded) || !$embedded) { ?> <script type="text/javascript"> var fullTags = <?php echo $_['tags']; ?> ; $(document).ready(function() { $('body').bookmark_dialog({ 'on_success': function(){ self.close(); } }); }); </script> <h1><?php echo $l->t('Add a bookmark'); ?> </h1> <div class="close_btn"> <a href="javascript:self.close()" class="ui-icon ui-icon-closethick"> <?php echo $l->t('Close'); ?> </a> </div> <?php }