本文整理汇总了PHP中auth::isLogoutRequested方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::isLogoutRequested方法的具体用法?PHP auth::isLogoutRequested怎么用?PHP auth::isLogoutRequested使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth
的用法示例。
在下文中一共展示了auth::isLogoutRequested方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// -------------------------------------------------------------------------
// --> Additional definitions in (output after the styles defined here):
// document->buildLayoutUpdate()
// -----------------------
// -- STYLESHEETS
// -----------------------
if (USE_MINIFIED) {
$GLOBALS[SUBSITE]["stylesheets"]["all"][] = "min.css";
$GLOBALS[SUBSITE]["stylesheets"]["print"][] = "print.min.css";
} else {
$GLOBALS[SUBSITE]["stylesheets"]["all"][] = "screen.css";
$GLOBALS[SUBSITE]["stylesheets"]["all"][] = "widget.css";
$GLOBALS[SUBSITE]["stylesheets"]["print"][] = "print.css";
}
/* Load after 'screen.css' and 'widget.css' */
if (SHOW_MYMENU && auth::isAuthenticated() && !auth::isLogoutRequested()) {
$GLOBALS[SUBSITE]["stylesheets"]["all"][] = "loginbar.css";
}
if (SHOW_TEST_TABS) {
$GLOBALS[SUBSITE]["stylesheets"]["all"][] = "margintabs.css";
}
// -----------------------
// -- STYLESHEETS-CONDITIONAL
// -----------------------
/* Keep for later editing
$GLOBALS[SUBSITE]["stylesheets-conditional"]["lt IE 6"]["screen"][] = "hacks/msie5.css";
*/
// =========================================================================
// =========================================================================
// -- COMMON SITE-WIDE SCRIPT FILES
//
示例2: buildConfigOfPageUpdate
private function buildConfigOfPageUpdate()
{
// -----------------------------------------------------------
// -- (1) Update $this->configOfPage with menu configuration of current page
// -----------------------------------------------------------
if (isset($this->allMenusArray[$this->pagePath])) {
foreach ($this->allMenusArray[$this->pagePath] as $field => $value) {
$this->setConfig($field, $value);
}
}
// -----------------------------------------------------------
// -- (2) Massage some of the fields in $this->configOfPage
// -----------------------------------------------------------
if (!$this->getConfig("requirelogin") && $this->getConfig("access")) {
$this->setConfig("logintype", "link");
}
// -----------------------
if ($this->getConfig("listincontext")) {
$this->setConfig("notintopmenu", 1);
}
// -----------------------
// Login form should always be 'medwide'
// -----------------------
if (auth::isLoginType("inline") && (!auth::isAuthenticated() || auth::isLogoutRequested() || !auth::isAccessGranted())) {
$this->setConfig("wide", 0);
$this->setConfig("medwide", 1);
$this->setConfig("rightwide", 0);
//$this->setConfig("nocolophon", 1);
}
// -----------------------
// Any kind of login form must have stylesheet 'loginform.css'
// -----------------------
if ((auth::isLoginRequired() || auth::isLoginAllowed()) && (!auth::isAuthenticated() || auth::isLogoutRequested())) {
$GLOBALS[SUBSITE]["stylesheets"]["all"][] = "loginform.css";
}
// -----------------------
if (IS_ERRORPAGE) {
$this->setConfig("title", "Oops! Something seems to have gone wrong...");
$this->setConfig("bodyid", "error");
}
// if (IS_TESTSERVER) {
// $this->setConfig("robots","noindex,nofollow,noodp,noydir");
// }
//TODO: convert to current framework
/*
if ($this->getConfig("wide") ) {
unset($GLOBALS["blocks"]["top"]);
unset($GLOBALS["blocks"]["subtree"]);
unset($GLOBALS["blocks"]["fixedimage"]);
unset($GLOBALS["blocks"]["splashimage"]);
unset($GLOBALS["blocks"]["sidebar"]);
$GLOBALS["blocks"]["twotop"] = 1;
} else if ($this->getConfig("medwide") ) {
unset($GLOBALS["blocks"]["sidebar"]);
}
*/
// For 'people/doorlabel'
if (isset($_REQUEST["us"]) && count($_REQUEST["us"]) <= 4) {
$this->setConfig("nobanner", 1);
$this->setConfig("nobackground", 1);
$this->setConfig("nocolophon", 1);
$this->setConfig("nopagetitle", 1);
}
// -----------------------
if (isset($_REQUEST["eventlist_select"])) {
$this->setConfig("url", functions::callMethod("event", "lib/event", "getEventListUrl"));
}
// -----------------------
if (isset($_REQUEST["statistics_preprints"])) {
switch ($_REQUEST["preprints_type"]) {
case "word":
$this->setConfig("plaincss", 1);
$this->setConfig("nomenu", 1);
$this->setConfig("nocss", 1);
$this->setConfig("nocolophon", 1);
$this->setConfig("nobanner", 1);
$this->setConfig("nosearch", 1);
$this->setConfig("nopagetitle", 1);
$this->setConfig("nobackground", 1);
break;
case "text":
$this->setConfig("bodyid", "text");
break;
}
}
// -----------------------
// If received data from login form, check authentication and redirect on success:
// -----------------------
if ((isset($_REQUEST["auth_submitted"]) || isset($_SESSION["mypear_auth_attempted"])) && auth::checkLogin()) {
$this->setConfig("url", $_SERVER["PHP_SELF"]);
}
// -----------------------
// Possibly modify $this->configOfPage["bannertext"]
// -- Initiated to "Nordic Institute <span class='only_online'><br></span>for
// Theoretical Physics" in 'config_SUBSITE.php'.
// -- NB that YB apps pages should be self-sufficient
// -----------------------
// Legacy YB-style, with page title in banner box; probably no longer used
if ($this->getConfig("titleinbanner") && !$this->getConfig("nopagetitle")) {
$this->setConfig("bannertext", $this->getConfig("title"));
//.........这里部分代码省略.........
示例3: Btopmenu
public static function Btopmenu($id = "topmenu", $blockclass = "", $liclass = "")
{
$stdout = "";
if (IS_ENTRANCE) {
return "";
}
$work = $GLOBALS["documentClass"]->getMenuThisTop();
$txt = "";
foreach ($work as $subpage) {
if (auth::isAccessGranted($subpage["access"])) {
if (!empty($subpage)) {
$txt .= " <li class='" . (!empty($liclass) ? $liclass . " " : "") . ($subpage["active"] && !empty($subpage["path"]) ? "expanded" : "collapsed") . ($subpage["path"] == PUBLICCRUMB ? " last " : "") . "'><a href='" . $subpage["url"] . "'>" . str_replace(TEST_PREFIX, "", str_replace(EXTERNAL_LINK, "", $subpage["title"])) . "</a></li>\r\n";
}
}
}
/* RESTORE if test tabs needed */
/*
if (SHOW_TEST_TABS && IS_INDEXPAGE && ($GLOBALS["frontselect"]==10)) $txt = " <li style='float:none;height:auto;margin:0px;padding:2px 15px 0px 65px;text-decoration:none;font-size:1.4em;font-weight:normal;font-family:\"Baskerville\",\"Times\",\"Times New Roman\",serif;letter-spacing:0.2em;'>The Nordic Institute for Theoretical Physics</li>\r\n"; */
$stdout = " <div id='block-" . $id . "'" . (!empty($blockclass) ? " class='" . $blockclass . "'" : "") . ">\r\n" . " <ul>\r\n" . ($GLOBALS["documentClass"]->getConfig("requirelogin") && (!auth::isAuthenticated() || auth::isLogoutRequested()) ? "" : $txt) . " </ul>\r\n" . " </div> <!-- " . $id . " -->\r\n" . "\r\n";
return $stdout;
}