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


PHP Lobby::redirect方法代码示例

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


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

示例1: 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

示例2:

/* 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

示例3: elseif

            ?>
" 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");
            /**
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:install.php

示例4: unset

<?php

require "../load.php";
unset($_SESSION['checkedForLatestVersion']);
\Lobby::$serverCheck = true;
require L_DIR . "/includes/init.php";
\Lobby::redirect("/admin/update.php");
开发者ID:saviobosco,项目名称:lobby,代码行数:7,代码来源:check-updates.php

示例5: setTimeout

        <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(){
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:index.php

示例6: date

<?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=" . \Lobby::$config['db']['username'] . " --password=" . \Lobby::$config['db']['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>";
    }
}
开发者ID:saviobosco,项目名称:lobby,代码行数:15,代码来源:backup-db.php


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