\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" />
<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>
function ser($title = "", $description = "", $exit = false) { \Lobby::ser($title, $description, $exit); }
$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;
</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>