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


PHP Lobby::status方法代码示例

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


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

示例1: loadTheme

 /**
  * Load a theme
  */
 public static function loadTheme()
 {
     require_once L_DIR . "/includes/src/UI/Theme.php";
     require_once THEME_DIR . "/Theme.php";
     $className = "\\Lobby\\UI\\Themes\\" . self::$theme;
     $GLOBALS["THEME_OBJ"] = new $className();
     $GLOBALS["THEME_OBJ"]->init();
     /**
      * Load Panel
      */
     if (\Lobby::status("lobby.admin")) {
         \Lobby::hook("admin.head.begin", function () {
             $GLOBALS["THEME_OBJ"]->panel(true);
             $GLOBALS["THEME_OBJ"]->addStyle("/style.css");
             $GLOBALS["THEME_OBJ"]->addStyle("/admin.style.css");
         });
         \Lobby::hook("admin.body.begin", function () {
             echo $GLOBALS["THEME_OBJ"]->inc("/Panel/load.admin.php");
         });
     } else {
         $GLOBALS["THEME_OBJ"]->addStyle("/style.css");
         \Lobby::hook("head.begin", function () {
             $GLOBALS["THEME_OBJ"]->panel(false);
         });
         \Lobby::hook("body.begin", function () {
             echo $GLOBALS["THEME_OBJ"]->inc("/Panel/load.php");
         });
     }
 }
开发者ID:saviobosco,项目名称:lobby,代码行数:32,代码来源:Themes.php

示例2: init

 public function init()
 {
     if (!\Lobby::status("lobby.assets-serve")) {
         $this->addScript("filepicker.js");
         $this->addStyle("filepicker.css");
     }
 }
开发者ID:LobbyOS,项目名称:server,代码行数:7,代码来源:Module.php

示例3: 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");
         }
     }
 }
开发者ID:LobbyOS,项目名称:server,代码行数:44,代码来源:Module.php

示例4:

<?php

if (!\Lobby::status("lobby.admin")) {
    \Lobby::addScript("keyring_module", L_URL . "/contents/apps/keyring/module/js/keyring.js");
}
开发者ID:saviobosco,项目名称:lobby,代码行数:5,代码来源:load.php

示例5: array

<?php

if (!\Lobby::status("lobby.serve")) {
    /**
     * For enabling access by \Lobby\Panel
     */
    require __DIR__ . "/class.panel.php";
    /**
     * Panel UI
     */
    if (!\Lobby::status("lobby.install")) {
        \Lobby::addScript("superfish", "/includes/lib/modules/panel/lib/superfish.js");
        \Lobby::addStyle("panel", "/includes/lib/modules/panel/lib/panel.css");
        \Lobby::addScript("panel", "/includes/lib/modules/panel/lib/panel.js");
    }
    if (\Lobby::$config['server_check'] === true) {
        /**
         * Default Items provided by the module
         */
        \Lobby\Panel::addTopItem("netStatus", array("html" => "<span id='net' title='Online'></span>", "position" => "right"));
        \Lobby::addScript("panel-item-connection", "/includes/lib/modules/panel/connection/connection.js");
    }
    \Lobby::hook("body.begin", function () {
        include __DIR__ . "/panel.ui.php";
    });
    \Lobby::hook("admin.body.begin", function () {
        include __DIR__ . "/panel.ui.php";
    });
}
开发者ID:anandubajith,项目名称:lobby,代码行数:29,代码来源:load.php

示例6: 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']);
    });
}
开发者ID:anandubajith,项目名称:lobby,代码行数:31,代码来源:module.php

示例7:

/* The Core */
require_once L_DIR . "/includes/src/Database.php";
/* The Database Class */
require_once L_DIR . "/includes/src/Query.php";
/* The Database Class */
require_once L_DIR . "/includes/src/Apps.php";
/* The App Class */
require_once L_DIR . "/includes/src/Router.php";
/* The Router Class */
require_once L_DIR . "/includes/src/Server.php";
/* The File System Class */
require_once L_DIR . "/includes/functions.php";
/* Non class functions */
require_once L_DIR . "/includes/extra.php";
/* Define extra variables or constants */
/**
 * Run not on CDN files serving
 */
if (!\Lobby::status("lobby.serve")) {
    /**
     * Init the page setup
     */
    require_once L_DIR . "/includes/init.php";
    /**
     * Is Lobby Installed ?
     */
    if (!\Lobby::$installed && !\Lobby::status("lobby.install")) {
        \Lobby::redirect("/admin/install.php");
    }
}
\Lobby::doHook("init");
开发者ID:anandubajith,项目名称:lobby,代码行数:31,代码来源:load.php

示例8: loadTheme

 /**
  * Load a theme
  */
 public static function loadTheme()
 {
     require_once self::$dir . "/Theme.php";
     $className = "\\Lobby\\UI\\Themes\\" . self::$themeID;
     self::$theme = new $className(self::$themeID, self::$dir);
     self::$theme->init();
     self::$theme->addStyle("/src/main/css/style.css");
     self::$theme->addStyle("/src/main/css/icons.css");
     /**
      * Load Panel
      */
     if (\Lobby::status("lobby.admin")) {
         Hooks::addAction("admin.head.begin", function () {
             self::$theme->panel(true);
             self::$theme->addStyle("/src/main/css/admin.style.css");
         });
         \Hooks::addAction("admin.body.begin", function () {
             echo self::$theme->inc("/src/panel/load.admin.php");
         });
     } else {
         \Hooks::addAction("head.begin", function () {
             self::$theme->panel(false);
         });
         \Hooks::addAction("body.begin", function () {
             echo self::$theme->inc("/src/panel/load.php");
         });
     }
 }
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:Themes.php

示例9: 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;
 }
开发者ID:anandubajith,项目名称:lobby,代码行数:29,代码来源:Lobby.php


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