Пример #1
0
        if ($row['category'] != "generic") {
            if (!array_key_exists($row['category'], $categories)) {
                $categories[$row['category']] = array();
            }
            $categories[$row['category']][] = $ctag;
            unset($ttags[array_search($ctag, $ttags)]);
            $ttags = array_values($ttags);
        }
    }
    require "includes/header.php";
    echo '<div id="content"><div id="post-view">';
    if ($post->has_children($id)) {
        echo '<div style="background: #f0f0f0; padding: 10px; text-align: center; border: 3px solid #dadada;">This post has <a href="index.php?page=post&s=list&tags=parent:' . $id . '"><b>child posts</b></a>.</div><br><br>';
    }
    if ($post->has_parent($id)) {
        echo '<div style="background: #f0f0f0; padding: 10px; text-align: center; border: 3px solid #dadada;">This post has a <a href="index.php?page=post&s=view&id=' . $post->get_parent_id($id) . '"><b>parent post</b></a>.</div><br><br>';
    }
    echo '<div class="sidebar"><div class="space">
		<h5>Search</h5>
		<form action="index.php?page=search" method="post">
		<input id="stags" name="tags" size="20" type="text" />
		<br /><input name="commit" style="margin-top: 3px; background: #fff; border: 1px solid #dadada; width: 172px;" type="submit" value="Search" />
		</form><small>(Supports wildcard *)</small>
		</div>
		<div id="tag_list">
		<!--<h5>Tags</h5>-->
		<ul>';
    //foreach($special_tags as $cur_tag)
    foreach ($categories as $cat => $tag_arr) {
        echo "<h5>" . ucfirst(str_replace('_', ' ', $cat));
        if (count($tag_arr) > 1) {