当前位置: 首页>>代码示例>>PHP>>正文


PHP Lobby::sss方法代码示例

本文整理汇总了PHP中Lobby::sss方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::sss方法的具体用法?PHP Lobby::sss怎么用?PHP Lobby::sss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lobby的用法示例。


在下文中一共展示了Lobby::sss方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

    $output = $_POST['output'];
    $theme = isset($_POST['theme']) ? $_POST['theme'] : "";
    /* Any change to the below must be reflected in settings.php */
    if ($name != "" && $output != "" && $theme != "") {
        if (!file_exists($output) || !is_writable($output)) {
            \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>
开发者ID:LobbyOS,项目名称:app-sige,代码行数:31,代码来源:new.php

示例2: isset

    $output = $_POST['output'];
    $tagline = $_POST['tagline'];
    $theme = isset($_POST['theme']) ? $_POST['theme'] : "";
    if ($output != "" && $theme != "") {
        if (!file_exists($output) || !is_writable($output)) {
            \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 (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, $tagline, $output, $theme, isset($_POST['empty']) ? 1 : 0, isset($_POST['titleTag']) ? 1 : 0);
                /* Generate the site */
                $gSite = new sigeSite($this->getSite($name));
                $gSite->generate($this->getPages($name));
                \Lobby::sss("Site updated", "The site was updated and generated successfully");
            }
        }
    } else {
        \Lobby::ser("Fill Up", "Please fill the form completely", false);
    }
}
?>
  <form action="<?php 
echo \Lobby::u();
?>
" method="POST" clear>
    <?php 
$site = $this->getSite($name);
$empty = $site['empty'] == 1 ? "checked='checked'" : "";
$titleTag = isset($site['titleTag']) && $site['titleTag'] == 1 ? "checked='checked'" : "";
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:settings.php

示例3:

<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");
}
?>
</div>
开发者ID:LobbyOS,项目名称:app-sige,代码行数:30,代码来源:site.php

示例4: array

if (isset($_POST['submit'])) {
    $pname = $page_edit === true ? $_GET['id'] : $_POST['name'];
    $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'] == "") {
    ?>
开发者ID:bunto,项目名称:bunto-php,代码行数:31,代码来源:edit.php

示例5: sss

function sss($title, $description)
{
    \Lobby::sss($title, $description);
}
开发者ID:saviobosco,项目名称:lobby,代码行数:4,代码来源:functions.php

示例6: array

if (isset($_POST['submit'])) {
    $pname = $valid === true ? $_GET['id'] : $_POST['name'];
    $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 Updated", "The page was successfully " . ($valid ? "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'] == "") {
    ?>
开发者ID:LobbyOS,项目名称:app-sige,代码行数:31,代码来源:edit.php


注:本文中的Lobby::sss方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。