Ejemplo n.º 1
0
 public function makePanelItem($text, $href, $id, $extraClass = "")
 {
     if ($href == L_URL) {
         /**
          * Home button
          */
         $html = "<li class='item {$extraClass}' id='home'><a href='" . L_URL . "'></a></li>";
     } else {
         if ($href == "/admin") {
             /**
              * Admin button
              */
             $html = "<li class='item {$extraClass}' id='lobby'><a href='" . \Lobby::u($href) . "' class='parent'>Lobby</a></li>";
         } else {
             $html = '<li class="item ' . $extraClass . '" id="' . $id . '">';
             if ($href == "") {
                 $html .= $text;
             } else {
                 if ($href === "htmlContent") {
                     $html .= $text;
                 } else {
                     $html .= \Lobby::l($href, $text);
                 }
             }
             $html .= '</li>';
         }
     }
     return $html;
 }
Ejemplo n.º 2
0
?>
<div class="sidebar">
  <div style="position: absolute;right: 0px;top: 0px;bottom: 0px;width: 2px;box-shadow: -5px 0px 30px rgba(0,0,0,1);"></div>
  <ul>
    <li>
      <li><?php 
echo \Lobby::l("/mods", "<h4 style='padding-top: 0;'>Modules</h4>", 'class="head"');
?>
</li>
      <ul>
        <li><?php 
echo \Lobby::l("/mods/admin", "Admin");
?>
</li>
        <li><?php 
echo \Lobby::l("/mods/indi", "Indi");
?>
</li>
      </ul>
    </li>
  </ul>
</div>
<div class="contents">
  <?php 
require_once $this->dir . "/src/inc/Parsedown.php";
$Parsedown = new ParsedownExtra();
$html = $Parsedown->text($content);
// This function adds nice anchor with id attribute to our h2 tags for reference
// @link: http://www.w3.org/TR/html4/struct/links.html#h-12.2.3
function anchor_content_headings($content)
{
Ejemplo n.º 3
0
    }
}
if ($step !== null && CSRF::check()) {
    $step = $step;
    if ($step === "1") {
        if (!is_writable(L_DIR)) {
            echo ser("Lobby Directory Not Writable", "The Lobby directory (" . L_DIR . ") is not writable. Make the folder writable to update Lobby.");
        }
        ?>
            <p>
              Looks like everything is ok. Hope you backed up Lobby installation & Database.
              <div clear></div>
              You can update now.
            </p>
          <?php 
        echo \Lobby::l("/admin/update.php?step=2" . CSRF::getParam(), "Start Update", "clear class='btn green'");
    } elseif ($step == 2) {
        $version = Lobby\DB::getOption("lobby_latest_version");
        echo '<iframe src="' . L_URL . "/admin/download.php?type=lobby" . CSRF::getParam() . '" style="border: 0;width: 100%;height: 200px;"></iframe>';
    }
}
$shouldUpdate = Request::postParam("updateApp");
if ($action === "updateApps" && is_array($shouldUpdate) && CSRF::check()) {
    foreach ($shouldUpdate as $appID) {
        echo '<iframe src="' . L_URL . "/admin/download.php?type=app&app={$appID}&isUpdate=1" . CSRF::getParam() . '" style="border: 0;width: 100%;height: 200px;"></iframe>';
    }
}
if ($step === null) {
    echo "<h2>Apps</h2>";
}
$appUpdates = Update::getApps();
Ejemplo n.º 4
0
 public static function l($path, $text = "", $extra = "")
 {
     return \Lobby::l(APP_URL . $path, $text, $extra);
 }
Ejemplo n.º 5
0
<div class="contents">
  <h2>sige</h2>
  <p>Manage Pages of site <strong><?php 
echo $name;
?>
</strong></p>
  <p>
    <?php 
echo \Lobby::l("{$su}/edit", "New Page", "class='button'");
$pages = $this->getPages($name);
if (count($pages) == 0) {
    \Lobby::ser("No Pages", "No pages has been created.");
    echo '<p><strong>Note that a page called "index" should be created in the site.</strong></p>';
} else {
    echo "<h3>Pages</h3>";
    foreach ($pages as $id => $page) {
        echo \Lobby::l("{$su}/edit?id={$id}", "{$id}", "class='button'") . "<cl/>";
    }
}
?>
  </p>
