Beispiel #1
0
function widget_pages()
{
    echo "<ul>";
    foreach (get_posts("page") as $page) {
        ?>
<li><a href="<?php 
        echo get_blog_stuff("url");
        echo get_page_stuff($page, "title");
        ?>
.htm"><?php 
        echo get_page_stuff($page, "title");
        ?>
</a><?php 
    }
    echo "</ul>";
}
Beispiel #2
0
<?php

include "header.php";
echo get_page_stuff(current_page, "content");
include "footer.php";
Beispiel #3
0
        echo "<a href=?action=new&id=" . $_POST["id"] . ">Edit again</a> | ";
        echo "<a href=" . get_blog_stuff("url") . get_post_stuff($_POST["id"], "title") . ">Visit</a>";
    } else {
        create_page($_POST["title"], $_POST["content"]);
        echo "created page!";
        echo "<a href=" . get_blog_stuff("url") . "?p=" . $_POST["id"] . ">Visit</a>";
    }
} elseif ($_GET["action"] == "new") {
    ?>
<form method="post" action="<?php 
    echo $_SERVER["PHP_SELF"];
    ?>
">
<input type="hidden" name="action" value="addnew">
<input name="title" id="title" value="<?php 
    echo get_page_stuff($_GET["id"], "title");
    ?>
">
<input name="id" type="hidden" value="<?php 
    echo $_GET["id"];
    ?>
">
<textarea name="content"><?php 
    echo get_page_stuff($_GET["id"], "content");
    ?>
</textarea>
<input type="submit">
</form>
<?php 
}
require "footer.php";