本文整理汇总了PHP中Lobby::l方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::l方法的具体用法?PHP Lobby::l怎么用?PHP Lobby::l使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lobby
的用法示例。
在下文中一共展示了Lobby::l方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makePanelItem
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;
}
示例2: rgba
?>
<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)
{
示例3: ser
}
}
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();
示例4: l
public static function l($path, $text = "", $extra = "")
{
return \Lobby::l(APP_URL . $path, $text, $extra);
}
示例5: foreach
<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>
示例6: array
<?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>
示例7: date
<?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=" . $this->dbinfo['db_username'] . " --password=" . $this->dbinfo['db_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>";
}
示例8:
$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");
}
示例9:
"><?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>
示例10: str_replace
\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>
示例11: sss
?>
<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>
示例12: elseif
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>
示例13: sss
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(){
示例14: folder
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";
示例15:
<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>