</div>
Ejemplo n.º 6
0
<?php

$this->setTitle("New App");
?>
<div class="contents">
  <h1>Add App</h1>
  <?php 
$app_info = array("id" => \Request::get("app_id"), "name" => \Request::get("app_name"), "git_url" => \Request::get("app_download"), "requires" => \Request::get("app_requires"), "short_description" => \Request::get("app_short_description"), "description" => \Request::get("app_description"), "category" => \Request::get("app_category"), "sub_category" => \Request::get("app_sub_category"), "version" => \Request::get("app_version"), "page" => \Request::get("app_page"), "author_id" => \Request::get("author_id"));
if (isset($_POST['app_id']) && array_search(null, $app_info) === false && CSRF::check()) {
    $apps_sql = \Lobby\DB::getDBH()->prepare("SELECT COUNT(1) FROM `apps` WHERE `id` = ?");
    $apps_sql->execute(array($app_info['id']));
    if ($apps_sql->fetchColumn() != 0) {
        ser("App Exists", "Hmmm... Looks like the App ID you submitted already exists either on App Center Or in the App Queue. " . \Lobby::l("/apps/{$app_info['id']}", "See Existing App"));
    } else {
        $app_info["logo"] = isset($_POST["app_logo"]) ? "1" : "0";
        $lobby_web = isset($_POST['app_lobby_web']) ? 1 : 0;
        $sql = \Lobby\DB::getDBH()->prepare("INSERT INTO `apps` (`id`, `name`, `version`, `logo`, `requires`, `git_url`, `description`, `short_description`, `category`, `sub_category`, `app_page`, `author`, `lobby_web`, `updated`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW());");
        $sql->execute(array($app_info['id'], $app_info['name'], $app_info['version'], $app_info['logo'], $app_info['requires'], $app_info['git_url'], $app_info['description'], $app_info['short_description'], $app_info['category'], $app_info['sub_category'], $app_info['page'], $app_info['author_id'], $lobby_web));
        require_once __DIR__ . "/../../inc/LobbyGit.php";
        $LG = new LobbyGit($app_info["id"], $app_info["git_url"]);
        $LG->register();
        sss("App Added", "App was added to the repository");
    }
}
?>
  <form action="<?php 
echo \Lobby::u();
?>
" method="POST">
    <label>
      <span>App ID</span>
Ejemplo n.º 7
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>";
}
Ejemplo n.º 8
0
$this->setTitle("Site {$name}");
?>
<div class="contents">
  <h2><?php 
echo $name;
?>
</h2>
  <p>About yout site.</p>
  <p><strong>Note that a page called "index" should be created in the site.</strong></p>
  <p clear>
    <?php 
echo \Lobby::l("{$su}/settings", "Settings", "class='button'");
?>
    <?php 
echo \Lobby::l("{$su}/pages", "Pages", "class='button'");
?>
  </p>
  <form clear method="POST" action="<?php 
echo \Lobby::u();
?>
">
    <button style="font-size: 25px;" name="generate" class="button orange">Generate Site NOW!</button>
  </form>
  <?php 
if (isset($_POST['generate'])) {
    /* Generate the site */
    $gSite = new \Lobby\App\sige\Site($this->getSite($name), $this);
    $gSite->generate($this->getPages($name));
    \Lobby::sss("Generated Site", "The site was successfully generated");
}
Ejemplo n.º 9
0
"><?php 
            echo $App->info["name"];
            ?>
</a>
                    <div class="actions">
                      <?php 
            if ($App->hasUpdate()) {
                echo "<cl/>" . \Lobby::l("/admin/update.php", "Update", "class='btn orange'");
            } else {
                if ($App->enabled) {
                    echo \Lobby::l("/admin/apps.php?app={$app}&action=disable" . CSRF::getParam(), "Disable", "class='btn'");
                } else {
                    echo \Lobby::l("/admin/apps.php?app={$app}&action=enable" . CSRF::getParam(), "Enable", "class='btn green'");
                }
            }
            echo "<cl/>" . \Lobby::l("/admin/apps.php?app={$app}&action=remove" . CSRF::getParam(), "Remove", "class='btn red'");
            ?>
                    </div>
                  </div>
                </div>
              </div>
            <?php 
        }
        echo '</div>';
    }
}
?>
      </div>
    </div>
  </body>
