当前位置: 首页>>代码示例>>PHP>>正文


PHP Utility::getTenantProperty方法代码示例

本文整理汇总了PHP中Utility::getTenantProperty方法的典型用法代码示例。如果您正苦于以下问题:PHP Utility::getTenantProperty方法的具体用法?PHP Utility::getTenantProperty怎么用?PHP Utility::getTenantProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utility的用法示例。


在下文中一共展示了Utility::getTenantProperty方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: urlencode

    if (strlen($feature["subhead"]) > 0) {
        echo '<h2>' . $feature["subhead"] . '</h2>';
    }
    if (strlen($feature["authorName"]) > 0) {
        echo '<p class="author">By <a href="author.php?id=' . $feature["author"] . '">' . $feature["authorName"] . "</a></p>";
    }
    if (strlen($feature["datePosted"]) > 0) {
        echo '<p class="postdate">Posted ' . Format::formatDateLine($feature["datePosted"], true) . "</p>";
    }
    ?>
                    </div>
    			    <div id="featureSocialBar">
    			        <?php 
    $text = urlencode($feature["headline"]);
    $url = urlencode(Config::getSiteRoot() . '/feature.php?id=' . $id);
    $twitterHandle = Utility::getTenantProperty($applicationID, $tenantID, $userID, 'twitterHandle');
    ?>
    			        <ul class="socialList">
     			             <li><a class="social icon icon-twitter" href="http://twitter.com/intent/tweet?text=<?php 
    echo $text;
    ?>
&amp;url=<?php 
    echo $url . '&ch=t';
    ?>
&amp;via=<?php 
    echo $twitterHandle;
    ?>
" target="_blank" rel="nofollow" title="Share on Twitter" aria-label="Share on Twitter"></a></li>
    			             <li><div class="fb-like" data-layout="button" data-action="like" data-size="large" data-show-faces="true" data-share="true"></div></li>
    			        </ul>
    			   </div>
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:feature.php

示例2:

		<link rel="stylesheet" type="text/css" href="static/css/map.css" />
		<script src="js/main.js"></script>
		<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB9Zbt86U4kbMR534s7_gtQbx-0tMdL0QA&libraries=places"></script> 
    </head>
    <body>
        <div id="topPart">
		    <?php 
include "partials/header.php";
?>
			<!-- Modals -->
			<?php 
$showNumLocations = true;
include "partials/configModal.php";
include "partials/locationModal.php";
include "partials/locationEditModal.php";
$defaultIcon = Utility::getTenantProperty($applicationID, $tenantID, $userID, 'defaultIcon');
if (strlen($defaultIcon) > 0) {
    echo '<input type="hidden" id="defaultIcon" value="' . $defaultIcon . ' " />';
}
?>
        </div>
        <div class="mapPane">
            <div id="expandMap" class="mapEnlarge hidden" ><button class="btn btn-default btn-sm"  onclick="expandMap();"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span></button></div>
            <div id="shrinkMap" class="mapEnlarge" ><button class="btn btn-default btn-sm"  onclick="shrinkMap();"><span class="glyphicon glyphicon-resize-small" aria-hidden="true"></span></button></div>
            <div id="mapwrapper" class="mapWrapper">
        		<div id="mapcanvas"></div>
        		<?php 
//include "partials/mapOptions.php";
?>
        		<div id="loading" class="modal"><!-- Place inside div to cover --></div>
    		</div>
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:finder.php

示例3: User

