Ejemplo n.º 1
0
 /**
  *  Direct notification of an internal message (no queue delay)
  * @param $fromUid uid of the message author. 
  * @param $toUid destination uid. 
  * @param $msg message content. 
  * @return void 
  */
 public static function email_IntMsg($fromUid, $toUid, $msg)
 {
     $l = new OC_L10N('mailnotify');
     $intMsgUrl = OCP\Util::linkToAbsolute('index.php/apps/internal_messages');
     $text = "You have a new message from <b>{$fromUid}</b>.\n\t\t\t\t<p><br>{$msg}<br></p>\n\t\t\t\tPlease log in to <a href=\"{$intMsgUrl}\">%s</a> to reply.<br>";
     OC_MailNotify_Mailing::sendEmail($text, $l->t('New message from ' . $fromUid), $toUid);
 }
Ejemplo n.º 2
0
/**
 * Copyright (c) 2011 Marvin Thomas Rabe <*****@*****.**>
 * Copyright (c) 2011 Arthur Schiwon <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
function bookmarklet()
{
    $l = new OC_l10n('bookmarks');
    $blet = "javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('";
    $blet .= OCP\Util::linkToAbsolute('bookmarks', 'addBm.php');
    $blet .= "?output=popup&url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=400px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();";
    $help_msg = $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:');
    return '<div class="bkm_hint">' . $help_msg . '</div><br /><a class="button bookmarklet" href="' . $blet . '">' . $l->t('Add to ownCloud') . '</a>';
}
Ejemplo n.º 3
0
<a href="#" id="leftarrow" onclick="movePageLeft(event)"><img
        src="<?php 
echo OCP\Util::linkToAbsolute('impressionist', 'img/leftarrow.png');
?>
"
        style="width:48px; height:48px"></img></a>
<a href="#" id="rightarrow" onclick="movePageRight(event)"><img
        src="<?php 
echo OCP\Util::linkToAbsolute('impressionist', 'img/rightarrow.png');
?>
"
        style="width:48px; height:48px"></img></a>
    
    
     
        <span id="play">
            <span class="rotate label label-info" id="spanrotate">rotate</span>
            <span class="skewx label label-info" id="spanskewx">skewx</span>
            <span class="skewy label label-info" id="spanskewy">skewy</span>
      </span>

<div id="contextbar">
</div>
<div id="footerbar" class="navbar">

</div>
<script type="text/javascript" src="<?php 
echo OCP\Util::linkToAbsolute('impressionist', 'js/utilities.js');
?>
"></script>
        </body>
Ejemplo n.º 4
0
    header('WWW-Authenticate: Basic realm="ownCloud Login"');
    header('HTTP/1.0 401 Unauthorized');
    exit;
}
$lang = OC_Preferences::getValue($uid, 'core', 'lang', OC_L10N::findLanguage());
$l = OC_L10N::get('notify', $lang);
//TODO: use different feed creator library (like Zend_Feed) and switch html flag to true
$notifications = OC_Notify::getNotifications($uid, 50, $lang, false);
$baseAddress = (isset($_SERVER["HTTPS"]) ? 'https://' : 'http://') . $_SERVER["SERVER_NAME"];
$rssURI = $baseAddress . $baseuri . 'feed.rss';
$atomURI = $baseAddress . $baseuri . 'feed.atom';
$feed = new UniversalFeedCreator();
$feed->title = $l->t('ownCloud notifications');
$feed->description = $l->t('ownCloud notification stream of the user "%s".', array($uid));
$feed->link = $baseAddress . OC::$WEBROOT;
$feed->syndicationURL = $baseAddress . $_SERVER["PHP_SELF"];
$feed->image = new FeedImage();
$feed->image->title = 'ownCloud';
$feed->image->url = $baseAddress . OCP\Util::imagePath('core', 'logo-inverted.png');
$feed->image->link = $feed->link;
foreach ($notifications as $notification) {
    $item = new FeedItem();
    $item->title = strip_tags($notification["summary"]);
    $item->date = strtotime($notification["moment"]);
    $item->link = OCP\Util::linkToAbsolute("notify", "go.php", array("id" => $notification["id"]));
    $item->description = $notification["content"];
    //TODO image
    $item->author = "ownCloud (" . $notification["app"] . " app)";
    $feed->addItem($item);
}
$feed->outputFeed($type);
Ejemplo n.º 5
0
	/**
	* @method OC_Shorty_Tools::relayUrl
	* @brief Generates a relay url for a given id acting as a href target for all backends
	* @param string id: Shorty id as shorty identification
	* @return string: Generated absolute relay url
	* @access public
	* @author Christian Reiner
	*/
	static function relayUrl ($id)
	{
		return sprintf ( '%s?service=%s&id=%s', OCP\Util::linkToAbsolute("", "public.php"), 'shorty_relay', $id );
	} // function relayUrl
