本文整理汇总了PHP中Lobby::ser方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::ser方法的具体用法?PHP Lobby::ser怎么用?PHP Lobby::ser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lobby
的用法示例。
在下文中一共展示了Lobby::ser方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
\Lobby::ser("Output Path problem", "The path you gave as output doesn't exist or permission is not acceptable. Make sure it's an existing directory with Read & Write permission", false);
} else {
if (!ctype_alnum(str_replace(" ", "", $name))) {
\Lobby::ser("Invalid Name", "Only alphanumeric characters are allowed for Site Name", false);
} else {
if (array_search($theme, $this->themes) === false) {
\Lobby::ser("Invalid Theme", "The theme you selected doesn't exist", false);
} else {
// Everything's great
$this->addSite($name, $output, $theme);
\Lobby::sss("Site added", "The site was added successfully");
}
}
}
} else {
\Lobby::ser("Fill Up", "Please fill the form completely", false);
}
}
?>
<form action="" method="POST">
<label>
<div>Site Name</div>
<input type="text" name="site" />
</label><cl/>
<label>
<div>Output Location</div>
<input type="text" name="output" title="Where the generated site should be extracted" />
</label><cl/>
<label>
<div>Empty Output location</div>
<input type="checkbox" name="empty" title="Should the contents of output directory be removed before generating the site everytime" />
示例2: 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>
示例3: ser
function ser($title = "", $description = "", $exit = false)
{
\Lobby::ser($title, $description, $exit);
}
示例4: array
$title = $_POST['title'];
$body = $_POST['content'];
$slug = $_POST['slug'];
if ($pname == "" || $body == "" || $title == "" || $slug == "") {
\Lobby::ser("Fill Up", "Please fill up all the fields");
} else {
if (!ctype_alnum(str_replace(" ", "", $pname))) {
\Lobby::ser("Invalid Name", "The page name should only contain alphanumeric characters");
} else {
$gSite = new \Lobby\App\sige\Site($site, $this);
$page = $gSite->page($slug, array("{{page-title}}" => $title, "{{page-content}}" => $body));
if ($page === true) {
$this->addPage($name, $pname, array("title" => $title, "slug" => $slug, "body" => $body));
\Lobby::sss("Page " . ($page_edit ? "Updated" : "Created"), "The page was successfully " . ($page_edit ? "updated" : "created"));
} else {
\Lobby::ser("Error", "Some error was occured while creating the page. Try again.");
}
$data = $this->getPages($name, $pname);
}
}
}
?>
<form method="POST" action="<?php
echo \Lobby::u();
?>
" style="width: 700px;">
<?php
if ($data['title'] == "") {
?>
<p>Create a new page in <strong><?php
echo $name;
示例5: date
</label>
<label clear>
<span clear>Password</span>
<input clear type="password" name="password" id="password" />
<?php
if (isset($_POST['username'])) {
echo "<script>\$('#password').focus()</script>";
}
?>
</label>
<label clear>
<input type="checkbox" name="remember_me" checked="checked" />
<span>Remember Me</span>
</label>
<button clear>Log In</button>
</form>
<?php
if (isset($error)) {
\Lobby::ser($error[0], $error[1], false);
}
?>
<div>
© <a target="_blank" href="http://lobby.subinsb.com">Lobby</a> <?php
echo date("Y");
?>
</div>
</div>
</div>
</body>
</html>