本文整理汇总了PHP中SignOutUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP SignOutUrl函数的具体用法?PHP SignOutUrl怎么用?PHP SignOutUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SignOutUrl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Wrap
$CSpam = '';
//$SpamCount > 0 ? ' '.Wrap($SpamCount, 'span class="Alert"') : '';
$CModeration = $ModerationCount > 0 ? ' ' . Wrap($ModerationCount, 'span class="Alert"') : '';
echo Wrap(Anchor(Sprite('SpApplicants') . ' ' . T('Applicants') . $CApplicant, '/dashboard/user/applicants'), 'li');
if ($Session->CheckPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), FALSE)) {
echo Wrap(Anchor(Sprite('SpSpam') . ' ' . T('Spam Queue') . $CSpam, '/dashboard/log/spam'), 'li');
}
if ($Session->CheckPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), FALSE)) {
echo Wrap(Anchor(Sprite('SpMod') . ' ' . T('Moderation Queue') . $CModeration, '/dashboard/log/moderation'), 'li');
}
if ($Session->CheckPermission(array('Garden.Settings.View', 'Garden.Settings.Manage'), FALSE)) {
echo Wrap(Anchor(Sprite('SpDashboard') . ' ' . T('Dashboard'), '/dashboard/settings'), 'li');
}
}
$this->FireEvent('FlyoutMenu');
echo Wrap('<hr />' . Anchor(Sprite('SpSignOut') . ' ' . T('Sign Out'), SignOutUrl()), 'li', array('class' => 'SignInOutWrap SignOutWrap'));
echo '</ul>';
echo '</div>';
echo '</span>';
// Sign Out
// echo Anchor(Sprite('SpSignOut', 'Sprite16').Wrap(T('Sign Out'), 'em'), SignOutUrl(), 'MeButton', array('title' => T('Sign Out')));
echo '</div>';
echo '</div>';
echo '</div>';
} else {
echo '<div class="MeBox MeBox-SignIn' . $CssClass . '">';
echo '<div class="SignInLinks">';
echo Anchor(T('Sign In'), SignInUrl($this->_Sender->SelfUrl), SignInPopup() ? ' SignInPopup' : '', array('rel' => 'nofollow'));
$Url = RegisterUrl($this->_Sender->SelfUrl);
if (!empty($Url)) {
echo Bullet(' ') . Anchor(T('Register'), $Url, 'ApplyButton', array('rel' => 'nofollow')) . ' ';
示例2: Wrap
$CModeration = $ModerationCount > 0 ? ' ' . Wrap($ModerationCount, 'span class="Alert"') : '';
if ($Session->checkPermission('Garden.Users.Approve')) {
echo wrap(Anchor(sprite('SpApplicants') . ' ' . t('Applicants') . $CApplicant, '/dashboard/user/applicants'), 'li', array('class' => 'link-applicants'));
}
if ($Session->checkPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), false)) {
echo wrap(Anchor(sprite('SpSpam') . ' ' . t('Spam Queue') . $CSpam, '/dashboard/log/spam'), 'li', array('class' => 'link-spam'));
}
if ($Session->checkPermission(array('Garden.Settings.Manage', 'Garden.Moderation.Manage', 'Moderation.ModerationQueue.Manage'), false)) {
echo wrap(Anchor(sprite('SpMod') . ' ' . t('Moderation Queue') . $CModeration, '/dashboard/log/moderation'), 'li', array('class' => 'link-moderation'));
}
if ($Session->checkPermission(array('Garden.Settings.View', 'Garden.Settings.Manage'), false)) {
echo wrap(Anchor(sprite('SpDashboard') . ' ' . t('Dashboard'), '/dashboard/settings'), 'li', array('class' => 'link-dashboard'));
}
}
$this->fireEvent('FlyoutMenu');
echo wrap('<hr />' . anchor(sprite('SpSignOut') . ' ' . t('Sign Out'), SignOutUrl()), 'li', array('class' => 'SignInOutWrap SignOutWrap link-signout'));
echo '</ul>';
echo '</div>';
echo '</span>';
// Sign Out
// echo anchor(sprite('SpSignOut', 'Sprite16').Wrap(t('Sign Out'), 'em'), SignOutUrl(), 'MeButton', array('title' => t('Sign Out')));
echo '</div>';
echo '</div>';
echo '</div>';
} else {
echo '<div class="MeBox MeBox-SignIn' . $CssClass . '">';
echo '<div class="SignInLinks">';
echo anchor(t('Sign In'), SignInUrl($this->_Sender->SelfUrl), SignInPopup() ? ' SignInPopup' : '', array('rel' => 'nofollow'));
$Url = RegisterUrl($this->_Sender->SelfUrl);
if (!empty($Url)) {
echo Bullet(' ') . anchor(t('Register'), $Url, 'ApplyButton', array('rel' => 'nofollow')) . ' ';
示例3: Wrap
// echo Wrap(Wrap(T('My Account'), 'strong'), 'li');
// echo Wrap('<hr />', 'li');
echo Wrap(Anchor(T('Edit Profile'), 'profile/edit'), 'li');
if ($Session->CheckPermission('Garden.Settings.Manage') || $Session->CheckPermission('Garden.Moderation.Manage')) {
echo Wrap('<hr />', 'li');
$CApplicant = $ApplicantCount > 0 ? ' ' . Wrap($ApplicantCount, 'span class="Alert"') : '';
$CSpam = $SpamCount > 0 ? ' ' . Wrap($SpamCount, 'span class="Alert"') : '';
$CModeration = $ModerationCount > 0 ? ' ' . Wrap($ModerationCount, 'span class="Alert"') : '';
echo Wrap(Anchor(T('Applicants') . $CApplicant, '/dashboard/user/applicants'), 'li');
echo Wrap(Anchor(T('Spam Queue') . $CSpam, '/dashboard/log/spam'), 'li');
echo Wrap(Anchor(T('Moderation Queue') . $CModeration, '/dashboard/log/moderation'), 'li');
echo Wrap(Anchor(T('Dashboard'), '/dashboard/settings'), 'li');
}
$this->FireEvent('FlyoutMenu');
echo Wrap('<hr />', 'li');
echo Wrap(Anchor(T('Sign Out'), SignOutUrl()), 'li');
echo '</div>';
echo '</span>';
// Sign Out
// echo Anchor(Sprite('SpSignOut', 'Sprite16').Wrap(T('Sign Out'), 'em'), SignOutUrl(), 'MeButton', array('title' => T('Sign Out')));
echo '</div>';
echo '</div>';
echo '</div>';
} else {
echo '<div class="MeBox MeBox-SignIn' . $CssClass . '">';
echo '<div class="SignInLinks">';
echo Anchor(T('Sign In'), SignInUrl($this->_Sender->SelfUrl), SignInPopup() ? ' SignInPopup' : '', array('rel' => 'nofollow'));
$Url = RegisterUrl($this->_Sender->SelfUrl);
if (!empty($Url)) {
echo ' <span class="Bullet">•</span> ' . Anchor(T('Register'), $Url, 'ApplyButton', array('rel' => 'nofollow')) . ' ';
}
示例4: siteNavModule_init_handler
/**
*
*
* @param SiteNavModule $sender
*/
public function siteNavModule_init_handler($sender)
{
// GLOBALS
// Add a link to the community home.
$sender->addLinkToGlobals(t('Community Home'), '/', 'main.home', '', -100, array('icon' => 'home'), false);
$sender->addGroupToGlobals('', 'etc', '', 100);
$sender->addLinkToGlobalsIf(Gdn::session()->isValid() && IsMobile(), t('Full Site'), '/profile/nomobile', 'etc.nomobile', '', 100, array('icon' => 'resize-full'));
$sender->addLinkToGlobalsIf(Gdn::session()->isValid(), t('Sign Out'), SignOutUrl(), 'etc.signout', '', 100, array('icon' => 'signout'));
$sender->addLinkToGlobalsIf(!Gdn::session()->isValid(), t('Sign In'), SigninUrl(), 'etc.signin', '', 100, array('icon' => 'signin'));
// DEFAULTS
if (!Gdn::session()->isValid()) {
return;
}
$sender->addLinkIf(Gdn::session()->isValid(), t('Profile'), '/profile', 'main.profile', 'profile', 10, array('icon' => 'user'))->addLinkIf('Garden.Activity.View', t('Activity'), '/activity', 'main.activity', 'activity', 10, array('icon' => 'time'));
// Add the moderation items.
$sender->addGroup(t('Moderation'), 'moderation', 'moderation', 90);
if (Gdn::session()->checkPermission('Garden.Users.Approve')) {
$RoleModel = new RoleModel();
$applicant_count = (int) $RoleModel->getApplicantCount();
if ($applicant_count > 0 || true) {
$sender->addLink(t('Applicants'), '/user/applicants', 'moderation.applicants', 'applicants', array(), array('icon' => 'user', 'badge' => $applicant_count));
}
}
$sender->addLinkIf('Garden.Moderation.Manage', t('Spam Queue'), '/log/spam', 'moderation.spam', 'spam', array(), array('icon' => 'spam'))->addLinkIf('Garden.Settings.Manage', t('Dashboard'), '/settings', 'etc.dashboard', 'dashboard', array(), array('icon' => 'dashboard'));
$user = Gdn::controller()->data('Profile');
$user_id = val('UserID', $user);
//EDIT PROFILE SECTION
// Users can edit their own profiles and moderators can edit any profile.
$sender->addLinkToSectionIf(hasEditProfile($user_id), 'EditProfile', t('Profile'), userUrl($user, '', 'edit'), 'main.editprofile', '', array(), array('icon' => 'edit'))->addLinkToSectionIf('Garden.Users.Edit', 'EditProfile', t('Edit Account'), '/user/edit/' . $user_id, 'main.editaccount', 'Popup', array(), array('icon' => 'cog'))->addLinkToSection('EditProfile', t('Back to Profile'), userUrl($user), 'main.profile', '', 100, array('icon' => 'arrow-left'));
//PROFILE SECTION
$sender->addLinkToSectionIf(c('Garden.Profile.ShowActivities', true), 'Profile', t('Activity'), userUrl($user, '', 'activity'), 'main.activity', '', array(), array('icon' => 'time'))->addLinkToSectionIf(Gdn::controller()->data('Profile.UserID') == Gdn::session()->UserID, 'Profile', t('Notifications'), userUrl($user, '', 'notifications'), 'main.notifications', '', array(), array('icon' => 'globe', 'badge' => Gdn::controller()->data('Profile.CountNotifications')))->addLinkToSectionIf(strcasecmp(c('Garden.Registration.Method'), 'invitation') === 0, 'Profile', t('Invitations'), userUrl($user, '', 'invitations'), 'main.invitations', '', array(), array('icon' => 'ticket'))->addLinkToSectionIf(hasEditProfile($user_id), 'Profile', t('Edit Profile'), userUrl($user, '', 'edit'), 'Profile', 'main.editprofile', '', array(), array('icon' => 'edit'));
}
示例5: jQuery
<?php
if ($Session->isValid()) {
?>
<p id="SignoutWrap">
<script>
jQuery(document).ready(function($) {
var url = $('#SignoutLink').attr('href');
if (url) {
$('#SignoutWrap').hide();
$('#LeavingWrap').show();
window.location.replace(url);
}
});
</script>
<?php
printf(t('AttemptingSignOut', 'You are attempting to sign out. Are you sure you want to %s?'), anchor(t('sign out'), SignOutUrl($this->data('Target')) . '&override=' . $this->data('Override', '0'), '', array('id' => 'SignoutLink')));
?>
</p>
<?php
} else {
?>
<p><?php
echo t('SignedOut', 'You are signed out.');
?>
</p>
<?php
}
?>
<?php
}
示例6: Link
//.........这里部分代码省略.........
case 'profile':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text && $Session->IsValid()) {
$Text = $Session->User->Name;
}
if ($Session->IsValid() && $Session->User->CountNotifications) {
$Class = trim($Class . ' HasCount');
$Text .= ' <span class="Alert">' . $Session->User->CountNotifications . '</span>';
}
break;
case 'user':
$Path = 'profile';
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text && $Session->IsValid()) {
$Text = $Session->User->Name;
}
break;
case 'photo':
$Path = 'profile';
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text && $Session->IsValid()) {
$IsFullPath = strtolower(substr($Session->User->Photo, 0, 7)) == 'http://' || strtolower(substr($Session->User->Photo, 0, 8)) == 'https://';
$PhotoUrl = $IsFullPath ? $Session->User->Photo : Gdn_Upload::Url(ChangeBasename($Session->User->Photo, 'n%s'));
$Text = Img($PhotoUrl, array('alt' => htmlspecialchars($Session->User->Name)));
}
break;
case 'drafts':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text) {
$Text = T('My Drafts');
}
if ($Session->IsValid() && $Session->User->CountDrafts) {
$Class = trim($Class . ' HasCount');
$Text .= ' <span class="Alert">' . $Session->User->CountDrafts . '</span>';
}
break;
case 'discussions/bookmarked':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text) {
$Text = T('My Bookmarks');
}
if ($Session->IsValid() && $Session->User->CountBookmarks) {
$Class = trim($Class . ' HasCount');
$Text .= ' <span class="Count">' . $Session->User->CountBookmarks . '</span>';
}
break;
case 'discussions/mine':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text) {
$Text = T('My Discussions');
}
if ($Session->IsValid() && $Session->User->CountDiscussions) {
$Class = trim($Class . ' HasCount');
$Text .= ' <span class="Count">' . $Session->User->CountDiscussions . '</span>';
}
break;
case 'signin':
case 'signinout':
// The destination is the signin/signout toggle link.
if ($Session->IsValid()) {
if (!$Text) {
$Text = T('Sign Out');
}
$Path = SignOutUrl($Target);
$Class = ConcatSep(' ', $Class, 'SignOut');
} else {
if (!$Text) {
$Text = T('Sign In');
}
$Attribs = array();
$Path = SignInUrl($Target);
if (SignInPopup() && strpos(Gdn::Request()->Url(), 'entry') === FALSE) {
$Class = ConcatSep(' ', $Class, 'SignInPopup');
}
}
break;
}
if ($Text == FALSE && strpos($Format, '%text') !== FALSE) {
return '';
}
if (GetValue('Permissions', $Options) && !$Session->CheckPermission($Options['Permissions'], FALSE)) {
return '';
}
$Url = Gdn::Request()->Url($Path, $WithDomain);
if ($TK = GetValue('TK', $Options)) {
if (in_array($TK, array(1, 'true'))) {
$TK = 'TransientKey';
}
$Url .= (strpos($Url, '?') === FALSE ? '?' : '&') . $TK . '=' . urlencode(Gdn::Session()->TransientKey());
}
if (strcasecmp(trim($Path, '/'), Gdn::Request()->Path()) == 0) {
$Class = ConcatSep(' ', $Class, 'Selected');
}
// Build the final result.
$Result = $Format;
$Result = str_replace('%url', $Url, $Result);
$Result = str_replace('%text', $Text, $Result);
$Result = str_replace('%class', $Class, $Result);
return $Result;
}
示例7: SiteNavModule_all_handler
public function SiteNavModule_all_handler($sender)
{
// Add a link to the community home.
$sender->addLink('main.home', array('text' => t('Community Home'), 'url' => '/', 'icon' => icon('home'), 'sort' => -100));
$sender->addGroup('etc', array('sort' => 100));
if (Gdn::Session()->IsValid()) {
$sender->addLink('etc.signout', array('text' => t('Sign Out'), 'url' => SignOutUrl(), 'icon' => icon('signout'), 'sort' => 100));
} else {
$sender->addLink('etc.signin', array('text' => t('Sign In'), 'url' => SignInUrl(), 'icon' => icon('signin'), 'sort' => 100));
}
}
示例8: jQuery
<?php
if ($Session->IsValid()) {
?>
<p id="SignoutWrap">
<script language="javascript">
jQuery(document).ready(function($) {
var url = $('#SignoutLink').attr('href');
if (url) {
$('#SignoutWrap').hide();
$('#LeavingWrap').show();
window.location.replace(url);
}
});
</script>
<?php
printf(T('AttemptingSignOut', 'You are attempting to sign out. Are you sure you want to %s?'), Anchor(T('sign out'), SignOutUrl($this->Data('Target')), '', array('id' => 'SignoutLink')));
?>
</p>
<?php
} else {
?>
<p><?php
echo T('SignedOut', 'You are signed out.');
?>
</p>
<?php
}
?>
<?php
}
示例9: Anchor
<h1><?php
echo Anchor(C('Garden.Title') . ' ' . Wrap(T('Visit Site')), '/');
?>
</h1>
<div class="User">
<?php
$Session = Gdn::Session();
if ($Session->IsValid()) {
$this->FireEvent('BeforeUserOptionsMenu');
$Name = $Session->User->Name;
$CountNotifications = $Session->User->CountNotifications;
if (is_numeric($CountNotifications) && $CountNotifications > 0) {
$Name .= Wrap($CountNotifications);
}
echo Anchor($Name, '/profile/' . $Session->User->UserID . '/' . $Session->User->Name, 'Profile');
echo Anchor(T('Sign Out'), SignOutUrl(), 'Leave');
}
?>
</div>
</div>
<div id="Body">
<div id="Panel">
<?php
$this->RenderAsset('Panel');
?>
</div>
<div id="Content"><?php
$this->RenderAsset('Content');
?>
</div>
</div>
示例10: T
?>
</h1>
<div class="Box">
<?php
if ($this->Leaving) {
?>
<p class="Leaving"><?php
echo T('Hang on a sec while we sign you out.');
?>
</p>
<?php
} else {
if ($Session->IsValid()) {
?>
<p><?php
printf(T('You are attempting to sign out of Vanilla. Are you sure you want to %s?'), Anchor(T('sign out'), SignOutUrl()));
?>
</p>
<?php
} else {
?>
<p><?php
echo T('You are signed out.');
?>
</p>
<?php
}
}
?>
</div>
</div>
示例11: T
?>
</h1>
<div class="P">
<?php
if ($this->Leaving) {
?>
<p class="Leaving"><?php
echo T('SigningOut', 'Hang on a sec while we sign you out.');
?>
</p>
<?php
} else {
if ($Session->IsValid()) {
?>
<p><?php
printf(T('AttemptingSignOut', 'You are attempting to sign out. Are you sure you want to %s?'), Anchor(T('sign out'), SignOutUrl()));
?>
</p>
<?php
} else {
?>
<p><?php
echo T('SignedOut', 'You are signed out.');
?>
</p>
<?php
}
}
?>
</div>
</div>
示例12: T
$this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'), array('class' => 'Dashboard'));
// $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'), array('class' => 'Users'));
$this->Menu->AddLink('Activity', T('Activity'), '/activity', FALSE, array('class' => 'Activity'));
if ($Session->IsValid()) {
$Name = $Session->User->Name;
$CountNotifications = $Session->User->CountNotifications;
if (is_numeric($CountNotifications) && $CountNotifications > 0) {
$Name .= ' <span class="Alert">' . $CountNotifications . '</span>';
}
if (urlencode($Session->User->Name) == $Session->User->Name) {
$ProfileSlug = $Session->User->Name;
} else {
$ProfileSlug = $Session->UserID . '/' . urlencode($Session->User->Name);
}
$this->Menu->AddLink('User', $Name, '/profile/' . $ProfileSlug, array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
$this->Menu->AddLink('SignOut', T('Sign Out'), SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
} else {
$Attribs = array();
if (SignInPopup() && strpos(Gdn::Request()->Url(), 'entry') === FALSE) {
$Attribs['class'] = 'SignInPopup';
}
$this->Menu->AddLink('Entry', T('Sign In'), SignInUrl($this->SelfUrl), FALSE, array('class' => 'NonTab SignIn'), $Attribs);
}
echo $this->Menu->ToString();
}
?>
<div class="Search"><?php
$Form = Gdn::Factory('Form');
$Form->InputPrefix = '';
echo $Form->Open(array('action' => Url('/search'), 'method' => 'get')), $Form->TextBox('Search'), $Form->Button('Go', array('Name' => '')), $Form->Close();
?>
示例13: Link
public static function Link($Path, $Text = FALSE, $Format = '<a href="%url" class="%class">%text</a>', $Options = array()) {
$Session = Gdn::Session();
$Class = GetValue('class', $Options, '');
$WithDomain = GetValue('WithDomain', $Options);
$Target = GetValue('Target', $Options, '');
switch ($Path) {
case 'activity':
TouchValue('Permissions', $Options, 'Garden.Activity.View');
break;
case 'dashboard':
$Path = 'dashboard/settings';
TouchValue('Permissions', $Options, 'Garden.Settings.Manage');
if (!$Text)
$Text = T('Dashboard');
break;
case 'inbox':
$Path = 'messages/inbox';
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text)
$Text = T('Inbox');
if ($Session->IsValid() && $Session->User->CountUnreadConversations) {
$Class = trim($Class.' HasCount');
$Text .= ' <span class="Alert">'.$Session->User->CountUnreadConversations.'</span>';
}
break;
case 'profile':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text && $Session->IsValid())
$Text = $Session->User->Name;
if ($Session->IsValid() && $Session->User->CountNotifications) {
$Class = trim($Class.' HasCount');
$Text .= ' <span class="Alert">'.$Session->User->CountNotifications.'</span>';
}
break;
case 'user':
$Path = 'profile';
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text && $Session->IsValid())
$Text = $Session->User->Name;
break;
case 'photo':
$Path = 'profile';
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text && $Session->IsValid()) {
$IsFullPath = strtolower(substr($Session->User->Photo, 0, 7)) == 'http://' || strtolower(substr($Session->User->Photo, 0, 8)) == 'https://';
$PhotoUrl = ($IsFullPath) ? $Session->User->Photo : Gdn_Upload::Url(ChangeBasename($Session->User->Photo, 'n%s'));
$Text = Img($PhotoUrl, array('alt' => htmlspecialchars($Session->User->Name)));
}
break;
case 'drafts':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text)
$Text = T('My Drafts');
if ($Session->IsValid() && $Session->User->CountDrafts) {
$Class = trim($Class.' HasCount');
$Text .= ' <span class="Alert">'.$Session->User->CountDrafts.'</span>';
}
break;
case 'discussions/bookmarked':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text)
$Text = T('My Bookmarks');
if ($Session->IsValid() && $Session->User->CountBookmarks) {
$Class = trim($Class.' HasCount');
$Text .= ' <span class="Count">'.$Session->User->CountBookmarks.'</span>';
}
break;
case 'discussions/mine':
TouchValue('Permissions', $Options, 'Garden.SignIn.Allow');
if (!$Text)
$Text = T('My Discussions');
if ($Session->IsValid() && $Session->User->CountDiscussions) {
$Class = trim($Class.' HasCount');
$Text .= ' <span class="Count">'.$Session->User->CountDiscussions.'</span>';
}
break;
case 'signin':
case 'signinout':
// The destination is the signin/signout toggle link.
if ($Session->IsValid()) {
if(!$Text)
$Text = T('Sign Out');
$Path = SignOutUrl($Target);
$Class = ConcatSep(' ', $Class, 'SignOut');
} else {
if(!$Text)
$Text = T('Sign In');
$Attribs = array();
$Path = SignInUrl($Target);
if (SignInPopup() && strpos(Gdn::Request()->Url(), 'entry') === FALSE)
$Class = ConcatSep(' ', $Class, 'SignInPopup');
}
break;
}
if (GetValue('Permissions', $Options) && !$Session->CheckPermission($Options['Permissions']))
//.........这里部分代码省略.........
示例14: anchor
?>
</span></span></li>
<?php
}
?>
<li><?php
echo anchor(t('Notifications'), '/profile/notifications');
?>
<span class="Aside"><span
class="Count"><?php
echo $CountNotifications;
?>
</span></span></li>
<?php
if ($Session->checkPermission('Garden.Settings.Manage')) {
?>
<li><?php
echo anchor(t('Dashboard'), '/dashboard/settings');
?>
</li>
<?php
}
?>
<li><?php
echo anchor(t('Sign Out'), SignOutUrl());
?>
</li>
</ul>
</div>
<?php
}
示例15: Anchor
echo $CountInbox;
?>
</span></li>
<?php
}
?>
<li><strong><?php
echo Anchor(T('Notifications'), '/profile/notifications');
?>
</strong><span class="Count"><?php
echo $CountNotifications;
?>
</span></li>
<?php
if ($Session->CheckPermission('Garden.Settings.Manage')) {
?>
<li><strong><?php
echo Anchor(T('Dashboard'), '/dashboard/settings');
?>
</strong> </li>
<?php
}
?>
<li><strong><?php
echo Anchor(T('Sign Out'), SignOutUrl());
?>
</strong> </li>
</ul>
</div>
<?php
}