Ejemplo n.º 6
0
<?php

//check if curl extension installed
if (!in_array('curl', get_loaded_extensions())) {
    return;
}
$userName = '';
if (strpos($_SERVER["REQUEST_URI"], '?') and !strpos($_SERVER["REQUEST_URI"], '=')) {
    if (strpos($_SERVER["REQUEST_URI"], '/?')) {
        $userName = substr($_SERVER["REQUEST_URI"], strpos($_SERVER["REQUEST_URI"], '/?') + 2);
    } elseif (strpos($_SERVER["REQUEST_URI"], '.php?')) {
        $userName = substr($_SERVER["REQUEST_URI"], strpos($_SERVER["REQUEST_URI"], '.php?') + 5);
    }
}
OCP\Util::addHeader('link', array('rel' => 'openid.server', 'href' => OCP\Util::linkToAbsolute("user_openid", "user.php") . '/' . $userName));
OCP\Util::addHeader('link', array('rel' => 'openid.delegate', 'href' => OCP\Util::linkToAbsolute("user_openid", "user.php") . '/' . $userName));
OCP\App::registerPersonal('user_openid', 'settings');
require_once 'apps/user_openid/user_openid.php';
//active the openid backend
OC_User::useBackend('openid');
//check for results from openid requests
if (isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res') {
    OCP\Util::writeLog('user_openid', 'openid retured', OCP\Util::DEBUG);
    $openid = new SimpleOpenID();
    $openid->SetIdentity($_GET['openid_identity']);
    $openid_validation_result = $openid->ValidateWithServer();
    if ($openid_validation_result == true) {
        // OK HERE KEY IS VALID
        OCP\Util::writeLog('user_openid', 'auth sucessfull', OCP\Util::DEBUG);
        $identity = $openid->GetIdentity();
        OCP\Util::writeLog('user_openid', 'auth as ' . $identity, OCP\Util::DEBUG);
Ejemplo n.º 7
0
		{
			// multiple matches => 409: Conflict
			throw new OC_Shorty_HttpException ( 409 );
		}
		elseif ( (!array_key_exists(0,$result)) || (!is_array($result[0])) || (!array_key_exists('source',$result[0])) )
		{
			// invalid entry => 500: Internal Server Error
			throw new OC_Shorty_HttpException ( 500 );
		}
		elseif ( (!array_key_exists('source',$result[0])) || ('1'==$result[0]['expired']) )
		{
			// entry expired => 410: Gone
			throw new OC_Shorty_HttpException ( 410 );
		}
		// force download / storage of image
		header('Content-Type: image/png');
		if ( FALSE===strpos($_SERVER['HTTP_REFERER'],dirname(OCP\Util::linkToAbsolute('',''))) )
			header ( sprintf('Content-Disposition: inline; filename="qrcode-%s.png"',$result[0]['id']) );
		else
			header ( sprintf('Content-Disposition: attachment; filename="qrcode-%s.png"',$result[0]['id']) );
		// generate qrcode, regardless of who sends the request
		QRcode::png ( $result[0]['source'] );
	} // if $source
	else
	{
		// refuse forwarding => 403: Forbidden
		throw new OC_Shorty_HttpException ( 403 );
	}
} catch ( OC_Shorty_Exception $e ) { header($e->getMessage()); }
?>
Ejemplo n.º 8
0
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'])) {
                if (isset($_POST['forever'])) {
                    $server->denySite($server->getSiteRoot($_GET));
                }
                Zend_OpenId::redirect($_GET['openid_return_to'], array('openid.mode' => 'cancel'));
		<fieldset>
			<legend>
				<img class="shorty-status" src="<?php p(OCP\Util::imagePath('shorty','status/good.png')); ?>" alt="<?php OC_Shorty_L10n::t('Success') ?>" title="<?php OC_Shorty_L10n::t('Verification successful') ?>">
				<span id="title" class="shorty-title"><strong><?php p(OC_Shorty_L10n::t("Verification successful")); ?>!</strong></span>
			</legend>
			<p><?php	p(OC_Shorty_L10n::t("Great, your setup appears to be working fine!")); ?></p>
			<p><?php	p(OC_Shorty_L10n::t("Requests to the configured base url are mapped to this ownClouds relay service.").' ');
						p(OC_Shorty_L10n::t("Usage of that static backend is fine and safe as long as this setup is not altered.")); ?></p>
			<p><?php	p(OC_Shorty_L10n::t("This backend will now be offered as an additional backend alternative to all local users inside their personal preferences.")); ?></p>
		</fieldset>
	</div>
	<!-- failure -->
	<div id="failure">
		<fieldset>
			<legend>
				<img class="shorty-status" src="<?php p(OCP\Util::imagePath('shorty','status/bad.png')); ?>" alt="<?php OC_Shorty_L10n::t('Success') ?>" title="<?php OC_Shorty_L10n::t('Verification successful') ?>">
				<span id="title" class="shorty-title"><strong><?php p(OC_Shorty_L10n::t("Verification failed")); ?>!</strong></span>
			</legend>
			<p><?php	p(OC_Shorty_L10n::t("Sorry, but your setup appears not to be working correctly yet!")); ?></p>
			<p><?php	p(OC_Shorty_L10n::t("Please check your setup and make sure that the configured base url is indeed correct.").' ');
						p(OC_Shorty_L10n::t("Make sure that all requests to it are somehow mapped to Shortys relay service.")); ?></p>
			<p><?php	p(OC_Shorty_L10n::t("Relay service")); ?>:
			<br>
			<a><?php	p(OCP\Util::linkToAbsolute('','public.php?service=shorty_relay&id=')."<shorty-key>"); ?></a></p>
		</fieldset>
	</div>
