/** * Get Version of a component */ public static function getDependencyVersion($dependency) { /** * If dependency is 'app/admin' etc. */ if (strpos($dependency, "/") !== false) { list($dependency, $subDependency) = explode("/", $dependency); } switch ($dependency) { case "lobby": return \Lobby::getVersion(); break; case "app": $App = new Apps($subDependency); return $App->exists ? $App->info["version"] : 0; break; case "curl": $curl = function_exists("curl_version") ? curl_version() : 0; return $curl === 0 ? 0 : $curl["version"]; break; default: /** * phpversion() returns FALSE on failure */ $v = phpversion($dependency); return $v ? $v : 0; } }
public static function isCoreAvailable() { return version_compare(DB::getOption("lobby_latest_version"), \Lobby::getVersion(), ">"); }
<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'") . " "; echo \Lobby::l("admin/apps.php", "Apps", "class='btn green'") . " "; echo \Lobby::l("admin/lobby-store.php", "Lobby Store", "class='btn pink'") . " "; 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>
<div class="side-nav fixed" id="slide-out"> <a target="_blank" href="http://lobby.subinsb.com" class="lobby-link">Lobby <?php echo \Lobby::getVersion(true); ?> </a> <?php $links = array("/admin/index.php" => "Dashboard", "/admin/apps.php" => "Apps", "/admin/lobby-store.php" => "Lobby Store", "/admin/modules.php" => "Modules", "/admin/settings.php" => "Settings"); $links = Hooks::applyFilters("admin.view.sidebar", $links); $curPage = \Lobby::curPage(); foreach ($links as $link => $text) { if (substr($curPage, 0, strlen($link)) === $link || $curPage == "/admin/update.php" && $text == "Settings" || $curPage == "/admin/install-app.php" && $text == "Apps") { echo \Lobby::l($link, $text, "class='link active'"); } else { echo \Lobby::l($link, $text, "class='link'"); } } ?> </div>