Context::$tenantid = $tenantID;
if (!isset($_SESSION['userID'])) {
    // set ID to 0 to indicate unauthenticated user
    $_SESSION['userID'] = 0;
    $userID = 0;
} else {
    $userID = $_SESSION['userID'];
}
Log::debug('instantiating new user for userID=' . $userID, 1);
$user = new User($userID, $tenantID);
Context::$currentUser = $user;
if ($newsession) {
    Log::startSession(session_id(), $tenantID, $userID);
}
if ($userID > 0 && !$user->canAccessTenant($tenantID)) {
    Log::debug('Unauthorized user attempted to access tenant page. (user=' . $userID . ', tenant=' . $tenantID . ')', 9);
    header('HTTP/1.0 403 Forbidden');
    echo '<p>You are not allowed to access this resource.</p>';
    exit;
} elseif ($userID == 0) {
    // TO DO: check whether tenant allows anonymous access
    // for now, assume that they all do
    $allowAnon = Utility::getTenantProperty($applicationID, $tenantID, $userID, 'allowAnonAccess');
    if (!$allowAnon && strtolower(basename($_SERVER['PHP_SELF'])) != 'login.php') {
        //echo strtolower(basename($_SERVER['PHP_SELF']));
        Log::debug('Unauthenticated user attempted to access tenant page. Redirecting to login. (tenant=' . $tenantID . ')', 9);
        header('Location: Login.php?context=loginRequired');
        die;
    }
}
Utility::debug('pageCheck complete.  (user=' . $userID . ', tenant=' . $tenantID . ')', 1);
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:pageCheck.php

示例4: ucfirst

			<a class="navbar-brand" href="<?php 
echo Config::getSiteRoot();
?>
/index.php"><?php 
$icon = Utility::getTenantProperty($applicationID, $tenantID, $userID, 'smallLogo');
$title = ucfirst(Utility::getTenantProperty($applicationID, $tenantID, $userID, 'title'));
if (strlen($icon) > 0) {
    echo '<img src="' . Config::getSiteRoot() . $icon . '" alt=""' . $title . '" />';
} else {
    echo $title;
}
?>
</a>
		</div>
		<?php 
$finditem = Utility::getTenantProperty($applicationID, $tenantID, $userID, 'finditem');
?>
		<div class="collapse navbar-collapse" id="navbar1">
			<ul class="nav navbar-nav">
			    <?php 
