Example #1
0
 public static function dispatch()
 {
     self::defaults();
     \Lobby::doHook("router.finish");
     self::statusRoutes();
     self::$router->dispatch();
 }
Example #2
0
<?php

require "../load.php";
?>
<!DOCTYPE html>
<html>
  <head>
    <?php 
\Lobby::doHook("admin.head.begin");
\Lobby::head("Install App");
//~
?>
  </head>
  <body>
    <?php 
\Lobby::doHook("admin.body.begin");
?>
    <div class="workspace">
      <div class="contents">
        <?php 
if (H::input("id") == null) {
    ser("Error", "No App is mentioned. Install Apps from <a href='lobby-store.php'>Lobby Store</a>");
}
if (H::input("action") == "enable" && H::csrf()) {
    $App = new \Lobby\Apps($_GET['id']);
    if (!$App->exists) {
        ser("Error", "App is not installed");
    }
    $App->enableApp();
    sss("Enabled", "The App <b>{$_GET['id']}</b> is enabled. The author says thanks.<a href='" . $App->info['URL'] . "' class='button green'>Open App</a>");
}
Example #3
0
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");
Example #4
0
?>
    <script>
      window.tmp = {};window.lobbyExtra = {};<?php 
if (isset($AppID)) {
    echo 'lobbyExtra["app"] = { id: "' . $AppID . '", url: "' . APP_URL . '", src: "' . \Lobby::u("/contents/apps/{$AppID}") . '" };';
}
?>
</script>
    <?php 
\Lobby::head();
\Lobby::doHook("head.end");
?>
  </head>
  <body>
    <?php 
\Lobby::doHook("body.begin");
?>
    <div class="workspace" <?php 
if (isset($AppID)) {
    echo 'id="' . $AppID . '"';
}
?>
>
      <?php 
if (is_array($GLOBALS['workspaceHTML'])) {
    $fileLoc = $GLOBALS['workspaceHTML'][0];
    include L_DIR . $fileLoc;
} else {
    echo $GLOBALS['workspaceHTML'];
}
?>