Exemplo n.º 1
0
    /**
     * Add sidebar
     */
    Hooks::addAction("admin.body.begin", function () {
        require L_DIR . "/admin/inc/sidebar.php";
    });
    /**
     * Add sidebar handler in panel
     */
    \Hooks::addAction("panel.end", function () {
        echo '<a href="#" data-activates="slide-out" class="button-collapse"><i class="mdi-navigation-menu"></i></a>';
    });
    /**
     * Check For New Versions (Apps & Core)
     */
    if (\Lobby::getConfig('server_check') === true && !isset($_SESSION['checkedForLatestVersion'])) {
        \Lobby\Server::check();
        $_SESSION['checkedForLatestVersion'] = 1;
    }
}
/**
 * Insert Lobby Info to JS Files
 */
\Hooks::addAction("head.begin,admin.head.begin", function () {
    ?>
  <script>
    window.tmp = {};
    window.lobbyExtra = {
      url: "<?php 
    echo L_URL;
    ?>
Exemplo n.º 2
0
<?php

$backupFile = \Lobby::getConfig('db', 'dbname') . "-" . date("Y-m-d-H-i-s") . "-" . \Helper::randStr(10) . '.gz';
$backupFileLoc = L_DIR . "/contents/extra/" . $backupFile;
$command = "mysqldump --opt --host=" . $this->dbinfo['db_host'] . " --port=" . $this->dbinfo['db_port'] . " --user="******" --password="******" " . $this->dbinfo['db_name'] . " " . $this->dbinfo['db_table'] . " | gzip -9 -c > {$backupFileLoc}";
system($command);
sleep(5);
if (file_exists($backupFileLoc)) {
    echo \Lobby::l("/contents/extra/{$backupFile}", "Download SQL File", "class='btn red' target='_blank'");
} else {
    echo "It didn't work. Try using phpMyAdmin to export Database. or direclty use the terminal command : <blockquote>{$command}</blockquote>";
}
Exemplo n.º 3
0
<?php

require "../load.php";
if (\Lobby::$installed) {
    $backupFile = \Lobby::getConfig('db', 'dbname') . "-" . date("Y-m-d H:i:s") . '.gz';
    $backupFileLoc = L_DIR . "/contents/extra/" . $backupFile;
    $command = "mysqldump --opt --host=" . \Lobby::getConfig('db', 'host') . " --port=" . \Lobby::getConfig('db', 'port') . " --user="******" --password="******" " . \Lobby::getConfig('db', 'dbname') . " | gzip -9 -c > '{$backupFileLoc}'";
    system($command);
    sleep(5);
    if (file_exists($backupFileLoc)) {
        \Response::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>";
    }
}