$menu = Utility::getTenantMenu($applicationID, $userID, $tenantID);
if (is_array($menu)) {
    foreach ($menu as $item) {
        $roles = $item["roles"];
        $visible = false;
        if ($roles == '' || $user->hasRole('admin', $tenantID)) {
            $visible = true;
        } else {
            $roleSet = explode(',', $roles);
            foreach ($roleSet as $role) {
                if ($user->hasRole($role, $tenantID)) {
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:header.php

示例5: changePassword

 public function changePassword($data)
 {
     $userid = $data->{'id'};
     $username = $data->{'username'};
     if (!property_exists($data, "original")) {
         // if no password was submitted, the assumption must be that it is a reset request.
         $data->{'original'} = 'reset';
     }
     $expirationDays = Utility::getTenantProperty(1, $this->tenantid, $this->id, 'passwordExpires');
     $expirationDate = null;
     if ($expirationDays) {
         $interval = 'P' . $expirationDays . 'D';
         $expirationDate = new DateTime("now");
         $expirationDate = $expirationDate->add(new DateInterval($interval));
     }
     // check change password rules
     if ($data->{'original'} == $data->{'new1'}) {
         throw new Exception('The new password cannot be the same as your current one.');
     } elseif ($data->{'new2'} != $data->{'new1'}) {
         throw new Exception('The two versions of the new password do not match');
     } elseif (strlen($data->{'new1'}) < 8) {
         throw new Exception('The new password must be at least 8 characters long.');
     }
     // validate original password
     if (!$this->validatePassword($data->{'original'}, $username, $userid)) {
         throw new Exception('Original password is incorrect');
     }
     return $this->updatepassword($data->{'new1'}, $expirationDate);
 }
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:29,代码来源:user.php

示例6: dirname

<?php

include dirname(__FILE__) . '/core/partials/pageCheck.php';
$thisPage = "states";
// get list of states to enable for tenant - set as Tenant Property using admin page
$stateList = Utility::getTenantProperty($applicationID, $tenantID, $userID, 'enabledStates');
if (is_null($stateList)) {
    $stateList = "";
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>Food Finder</title>
        <?php 
include "partials/includes.php";
?>
        <script src="js/raphael.js" type="text/javascript" ></script>
        <script src="js/jquery.usmap.js" type="text/javascript"></script>
        <script src="js/states.js" type="text/javascript" ></script>
        <script src="js/content.js" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="static/css/statemap.css" >
            <div id="outer">
                <?php 
include 'partials/header.php';
?>
                <?php 
include 'core/partials/contentControls.php';
?>
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:states.php

示例7: Media

$thisPage = "mediaManager";
$return = 20;
$offset = Utility::getRequestVariable('offset', 0);
$filters = "";
// should we get from param?
$class = new Media($userID, $tenantID);
$count = $class->getEntityCount($filters);
$media = $class->getEntities($filters, $return, $offset);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title><?php 
echo Utility::getTenantProperty($applicationID, $_SESSION['tenantID'], $userID, 'title');
?>
</title>
        <?php 
include "partials/includes.php";
?>
        <link rel="stylesheet" type="text/css" href="static/css/mediaManager.css" />
        <script type="text/javascript" src="js/jquery.form.min.js"></script>
        <script type="text/javascript" src="js/bootpag.min.js"></script>
        <script src="js/mediaManager.js" type="text/javascript"></script>
        <script src="js/workingPanel.js" type="text/javascript"></script>          
    </head>
    <body>
        <div id="maincontent">
            <div id="outer">
                <?php 
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:mediaManager.php

示例8:

?>
" />
        <link rel="stylesheet" type="text/css" href="<?php 
echo Config::getSiteRoot();
?>
/core/css/styles.css" />
        <link rel="stylesheet" type="text/css" href="<?php 
echo Config::getSiteRoot();
?>
/core/css/bootstrap.css" />	
        <link rel="stylesheet" type="text/css" href="<?php 
echo Config::getSiteRoot();
?>
/static/css/foodfinder.css" />
        <link rel="stylesheet" type="text/css" href="<?php 
echo Config::getSiteRoot() . '/' . Utility::getTenantProperty($applicationID, $tenantID, $userID, 'css');
?>
" />	
    
		<script src="<?php 
echo Config::getSiteRoot();
?>
/js/jquery-1.10.2.js"></script>
		<script src="<?php 
echo Config::getSiteRoot();
?>
/js/mustache.js"></script>
		<script src="<?php 
echo Config::getSiteRoot();
?>
/js/bootstrap.min.js"></script>
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:includes.php

示例9: Sheet

	    					</div>
	    					<div class="panel">
	    					    <form id="tenantSwitcherForm" action="admin.php?flushCache=yes" method="post" role="form" >
    	    					    <input class="btn btn-default" type="submit" value="Clear Cache" />
    	    					    <h3>Tenant Settings</h3>
                                    <div class="row">
                                        <div class="col-md-3">Current Tenant Style Sheet (css)</div>
                                        <div class="col-md-3"><?php 
echo Utility::getTenantProperty($applicationID, $tenantID, $userID, 'css');
?>
</div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-3">Show Ads (showAds)</div>
                                        <div class="col-md-3"><?php 
echo Utility::getTenantProperty($applicationID, $tenantID, $userID, 'showAds');
?>
</div>
                                    </div>
    	    					</form>
	    					</div>
	    				</div>
			        	<div id="useradmin"  role="tabpanel" class="tab-pane">
				        	<h1>Manage Users</h1>
				        	<div id="user-buttons" class="btn-group btn-default">
    							<button class="btn btn-default" id="adduser" onclick="addUser();">
        							<span class="glyphicon glyphicon-plus"></span> Add User
    							</button>
							</div>
							<div id="alertZone"></div>
				        	<div id="userList">
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:31,代码来源:admin.php

示例10: getTenantPropertyEx

 public static function getTenantPropertyEx($applicationID, $tenantID, $userID, $property, $defaultValue)
 {
     $value = Utility::getTenantProperty($applicationID, $tenantID, $userID, $property);
     if (is_null($value)) {
         $value = $defaultValue;
     }
     return $value;
 }
开发者ID:robertmoss,项目名称:foodfinder_main,代码行数:8,代码来源:utility.php


注:本文中的Utility::getTenantProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。