</div>
	</body>
</html>
<!-- end of verification dialog -->
Ejemplo n.º 10
0
 * [storage] => home::qsecofr 
 * [path] => files/Immagini/HungryIla.png 
 * [parent] => 18 
 * [name] => HungryIla.png 
 * [mimetype] => image/png 
 * [mimepart] => image 
 * [size] => 3981786 
 * [mtime] => 1388521137 
 * [storage_mtime] => 1388521137 
 * [encrypted] => 1 
 * [unencrypted_size] => 3981786 
 * [etag] => 52c326b169ba4
 * [permissions] => 27 ) 
 */
$fileInfos = \OC\Files\Filesystem::getFileInfo($filePath);
$thumbPath = OCP\Util::linkToAbsolute('oclife', 'getThumbnail.php', array('filePath' => $filePath));
$preview = '<img style="border: 1px solid black; display: block;" src="' . $thumbPath . '" />';
$infos = array();
$infos[] = '<strong>' . $l->t('File name') . ': </strong>' . $fileInfos['name'];
$infos[] = '<strong>MIME: </strong>' . $fileInfos['mimetype'];
$infos[] = '<strong>' . $l->t('Size') . ': </strong>' . \OCA\OCLife\utilities::formatBytes($fileInfos['size'], 2, TRUE);
$infos[] = '<strong>' . $l->t('When added') . ': </strong>' . \OCP\Util::formatDate($fileInfos['storage_mtime']);
$infos[] = '<strong>' . $l->t('Encrypted? ') . '</strong>' . ($fileInfos['encrypted'] === TRUE ? $l->t('Yes') : $l->t('No'));
if ($fileInfos['encrypted']) {
    $infos[] = '<strong>' . $l->t('Unencrypted size') . ': </strong>' . \OCA\OCLife\utilities::formatBytes($fileInfos['unencrypted_size'], 2, TRUE);
}
// Output basic infos
$htmlInfos = implode('<br />', $infos);
// Check for EXIF data
// Get current user
$user = \OCP\User::getUser();
"></a></li>
	<li><a class="svg edit" title="<?php 
