Exemple #1
0
});
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']);
    });
}
Exemple #2
0
/* 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");
Exemple #3
0
            ?>
" class="button">Proceed To Installation</a>
          <?php 
        } else {
            echo "<p>Cannot Procced to Installation. Please make the requirements satisfied.</p>";
        }
    } elseif ($_GET['step'] == 3) {
        echo "<h2>Safety</h2>";
        $safe = \Lobby\Install::safe();
        if ($safe == "configFile") {
            ser("Permission Error", "The <b>config.php</b> file still has write permission. Change the permission to Read Only.");
        }
        if ($safe !== true) {
            echo "<a class='button' href='javascript:;' onclick='window.location = window.location;'>Check Again</a>";
        } else {
            \Lobby::redirect("/#");
        }
    } elseif ($_GET['step'] == 2 && H::csrf()) {
        /**
         * We call it again, so that the user had already went through the First Step
         */
        if (\Lobby\Install::step1() === false) {
            // The stuff mentioned in step 1 hasn't been done
        } elseif (isset($_POST['submit'])) {
            $dbhost = \H::input('dbhost', "POST");
            $dbport = \H::input('dbport', "POST");
            $dbname = \H::input('dbname', "POST");
            $username = \H::input('dbusername', "POST");
            $password = \H::input('dbpassword', "POST");
            $prefix = \H::input('prefix', "POST");
            /**
Exemple #4
0
<?php

require "../load.php";
unset($_SESSION['checkedForLatestVersion']);
\Lobby::$serverCheck = true;
require L_DIR . "/includes/init.php";
\Lobby::redirect("/admin/update.php");
Exemple #5
0
        <option name="d">D</option>
      </select>
    </label>
    <label>
      <p>Roll Number</p>
      <input type="number" name="roll" value="1" />
    </label>
    <p>
      <p>Your Register Number is :</p>
      <blockquote id="register_number">8A1</blockquote>
    </p>
    <button clear="" name="submit" class="red">Start Exam</button>
  </form>
  <?php 
if (isset($_SESSION['kerala-it-exam-rid'])) {
    \Lobby::redirect("/app/kerala-it-exam/exam");
}
if (isset($_POST['submit'])) {
    $class = $_POST['class'];
    $div = $_POST['div'];
    $roll = $_POST['roll'];
    $register_no = $class . $div . $roll;
    // Register Number
    $_SESSION['kerala-it-exam-rid'] = $register_no;
    $_SESSION['kerala-it-exam-class'] = $class;
    ?>
    <h1>Please wait...</h1>
    <script>
    localStorage["end_time"] = "invalid";
    delete localStorage["end_time"];
    setTimeout(function(){
Exemple #6
0
<?php

require "../load.php";
if (\Lobby::$installed) {
    $backupFile = \Lobby::$config['db']['dbname'] . "-" . date("Y-m-d-H-i-s") . '.gz';
    $backupFileLoc = L_DIR . "/contents/extra/" . $backupFile;
    $command = "mysqldump --opt --host=" . \Lobby::$config['db']['host'] . " --port=" . \Lobby::$config['db']['port'] . " --user="******" --password="******" " . \Lobby::$config['db']['dbname'] . " | gzip -9 -c > {$backupFileLoc}";
    system($command);
    sleep(5);
    if (file_exists($backupFileLoc)) {
        \Lobby::redirect("/contents/extra/{$backupFile}");
    } else {
        echo "It didn't work. Try using phpMyAdmin to export Database. or direclty use the terminal command : <blockquote>{$command}</blockquote>";
    }
}