本文整理汇总了PHP中Lobby::curPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::curPage方法的具体用法?PHP Lobby::curPage怎么用?PHP Lobby::curPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lobby
的用法示例。
在下文中一共展示了Lobby::curPage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
if (\Lobby::status("lobby.assets-serve") === false) {
$this->install();
$this->routes();
require_once $this->app->dir . "/src/inc/load.php";
if (LS::$loggedIn) {
/**
* Logged In
*/
Hooks::addAction("init", function () {
/**
* Add Change Password Item in Top Panel -> Admin before Log Out item
* This is done by first removing the Log Out item, adding the Change
* Password item and then adding back the Log Out item
*/
\Lobby\UI\Panel::addTopItem('adminModule', array("text" => "<img src='" . $this->app->srcURL . "/src/image/logo.svg' style='width: 40px;height: 40px;' />", "href" => "/", "position" => "left", "subItems" => array("changePassword" => array("text" => "Change Password", "href" => "/app/admin/change-password"), 'LogOut' => array("text" => "Log Out", "href" => "/app/admin/logout"))));
});
} else {
/**
* If `indi` module is active, make the index page available to everyone
*/
if (!Modules::exists("app_indi")) {
if (\Lobby::curPage() != "/admin/login" && !\Lobby::status("lobby.install")) {
\Response::redirect("/admin/login");
}
} else {
Panel::removeTopItem("indiModule", "left");
if (\Lobby::curPage() != "/admin/login" && \Lobby::curPage() != "/admin/install.php" && substr(\Lobby::curPage(), 0, 6) == "/admin") {
\Response::redirect("/admin/login");
}
}
Hooks::addFilter("panel.left.items", function ($left) {
unset($left["lobbyAdmin"]);
if (Modules::exists("app_indi")) {
unset($left["indiModule"]);
}
return $left;
});
Assets::removeJS("notify");
Assets::removeCSS("notify");
}
}
}
示例2: array
<?php
$this->addStyle("admin.css");
$this->addStyle("jquery.fancybox.css");
$this->addScript("jquery.fancybox.js");
$this->addScript("chart.min.js");
$this->addScript("admin.js");
?>
<div class='leftpane'>
<center>
<h3>logSys<br/><span style='font-size: 12px;'><?php
echo $this->manifest['version'];
?>
<a style='display: block;' href='http://subinsb.com/php-logsys?utm_source=lobby_logsys.admin' target='_blank'>Documentation</a></span></h3>
</center>
<div>
<?php
$links = array("/admin" => "Home", "/admin/users" => "Users", "/admin/tokens" => "Tokens", "/admin/stats" => "Stats", "/admin/config" => "Settings");
foreach ($links as $link => $name) {
echo $this->l($link, $name, \Lobby::curPage() == "/app/fr-logsys{$link}" ? "class='active'" : "");
}
?>
</div>
</div>
<div class='rightpane'>
示例3: getOption
<div class="sidebar">
<div style="height:32px;text-align:center;margin-top:10px;">
<a target="_blank" href="http://lobby.subinsb.com" style="color:white;">Lobby <?php
echo getOption("lobby_version");
?>
</a>
</div>
<?php
$links = array("/admin" => "Dashboard", "/admin/apps.php" => "Apps", "/admin/lobby-store.php" => "Lobby Store", "/admin/modules.php" => "Modules", "/admin/about.php" => "About");
$curPage = \Lobby::curPage();
foreach ($links as $link => $text) {
if ($link == $curPage || $curPage == "/admin/update.php" && $text == "About") {
echo \Lobby::l($link, $text, "class='link active'");
} else {
echo \Lobby::l($link, $text, "class='link'");
}
}
?>
</div>
示例4:
<?php
if (\Lobby::curPage() != "/includes/serve.php") {
require_once __DIR__ . "/install.php";
require_once __DIR__ . "/module.php";
}
示例5: function
});
if (\Fr\LS::$loggedIn) {
/**
* Logged In
*/
\Lobby::hook("init", function () {
/**
* Add Change Password Item in Top Panel -> Admin before Log Out item
* This is done by first removing the Log Out item, adding the Change
* Password item and then adding back the Log Out item
*/
\Lobby\Panel::$top_items['left']['lobbyAdmin']['subItems']['ChangePassword'] = array("text" => "Change Password", "href" => "/admin/ChangePassword");
\Lobby\Panel::$top_items['left']['lobbyAdmin']['subItems']['LogOut'] = array("text" => "Log Out", "href" => "/admin/login?logout");
});
} else {
/**
* Not logged in
*/
if (\Lobby\Modules::exists("indi") === false) {
if (\Lobby::curPage() != "/admin/login" && !\Lobby::status("lobby.install")) {
\Lobby::redirect("/admin/login");
}
} else {
if (\Lobby::curPage() != "/admin/login" && \Lobby::curPage() != "/admin/install.php" && substr(\Lobby::curPage(), 0, 6) == "/admin") {
\Lobby::redirect("/admin/login");
}
}
\Lobby::hook("init", function () {
unset(\Lobby\Panel::$top_items['left']['lobbyAdmin']);
});
}
示例6: status
/**
* Get status
*/
public static function status($val)
{
$status = "";
if (self::$status != null) {
$status = self::$status;
} else {
self::$statuses[] = function ($path) {
if ($path == "/admin/install.php") {
$status = "lobby.install";
} elseif (substr($path, 0, 6) == "/admin") {
$status = "lobby.admin";
} elseif ($path == "/includes/serve.php") {
$status = "lobby.serve";
}
return isset($status) ? $status : false;
};
foreach (self::$statuses as $func) {
$return = $func(\Lobby::curPage());
if ($return != false) {
$status = $return;
}
}
self::$status = $status;
}
return $status == $val;
}
示例7: array
}
}
if (isset($GLOBALS['initError'])) {
echo "<html><head>";
\Lobby::$js = array();
\Lobby::head();
echo "</head><body><div class='workspace'><div class='contents'>";
ser($GLOBALS['initError'][0], $GLOBALS['initError'][1]);
echo "</div></div></body></html>";
exit;
}
\Lobby::curPage(true);
/**
* Add the <head> files if it's not the install page
*/
if (\Lobby::curPage() != "/admin/install.php") {
/**
* Styles
*/
\Lobby::addStyle("jqueryui", "/includes/lib/jquery/jquery-ui.css");
// jQuery UI
/**
* Scripts
*/
\Lobby::addScript("jquery", "/includes/lib/jquery/jquery.js");
\Lobby::addScript("jqueryui", "/includes/lib/jquery/jquery-ui.js");
// jQuery UI
\Lobby::addScript("main", "/includes/lib/core/JS/main.js");
/**
* Left Menu
*/