echo $l->t('Edit current photo');
?>
"></a></li>
	<li><a class="svg upload" title="<?php 
echo $l->t('Upload new photo');
?>
"></a></li>
	<li><a class="svg cloud" title="<?php 
echo $l->t('Select photo from ownCloud');
?>
"></a></li>
</ul>
<img class="loading" id="contacts_details_photo" <?php 
echo $wattr;
?>
 <?php 
echo $hattr;
?>
 src="<?php 
echo OCP\Util::linkToAbsolute('contacts', 'photo.php');
?>
?id=<?php 
echo $id . $rand;
?>
" />
<progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress>


Ejemplo n.º 12
0
</button>
			<button class="import icon text"><?php 
p($l->t('Import'));
?>
</button>
		</div>
	</div>
</div>
<script id="cropBoxTemplate" type="text/template">
	<form id="cropform"
		class="coords"
		method="post"
		enctype="multipart/form-data"
		target="crop_target"
		action="<?php 
print_unescaped(OCP\Util::linkToAbsolute('contacts', 'ajax/savecrop.php'));
?>
">
		<input type="hidden" id="id" name="id" value="{id}" />
		<input type="hidden" id="tmpkey" name="tmpkey" value="{tmpkey}" />
		<fieldset id="coords">
		<input type="hidden" id="x1" name="x1" value="" />
		<input type="hidden" id="y1" name="y1" value="" />
		<input type="hidden" id="x2" name="x2" value="" />
		<input type="hidden" id="y2" name="y2" value="" />
		<input type="hidden" id="w" name="w" value="" />
		<input type="hidden" id="h" name="h" value="" />
		</fieldset>
	</form>
</script>
Ejemplo n.º 13
0
* 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::checkAppEnabled('user_openid');
global $USERNAME, $IDENTITY;
$USERNAME = $_GET['user'];
if (substr($USERNAME, -1, 1) == '/') {
    //openid sometimes add slashes to the username
    $USERNAME = substr($USERNAME, 0, -1);
}
if ($USERNAME == '' and isset($_SERVER['PHP_AUTH_USER'])) {
    $USERNAME = $_SERVER['PHP_AUTH_USER'];
}
if (!OCP\User::userExists($USERNAME)) {
    OCP\Util::writeLog('user_openid', $USERNAME . ' doesn\'t exist', OCP\Util::WARN);
    $USERNAME = '';
}
$IDENTITY = OCP\Util::linkToAbsolute("", "?") . $USERNAME;
global $known, $g, $p, $charset, $port, $proto, $profile;
$profile = array('debug' => true);
$profile['idp_url'] = OCP\Util::linkToAbsolute("user_openid", "user.php") . '?user='******'openid_auth'])) {
    $_SESSION['openid_auth'] = false;
    $_SESSION['openid_user'] = false;
}
require_once 'openid/phpmyid.php';
Ejemplo n.º 14
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/>.
*
*/
$USERNAME = substr($_SERVER["REQUEST_URI"], strpos($_SERVER["REQUEST_URI"], '.php/') + 5);
if (strpos($USERNAME, '?') !== false) {
    $USERNAME = substr($USERNAME, 0, strpos($USERNAME, '?'));
}
if (substr($USERNAME, -1, 1) == '/') {
    //openid sometimes add slashes to the username
    $USERNAME = substr($USERNAME, 0, -1);
}
if ($USERNAME == '' and isset($_SERVER['PHP_AUTH_USER'])) {
    $USERNAME = $_SERVER['PHP_AUTH_USER'];
}
$RUNTIME_NOAPPS = true;
$RUNTIME_NOAPPS = false;
OCP\App::checkAppEnabled('user_openid');
if (!OCP\User::userExists($USERNAME)) {
    OCP\Util::writeLog('user_openid', $USERNAME . ' doesn\'t exist', OCP\Util::WARN);
    $USERNAME = '';
}
$IDENTITY = OCP\Util::linkToAbsolute("user_openid", "user.php") . '/' . $USERNAME;
require_once 'phpmyid.php';
Ejemplo n.º 15
0
</button>
			<button class="import"><?php 