</html>
Ejemplo n.º 10
0
                                    \Lobby\Install::dbConfig(array("path" => str_replace(L_DIR, "", $db_loc), "prefix" => "l_"));
                                    /**
                                     * Make the Config File
                                     */
                                    \Lobby\Install::makeConfigFile("sqlite");
                                    /**
                                     * Enable app lEdit
                                     */
                                    \Lobby::$installed = true;
                                    \Lobby\DB::__constructStatic();
                                    $App = new \Lobby\Apps("ledit");
                                    $App->enableApp();
                                    echo sss("Success", "Database and <b>config.php</b> file was successfully created.");
                                    echo '<cl/><a href="?step=4' . CSRF::getParam() . '" class="btn">Proceed</a>';
                                } else {
                                    echo ser("Couldn't Make SQLite Database", "I was unable to make the database. Error :<blockquote>" . \Lobby\Install::$error . "</blockquote> <cl/>" . \Lobby::l("/admin/install.php?step=3&db_type=sqlite" . CSRF::getParam(), "Try Again", "class='btn'"));
                                }
                            }
                        } else {
                            if ($db_type === "mysql") {
                                ?>
                <h3>Database</h3>
                <p>Provide the database credentials. Double check before submitting</p>
                <form action="<?php 
                                \Lobby::u();
                                ?>
" method="POST">
                  <table>
                    <thead>
                      <tr>
                        <td width="20%">Name</td>
Ejemplo n.º 11
0
?>
    <div id="workspace">
      <div class="contents">
        <h1>Admin</h1>
        <?php 
if (\Lobby\Update::isAvailable()) {
    echo sss("Updates Available", "Some updates are available for you to update. Yay!<cl/><a class='btn blue' href='" . \Lobby::u("/admin/update.php") . "'>See Updates</a>");
}
?>
        <p>Manage your Lobby installation.</p>
        <?php 
echo \Lobby::l("admin/settings.php", "Settings", "class='btn red'") . "&nbsp;";
echo \Lobby::l("admin/apps.php", "Apps", "class='btn green'") . "&nbsp;";
echo \Lobby::l("admin/lobby-store.php", "Lobby Store", "class='btn pink'") . "&nbsp;";
if (\Lobby\Modules::exists("admin")) {
    echo \Lobby::l("admin/login?logout=true", "Log Out", "class='btn'");
}
?>
        <h2>About</h2>
        <p>You are using <b>Lobby <?php 
echo \Lobby::getVersion();
?>
</b>.</p>
        <p>Lobby is an Open Source software. <b>Feel free</b> to ask your doubts and problems on our Facebook Group or GitHub</p>
        <a target="_blank" class="btn pink" href="https://www.facebook.com/groups/LobbyOS">Facebook</a>
        <a target="_blank" class="btn blue" href="https://twitter.com/LobbyOS">Twitter</a>
        <a target="_blank" class="btn black" href="https://github.com/subins2000/lobby/issues">GitHub</a>
      </div>
    </div>
  </body>
</html>
Ejemplo n.º 12
0
        echo $appImage;
        ?>
" height="200" width="200" />
              <a clear="" href="<?php 
        echo $app['app_page'];
        ?>
" target="_blank" class="button">App Page</a>
              <cl/>
              <?php 
        $App = new \Lobby\Apps($_GET['id']);
        if (!$App->exists) {
            echo \Lobby::l("/admin/install-app.php?id={$_GET['id']}" . H::csrf("g"), "Install", "class='button'");
        } elseif (version_compare($App->info['version'], $app['version'])) {
            echo \Lobby::l("/admin/check-updates.php", "Update App", "class='button red'");
        } else {
            echo \Lobby::l($App->info['URL'], "Open App", "class='button green'");
        }
        ?>
              <style>#leftpane .button{width:100%;margin: 5px 0px;}</style>
            </div>
            <div style="display:inline-block;width: 60%;">
              <table>
                <thead>
                  <tr>
                    <td style="width: 10%;">Version</td>
                    <td style="width: 25%;">Category</td>
                    <td style="width: 15%;">Author</td>
                    <td style="width: 5%;">Rating</td>
                    <td style="width: 5%;">Downloads</td>
                    <td style="width: 40%;">Last Updated</td>
                  </tr>
Ejemplo n.º 13
0
            echo sss("Enabled", "The App <b>{$displayID}</b> is enabled. The author says thanks. <cl/><a href='" . $App->info['url'] . "' class='btn green'>Open App</a>");
        } else {
            if ($action === "remove" && CSRF::check()) {
                $App->removeApp();
                echo sss("Removed", "The App <b>{$displayID}</b> was successfully removed.");
            } else {
                if ($action === "clear-data" && CSRF::check()) {
                    if ($App->clearData()) {
                        echo sss("Cleared Data", "The data of <b>{$displayID}</b> was successfully cleared from the database.");
                    }
                } else {
                    if ($appID != null && $action == null && CSRF::check()) {
                        ?>
          <h1>Install App</h1>
          <p>The install progress will be displayed below. If this doesn't work, try the <?php 
                        echo \Lobby::l("/admin/install-app.php?app={$appID}&do=alternate-install" . CSRF::getParam(), "alternate install");
                        ?>
.</p>
          <?php 
                        if (isset($_GET["do"]) && $_GET["do"] === "alternate-install" && CSRF::check()) {
                            ?>
            <iframe src="<?php 
                            echo L_URL . "/admin/download.php?type=app&app={$appID}" . CSRF::getParam();
                            ?>
" style="border: 0;width: 100%;height: 300px;"></iframe>
        <?php 
                        } else {
                            ?>
            <ul id="appInstallationProgress" class="collection"></ul>
            <script>
              lobby.load(function(){
Ejemplo n.º 14
0
L_URL;
?>
/api/lobby/download/linux" style="display: table;font-size: 18px;">Download Lobby-Linux.zip<font size='1' style='display:block;margin-top: -10px;'>Ubuntu, Linux Mint, openSUSE, Fedora, CentOS, ArchLinux, ElementaryOS etc.</font></a>
    <p>To run, just open the Lobby file inside the folder you extracted.</p>
    <p><a href="/docs/quick/linux" class="btn">Further Information</a></p>
  </div>
  <div id="mac">
    <h2>Mac</h2>
    <p>A Lobby Standalone version for Mac hasn't been devloped <b>yet</b>. Meanwhile you can run Lobby in macOS on a web server.</p>
    <p><a href="/docs/quick/mac" class="btn orange">Install Lobby In macOS</a></p>
  </div>
  <div id="direct">
    <h2>Apache Server</h2>
    <p>If you have an Apache server installed, then download this .zip file.</p>
    <ul>
      <li>Create a folder named "lobby" in your server's document root</li>
      <li>Open the Zip file and extract the contents of it to this newly created folder ("lobby")</li>
      <li>Access the folder through your web browser.</li>
      <li><?php 
echo \Lobby::l("/docs/quick#configuration", "Install Lobby");
?>
</li>
    </ul>
    <p>
      If you already have localhost set up and just want to download Lobby, click the button below :
      <a style='display: table;margin: 20px auto;font-size: 16px;padding: 5px 20px;' class='btn green' href="/api/lobby/download/latest">Download Lobby<font size='1' style='display:block;margin-top: -10px;'>Zip, 2.9 MB</font></a>
    </p>
  </div>
</div>
<?php 
require_once $this->dir . "/src/inc/views/track.php";
Ejemplo n.º 15
0
              <td><?php 
echo \Lobby::$version;
?>
</td>
            </tr>
            <tr>
              <td>Release Date</td>
              <td><?php 
echo \Lobby::$versionReleased;
?>
</td>
            </tr>
          </tbody>
        </table>
        <h4 style="margin: 0;"><?php 
echo \Lobby::l("/admin/update.php", "Updates", "");
?>
</h4>
        <table>
          <col width="100">
          <col width="120">
          <tbody>
            <tr>
              <td>Latest Version</td>
              <td><?php 
echo Lobby\DB::getOption("lobby_latest_version");
?>
</td>
            </tr>
            <tr>
              <td>Latest Version Release Date</td>
Ejemplo n.º 16
0
echo "<a href='" . L_URL . "/docs/dev/app/manifest.json'>Manifest File</a>";
?>
</li>
        <li><?php 
echo "<a href='" . L_URL . "/docs/dev/app/App.php'>App.php</a>";
?>
</li>
        <li><?php 
echo "<a href='" . L_URL . "/docs/dev/app/publish'>Publish</a>";
?>
</li>
      </ul>
    </li>
    <li class="doc-side-head">
      <?php 
echo \Lobby::l("/docs/dev/core", "Core", 'class="head"');
?>
      <ul>
        <li><?php 
echo "<a href='" . L_URL . "/docs/dev/core/hooks'>Hooks</a>";
?>
</li>
      </ul>
    </li>
  </ul>
</div>
<div class="contents">
  <?php 
require_once $this->dir . "/src/inc/Parsedown.php";
$Parsedown = new ParsedownExtra();
$html = $Parsedown->text($content);
Ejemplo n.º 17
0
                \Lobby\Install::makeConfigFile();
                /**
                 * Create Tables
                 */
                if (\Lobby\Install::makeDatabase($prefix)) {
                    sss("Success", "Database Tables and configuration file was successfully created.");
                    /**
                     * Enable app lEdit
                     */
                    \Lobby::$installed = true;
                    \Lobby\DB::init();
                    $App = new \Lobby\Apps("ledit");
                    $App->enableApp();
                    echo '<cl/><a href="?step=3" class="button">Proceed</a>';
                } else {
                    ser("Unable To Create Database Tables", "Are there any tables with the same name ? Or Does the user have the permissions to create tables ?<cl/>The <b>config.php</b> file is created. To try again, remove the <b>config.php</b> file and click the button. <cl/>" . \Lobby::l("/admin/install.php?step=2", "Try Again", "class='button'"));
                }
            }
        } else {
            ?>
              <h2 style="margin-top: -20px;">Database Configuration</h2>
              <form action="<?php 
            \Lobby::u();
            ?>
" method="POST">
                 <table>
                  <tbody>
                    <tr>
                      <td>Database Host</td>
                      <td>
                        <input type="text" name="dbhost" value="localhost">
Ejemplo n.º 18
0
<?php

$this->setTitle("Admin");
?>
<div class="contents">
  <h1>Lobby Admin</h1>
  <?php 
echo \Lobby::l("/admin/app/lobby-server/new-app", "New App", "class='btn green' clear");
echo \Lobby::l("/admin/app/lobby-server/downloads", "Download Stats", "class='btn' clear");
echo \Lobby::l("https://lobby-subins.rhcloud.com/phpmyadmin", "Database", "class='btn red' clear target='_blank'");
echo \Lobby::l("/admin/app/lobby-server?clear-git-cache" . \CSRF::getParam(), "Clear Git Cache", "class='btn orange' clear");
if (isset($_GET["clear-git-cache"]) && \CSRF::check()) {
    \Lobby\DB::getDBH()->exec("TRUNCATE TABLE `git_cache`");
    echo "<h2>cleared</h2>";
}
?>
</div>
Ejemplo n.º 19
0
<?php

/**
 * Get installed apps and make the tiles on dashboard
 */
$apps = \Lobby\Apps::getEnabledApps();
if (count($apps) == 0) {
    echo ser("No Apps", "You haven't enabled or installed any apps. <br/>Get great Apps from " . \Lobby::l("/admin/lobby-store.php", "Lobby Store"));
} else {
    $dashboard_items = array("apps" => array());
    foreach ($apps as $app => $null) {
        $App = new \Lobby\Apps($app);
        $data = $App->info;
        $dashboard_items["apps"][$app] = $data;
    }
    \Lobby\UI\Themes::loadDashboard($dashboard_items);
}
Ejemplo n.º 20
0
        <p>Welcome to the Admin panel of Lobby. You can manage your Lobby installation from here</p>
        <ul>
          <li><?php 
echo \Lobby::l("admin/about.php", "About");
?>
</li>
          <li><?php 
echo \Lobby::l("admin/apps.php", "Installed Apps");
?>
</li>
          <li><?php 
echo \Lobby::l("admin/lobby-store.php", "Lobby Store");
?>
</li>
          <?php 
if (\Lobby\Modules::exists("admin")) {
    ?>
            <li><?php 
    echo \Lobby::l("admin/login?logout=true", "Log Out");
    ?>
</li>
          <?php 
}
?>
        </ul>
        <p>Encoutered a problem or want to make a suggestion ? See our <a target="_blank" href="https://github.com/subins2000/lobby/issues">GitHub Repo</a></p>
      </div>
    </div>
  </body>
</html>
Ejemplo n.º 21
0
<div class="contents">
  <h1>Bunto</h1>
  <?php 
$status = \H::i("status");
if ($status === "site-deleted") {
    sss("Site Deleted", "The site you requested was removed from Bunto, but the folder is not removed.");
}
echo \Lobby::l($this->u("/new"), "New Site", "class='btn'");
?>
  <p>
    <?php 
$sites = getData("sites");
if ($sites !== false) {
    $sites = json_decode($sites, true);
    foreach ($sites as $name => $site) {
        echo $this->l("/site/" . urlencode($name), $name, "class='btn green'") . "<cl/>";
    }
}
?>
  </p>
</div>
Ejemplo n.º 22
0
     * "Update Available" icon on the right side of panel
     */
    $AppUpdates = json_decode(getOption("app_updates"), true);
    $lobby_version = getOption("lobby_version");
    $latestVersion = getOption("lobby_latest_version");
    if (\Lobby\FS::exists("/upgrade.lobby")) {
        require_once L_DIR . "/includes/src/Update.php";
        $l_info = json_decode(\Lobby\FS::get("/lobby.json"));
        if ($lobby_version != $l_info->version) {
            saveOption("lobby_latest_version", $l_info->version);
            saveOption("lobby_latest_version_release", $l_info->released);
        }
        \Lobby\Update::finish_software_update();
    }
    if (count($AppUpdates) != 0 || $latestVersion && $lobby_version != $latestVersion) {
        \Lobby\UI\Panel::addTopItem("updateNotify", array("html" => \Lobby::l("/admin/update.php", "<span id='update' title='An Update Is Available'></span>"), "position" => "right"));
    }
}
if (\Lobby::status("lobby.install")) {
    \Lobby::addStyle("admin", "/includes/lib/core/CSS/admin.css");
}
if (\Lobby::status("lobby.admin")) {
    /**
     * Add Admin Pages' stylesheet
     */
    \Lobby::addStyle("admin", "/includes/lib/core/CSS/admin.css");
    /**
     * Check For New Versions (Apps & Core)
     */
    if (\Lobby::$config['server_check'] === true && !isset($_SESSION['checkedForLatestVersion'])) {
        \Lobby\Server::check();
Ejemplo n.º 23
0
<div class="sidebar">
  <div style="height:32px;text-align:center;margin-top:10px;">
    <a target="_blank" href="http://lobby.subinsb.com" style="color:white;">Lobby <?php 
echo getOption("lobby_version");
?>
</a>
  </div>
  <?php 
$links = array("/admin" => "Dashboard", "/admin/apps.php" => "Apps", "/admin/lobby-store.php" => "Lobby Store", "/admin/modules.php" => "Modules", "/admin/about.php" => "About");
$curPage = \Lobby::curPage();
foreach ($links as $link => $text) {
    if ($link == $curPage || $curPage == "/admin/update.php" && $text == "About") {
        echo \Lobby::l($link, $text, "class='link active'");
    } else {
        echo \Lobby::l($link, $text, "class='link'");
    }
}
?>
</div>
Ejemplo n.º 24
0
echo \Lobby::l("/admin/app/school-election/candidates", "Candidates Enrollment", "class='button'");
?>
  </div>
  <div style="margin-top:10px;">
    <?php 
echo \Lobby::l("/admin/app/school-election/create-users", "Generate Election Passwords", "class='button'");
?>
  </div>
  <div style="margin-top:10px;">
    <?php 
echo \Lobby::l("/admin/app/school-election/stats", "Election Statistics", "class='button green'");
?>
  </div>
  <div style="margin-top:10px;">
    <?php 
echo \Lobby::l("/admin/app/school-election/didnt-vote", "Who Didn't Vote ?", "class='button'");
?>
  </div>
  <h2>Other Tools</h2>
  <div style="margin-top:10px;">
    <form action="<?php 
echo \Lobby::u();
?>
" method="POST" onsubmit="return confirm('Are you sure ?') !== true ? false : true;"><button title="Empty all the data of election stored in database ?" name="clearData" class="red">CLEAR ALL DATA !</button></form>
  </div>
  <div style="margin-top:10px;">
    <a href="?action=reload" class="button">Reload Election Pages</a>
  </div>
  <div style="margin-top:10px;">
    <a href="?action=reset" class="button">Reset Live Actions</a>
  </div>
Ejemplo n.º 25
0
 public function l($path, $text = "", $extra = "")
 {
     return \Lobby::l($this->url . $path, $text, $extra);
 }
Ejemplo n.º 26
0
            <div clear></div>
            <a class="button" href="backup-db.php">Export Lobby Database</a>
          </p>
        <?php 
    if (is_writable(L_DIR)) {
        echo '<div clear style="margin-top: 10px;"></div>';
        echo \Lobby::l("/admin/update.php?step=1" . H::csrf("g"), "Setup Lobby Update", "class='button red'");
    }
}
if (isset($_GET['step']) && $_GET['step'] != "" && H::csrf()) {
    $step = $_GET['step'];
    if ($step == 1) {
        ?>
            <p>
              Looks like everything is ok. Hope you backed up Lobby installation & Database.
              <div clear></div>
              You can update now.
            </p>
          <?php 
        echo \Lobby::l("/admin/update.php?step=2" . H::csrf("g"), "Start Update", "clear class='button green'");
    } elseif ($step == 2) {
        $version = getOption("lobby_latest_version");
        echo '<iframe src="' . L_URL . "/admin/download.php?type=lobby&id={$version}" . H::csrf("g") . '" style="border: 0;width: 100%;height: 200px;"></iframe>';
    }
}
?>
      </div>
    </div>
  </body>
</html>
Ejemplo n.º 27
0
'" target="_blank"><i id="open-in-new" class="small"></i></a>
          </h1>
          <div id="storeNav" class="card">
            <form method="GET" action="<?php 
    echo \Lobby::u("/admin/lobby-store.php");
    ?>
">
              <input type="text" placeholder="Search for an app" name="q" value="<?php 
    echo htmlspecialchars($q);
    ?>
" />
              <button class="hide"></button>
            </form>
            <?php 
    echo Lobby::l("/admin/lobby-store.php", "New", "class='btn " . ($section === null ? "green" : "") . "'");
    echo Lobby::l("/admin/lobby-store.php?section=popular", "Popular", "class='btn " . ($section === "popular" ? "green" : "") . "'");
    ?>
          </div>
          <?php 
    if ($q !== null) {
        $params = array("q" => $_GET['q']);
    } else {
        $params = array("get" => "popular");
    }
    if ($p !== null) {
        $params["p"] = $p;
    }
    $server_response = \Lobby\Server::store($params);
    if ($server_response == false) {
        echo ser("Nothing Found", "Nothing was found that matches your criteria. Sorry...");
    } else {
Ejemplo n.º 28
0
<div id="expired_overlay">
  <h1>Time Over</h1>
  <p>Sorry, the allotted time of 1 hour has ended.</p>
  <p>
    <?php 
echo \Lobby::l("/app/kerala-it-exam/restart", "Restart Exam", "class='button red'");
?>
  </p>
</div>
<div id="finished_overlay">
  <h1>Finished</h1>
  <p>Congratulations, you have successfully finished the examination.</p>
  <p>Your Score is :</p>
  <h2></h2>
  <p>
    <?php 
echo \Lobby::l("/app/kerala-it-exam/restart", "Restart Exam", "class='button red'");
?>
  </p>
  <div id="result_analysis"></div>
</div>
<script>
  <?php 
echo "var practicalQuestions = " . json_encode($questions['practical']) . ";";
?>
  $(window).load(function(){
    lobby.app.practicalQuestions = practicalQuestions;
    lobby.app.startExam();
  });
</script>