echo $l->t('Import');
?>
</button>
		</div>
	</div>
</div>
<script id="cropBoxTemplate" type="text/template">
	<form id="cropform"
		class="coords"
		method="post"
		enctype="multipart/form-data"
		target="crop_target"
		action="<?php 
echo OCP\Util::linkToAbsolute('contacts', 'ajax/savecrop.php');
?>
">
		<input type="hidden" id="id" name="id" value="{id}" />
		<input type="hidden" id="tmpkey" name="tmpkey" value="{tmpkey}" />
		<fieldset id="coords">
		<input type="hidden" id="x1" name="x1" value="" />
		<input type="hidden" id="y1" name="y1" value="" />
		<input type="hidden" id="x2" name="x2" value="" />
		<input type="hidden" id="y2" name="y2" value="" />
		<input type="hidden" id="w" name="w" value="" />
		<input type="hidden" id="h" name="h" value="" />
		</fieldset>
	</form>
</script>
Ejemplo n.º 16
0
//check for results from openid requests
if (isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'id_res') {
    OCP\Util::writeLog('user_openid', 'openid returned', OCP\Util::DEBUG);
    $openid = new SimpleOpenID();
    $openid->SetIdentity($_GET['openid_identity']);
    $openid_validation_result = $openid->ValidateWithServer();
    if ($openid_validation_result == true) {
        // OK HERE KEY IS VALID
        OCP\Util::writeLog('user_openid', 'auth sucessfull', OCP\Util::DEBUG);
        $identity = $openid->GetIdentity();
        OCP\Util::writeLog('user_openid', 'auth as ' . $identity, OCP\Util::DEBUG);
        $user = OC_USER_OPENID::findUserForIdentity($identity);
        OCP\Util::writeLog('user_openid', 'user is ' . $user, OCP\Util::DEBUG);
        if ($user) {
            $_SESSION['user_id'] = $user;
            header("Location: " . OCP\Util::linkToAbsolute('', 'index.php'));
            exit;
        }
    } else {
        if ($openid->IsError() == true) {
            // ON THE WAY, WE GOT SOME ERROR
            $error = $openid->GetError();
            OCP\Util::writeLog('user_openid', 'ERROR CODE: ' . $error['code'], OCP\Util::ERROR);
            OCP\Util::writeLog('user_openid', 'ERROR DESCRIPTION: ' . $error['description'], OCP\Util::ERROR);
        } else {
            // Signature Verification Failed
            OCP\Util::writeLog('user_openid', 'INVALID AUTHORIZATION', OCP\Util::ERROR);
        }
    }
} else {
    if (isset($_GET['openid_mode']) and $_GET['openid_mode'] == 'cancel') {
*
*/
?>

<?php
/**
 * @file templates/tmpl_wdg_shortlet.php
 * Widget offering the 'Shortlet' as a drag'n'drop object
 * @access public
 * @author Christian Reiner
 */
?>

	<!-- shortlet -->
	<label for="shortlet" class="shorty-aspect"><?php p(OC_Shorty_L10n::t("Shortlet").":"); ?></label>
	<span id="shortlet">
		<a class="shortlet"
			href="javascript:(function(){url=encodeURIComponent(location.href);window.open('<?php p(OCP\Util::linkToAbsolute('shorty', 'index.php')); ?>?url='+url, 'owncloud-shorty')%20})()">
			<?php p(OC_Shorty_L10n::t("Add page as 'Shorty' to ownCloud")); ?>
		</a>
	</span>
	<p>
		<span class="shorty-explain">
			<em>
				<?php p(OC_Shorty_L10n::t("Drag this to your browser bookmarks.")); ?>
				<br>
				<?php p(OC_Shorty_L10n::t("Click it, for whatever site you want to create a Shorty.")); ?>
			</em>
		</span>
	</p>
Ejemplo n.º 18
0
			{
				// 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'])));
			}
			else
			{
				// simple desktop initialization, no special actions contained
				OCP\Util::addScript ( 'shorty', 'list' );
			}
			$tmpl = new OCP\Template( 'shorty', 'tmpl_index', 'user' );
			// any additional actions registered via hooks that should be offered ?
			$tmpl->assign ( 'shorty-actions', OC_Shorty_Hooks::requestActions() );
			// the (remote) base url of the qrcode generator
			$tmpl->assign ( 'qrcode-ref', sprintf('%s?service=%s&id=',  OCP\Util::linkToAbsolute('', 'public.php'), 'shorty_qrcode') );
			// available status options (required for select filter in toolbox)
			$shorty_status['']=sprintf('- %s -',OC_Shorty_L10n::t('all'));
			foreach ( OC_Shorty_Type::$STATUS as $status )
				$shorty_status[$status] = OC_Shorty_L10n::t($status);
			$tmpl->assign ( 'shorty-status', $shorty_status );
			$tmpl->assign ( 'default-status', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','default-status','private') );
			// any referrer we want to hand over to the browser ?
			if ( array_key_exists('shorty-referrer',$_SESSION) )
				$tmpl->assign ( 'shorty-referrer', $_SESSION['shorty-referrer'] );
			// is sending sms enabled in the personal preferences ?
			$tmpl->assign ( 'sms-control', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','sms-control','disabled') );
			// clean up session var so that a browser reload does not trigger the same action again
			\OC::$session->remove('shorty-referrer');
			$tmpl->printPage();
		} catch ( OC_Shorty_Exception $e ) { OCP\JSON::error ( array ( 'message'=>$e->getTranslation(), 'level'=>'error', 'data'=>$result ) ); }
Ejemplo n.º 19
0
"
						title="<?php 
        echo $l->t("Share");
        ?>
"></a>
					<?php 
    }
    ?>
				</td>
				<td class="action">
					<a class="svg action download" title="<?php 
    echo $l->t('Download');
    ?>
"
						href="<?php 
    echo OCP\Util::linkToAbsolute('contacts', 'export.php');
    ?>
?bookid=<?php 
    echo $addressbook['id'];
    ?>
"></a>
				</td>
				<td class="action">
					<?php 
    if ($addressbook['permissions'] & OCP\PERMISSION_UPDATE) {
        ?>
					<a class="svg action edit" title="<?php 
        echo $l->t("Edit");
        ?>
"></a>
					<?php 
Ejemplo n.º 20
0
<div id="app-settings">
		<div id="app-settings-header">
			<button class="settings-button" data-apps-slide-toggle="#app-settings-content">
				<?php 
p($l->t('Settings'));
?>
			</button>
		</div>
		<div id="app-settings-content">

<input id="totalurl" type="hidden" value="<?php 
print_unescaped(OCP\Util::linkToRemote('contactsplus'));
?>
" />
<input id="totalurlAbo" type="hidden" value="<?php 
print_unescaped(OCP\Util::linkToAbsolute('contactsplus', 'exportbday.php'));
?>
" />
		<dl>
		<dt><?php 
p($l->t('Primary address (for Contacts or similar)'));
?>
</dt>
		<dd><input type="text" style="width:95%;" readonly="readonly" value="<?php 
print_unescaped(OCP\Util::linkToRemote('contactsplus'));
?>
" /></dd>
		<dt><?php 
p($l->t('iOS/OS X'));
?>
</dt>
Ejemplo n.º 21
0
* 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/>.
*
*
* This uses the Zend OpenID implementation, find a tutorial about it at http://framework.zend.com/manual/en/zend.openid.html .
*
*/
OC::$CLASSPATH['OC_OpenIdProviderUserSession'] = 'user_openid_provider/lib/OpenIdProviderUserSession.php';
OC::$CLASSPATH['OC_OpenIdProviderStorage'] = 'user_openid_provider/lib/OpenIdProviderStorage.php';
$userName = '';
if (strpos($_SERVER["REQUEST_URI"], '?') and !strpos($_SERVER["REQUEST_URI"], '=')) {
    if (strpos($_SERVER["REQUEST_URI"], '/?') !== false) {
        $userName = substr($_SERVER["REQUEST_URI"], strpos($_SERVER["REQUEST_URI"], '/?') + 2);
    } elseif (strpos($_SERVER["REQUEST_URI"], '.php?') !== false) {
        $userName = substr($_SERVER["REQUEST_URI"], strpos($_SERVER["REQUEST_URI"], '.php?') + 5);
    }
}
$remote_token = 'openid_provider';
if (($pos = strpos($_SERVER["REQUEST_URI"], $remote_token)) !== false) {
    $pos += strlen($remote_token) + 1;
    $userName = substr($_SERVER['REQUEST_URI'], $pos);
}
//die('username: '******'') {
    OCP\Util::addHeader('link', array('rel' => 'openid.server', 'href' => OCP\Util::linkToRemote($remote_token) . $userName));
    OCP\Util::addHeader('link', array('rel' => 'openid.delegate', 'href' => OCP\Util::linkToAbsolute('', '?') . $userName));
}
OCP\App::registerPersonal('user_openid_provider', 'settings');
Ejemplo n.º 22
0
function createSubscribelet()
{
    $l = OC_L10N::get('news');
    echo '<small>' . $l->t('Drag this to your browser bookmarks and click on it whenever you want to subscribe to a webpage quickly:') . '</small>' . '<a class="button bookmarklet" href="javascript:(function() {var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('news', 'subscribe.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=150px,width=360px,resizable=1,alwaysRaised=1\');a.setTimeout(function() {d.focus()},300);})();">' . $l->t('Subscribe') . '</a>';
}
Ejemplo n.º 23
0
    print_unescaped(link_to('', 'index.php'));
    ?>
"
        	                	title="" id="owncloud">
					<div class="logo-wide svg"></div>
				</a>
	                	<div id="logo-claim" style="display:none;"><?php 
    p($theme->getLogoClaim());
    ?>
</div>
        	        	<div class="header-right">
					<?php 
    p($l->t('Already have an account?'));
    ?>
					<?php 
    $url = OCP\Util::linkToAbsolute('', 'index.php') . '?redirect_url=' . OCP\Util::linkToRoute('polls_goto', array('poll_id' => $poll_id));
    ?>
					<a href="<?php 
    echo $url;
    ?>
"><?php 
    p($l->t('Login'));
    ?>
</a>
				</div>
			</div>
		</header>
</p>
		<p>&nbsp;</p><p>&nbsp;</p> <?php 
    // for some reason the header covers the title otherwise
    ?>